
Recherche avancée
Autres articles (81)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Les sons
15 mai 2013, par -
Soumettre bugs et patchs
10 avril 2011Un logiciel n’est malheureusement jamais parfait...
Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
Si vous pensez avoir résolu vous même le bug (...)
Sur d’autres sites (5906)
-
HTML5 video player doesn't work on iPad/iPhone
16 avril 2015, par Avrohom YisroelNOTE This turned out to be a simulator problem, not a video encoding problem, see my edit lower down...
I’m creating a web site for a local college, and they want to be able to add short videos that people can view online. I’ve spent quite a bit of time trying to work out how to get the videos to play on iDevices, but have failed.
I’m using Video.js (http://www.videojs.com), and have HTML that looks like this...
<video class="video-js vjs-default-skin" controls="controls" preload="auto" width="640" height="352" poster="/Content/Images/logobg.png" data-setup="{}">
<source src="/Content/Videos/video.m4v" type="video/mp4">
<source src="/Content/Videos/video.webm" type="video/webm">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</source></source></video>This works fine on desktop browsers, where it uses the m4v file. However, if I load the page on an iDevice, the video player says "no compatible source was found for this video", which sounds like it doesn’t like either the m4v or the webm file.
I created the webm file using instructions found at http://daniemon.com/blog/how-to-convert-videos-to-webm-with-ffmpeg/. I tried creating a .mov file using the accepted answer at iPad Doesn’t Render H.264 Video with HTML5, but this gave the same error.
Anyone any ideas how I can support iDevices ? Please don’t blind me with science, I’m a real newbie with all this video stuff, and need simple instructions !
Edit The problem I was having was when trying to view the site on a mobile simulator. When I uploaded the site to a real server, and tried it on an iPad, it worked fine. So, if anyone is having a similar problem, first use something like Handbrake to encode the videos, as it seems to do it fine, then make sure you’re testing on a real mobile device, not a simulator !
-
How to play mp4 video file with HTML5 video tag on iOS (iPhone and iPad) ?
22 avril 2015, par MokielasI want to display HTML5 video to my users using the video tag. For Firefox, Chrome and Opera WEBM works as expected. In Safari on Windows and Mac my MP4 version works, too. The only problem I’m experiencing is, that it won’t play on iPad and iPhone (Safari of course).
Create video
The MP4 (h.264 + acc-lc) is converted like this (with profile : baseline and level 3.0 for maximum compatibility with iOS) :
- Stream #0:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x352, 198 kb/s, 17 fps, 17 tbr, 17408 tbn, 34 tbc (default)
- Stream #0:1(eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 56 kb/s (default)
Edit : Whole ffprobe output (slight changes in bitrate etc. to the above mentioned) :
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.30.100
Duration: 00:01:00.05, start: 0.046440, bitrate: 289 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline)
(avc1 /0x31637661), yuv420p, 640x352, 198 kb/s, 25 fps, 25 tbr,
12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 85 kb/s (default)
Metadata:
handler_name : SoundHandlerI found various requirements for iOS devices like this and this, also someone mentioned to add the yuv420p pixel format when converting.
In fact the ffmpeg cmd looks like this :
ffmpeg -i __inputfile__ -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3.0 -b:v 200K -r 17 -bt 800K -c:a libfdk_aac -b:a 85k -ar 44100 -y __outputfile_lowversion__.mp4
Display video
With Modernizr I detect which format is "supported" and add it to the
src
or thevideo
tag. Last thing is adding the right MIME type. For mp4 I addtype="video/mp4"
. The full code for thevideo
tag is :<video class="p-video" preload="auto" autoplay="" type="video/mp4" src="http://full.url/to/video_low.mp4"></video>
I tried various ways : own implementation with own interface, controls and stuff from browser vendors and video.js just to check whether i’m too studip for this. All work in the environments listed above except for iPhone and iPad.
I read this article on Video on the web, especially this part and only serve the "right" file with the "right" type without a
poster
attribute set.My Apache has
AddType video/mp4 mp4 m4v f4v f4p
AddType video/ogg ogv
AddType video/webm webmAnd byte-ranges are enabled. This is needed to get partial content from the server.
Has anyone a clue what’s going on there ? Thanks in advance !
Edit : Safari and Chrome both throw
MEDIA_ERR_SRC_NOT_SUPPORTED
Error on iPad. There must be an issue with the encoding. -
Unable to upload video from iPhone with paperclip-ffmpeg in Ruby on Rails
13 mai 2015, par sankWhen I upload a video from an iPhone, I’m getting the following error :
Command :: PATH=/usr/bin/:$PATH; file -b --mime '/tmp/6da355e988ec841811d8803dfd5cf44c20150513-8103-b4lkam.MOV'
[paperclip] Content Type Spoof: Filename IMG_2637.MOV (["video/quicktime"]), content type discovered from file command: inode/x-empty. See documentation to allow this combination.
(0.6ms) ROLLBACK
Completed 400 Bad Request in 58ms (Views: 0.9ms | ActiveRecord: 5.0ms)(This works perfectly when I upload the same video from desktop.)
I used gems
"paperclip", "~> 4.1"
and"paperclip-ffmpeg"
.In my video model :
validates_attachment_content_type :student_video, content_type: /\Avideo\/.*\Z/
also tried out
validates_attachment_content_type :student_video, :content_type => ['video/x-
# msvideo', 'video/avi', 'video/quicktime', 'video/3gpp', 'video/x-ms-
# wmv', 'video/mp4', 'flv-application/octet-stream', 'video/x-
# flv', 'video/mpeg', 'video/mpeg4', 'video/x-la-asf', 'video/x-ms-asf']But I’m getting the same error.