We are implementing a video streaming based on VP9 and x264. We want to offer MPEG DASH and "normal" HTML5 video. That's why VP9 videos must be playable in all major browsers supporting VP9. Currently Chrome, Firefox and Android browser.
Our conversion tool is ffmpeg.
Now I'm running into a problem when trying to convert a video with a variable framerate (average framerate 29.970). The original video is named "fit.mov" and you find it attached to this post.
Unfortunately it's not possible to upload webm videos here, so I've placed conversion results on our server for download:
http://www.team-andro.com/download/fit-360.webm
http://www.team-andro.com/download/fit_vor.webm
http://www.team-andro.com/download/fit_mux-360.webm
The problem is, that the final video (see "fit_mux-360.webm") is not seekable in Firefox. If you open the video in Firefox, it will start to play. But if you change the position one, two or three times, that will end up with the error message "Video can't be played because the file is corrupt".
Convserion is done as follows:
Some explanations with respect to that:Code:ffmpeg -i fit.mov -vf scale=640:360 -r 29.970 -c:v libvpx-vp9 -threads 2 -cpu-used 4 -tile-columns 1 -frame-parallel 1 -keyint_min 150 -g 150 -pass 1 -passlogfile fit-360 -b:v 0 -crf 41 -an -f webm -dash 1 -y /dev/null ffmpeg -i fit.mov -vf scale=640:360 -r 29.970 -c:v libvpx-vp9 -threads 2 -cpu-used 3 -tile-columns 1 -frame-parallel 1 -auto-alt-ref 1 -keyint_min 150 -g 150 -pass 2 -passlogfile fit-360 -b:v 0 -crf 41 -an -f webm -dash 1 -y fit-360.webm ffmpeg -i fit.mov -vn -ac 2 -c:a libvorbis -b:a 96k -f webm -dash 1 -y fit_vor.webm ffmpeg -i fit-360.webm -i fit_vor.webm -flags +global_header -c:v copy -c:a copy -y fit_mux-360.webm
- The first two lines are a VP9 2-pass encoding, creating the video part (fit-360.webm)
- In the third line the audio is created (fit-vor.webm)
- In the fourth line video and audio are muxed togehther
Some explanations with respect to video param settings:
- cpu-used is set to 4 in the 1st and to 3 in the 2nd pass. That's to improve encoding performance.
- tile-columns 1 and threads 2 make sure that 2 threads can be used during encoding.
- keyint_min and g are both set to 150. That's done to reach keyframe-alignment which is a requirement of MPEG DASH.
- r is set to 29.970 to achieve a constant frame rate. That's needed for MPEG DASH, too.
Analyzing the videos I have noticed the following.
If I only open the video or only the audio part in Firefox then everything seems fine. Both are searchable. But the muxed video isn't.
When I take a look at the video part (fit-360.webm) with the help of mediainfo it says the following:
Video
ID : 1
Format : VP9
Codec ID : V_VP9
Duration : 2mn 3s
Bit rate : 447 Kbps
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Bits/(Pixel*Frame) : 0.065
Stream size : 6.58 MiB (95%)
Language : English
Default : Yes
Forced : No
That's what I'm expecting: Constant framerate at 29.970 fps
For the muxed video (fit_mux-360.webm) mediainfo doesn't say the same:
Video
ID : 1
Format : VP9
Codec ID : V_VP9
Bit rate : 427 Kbps
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Language : English
Default : Yes
Forced : No
Now the video seems to have a variable framerate, which is not what I would expect.
Can somebody explain that behaviour and tell me what I'm doing wrong?
Thank you in advance.
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
How to create VP9 bit depth:10 video file
By Ling He in forum Video ConversionReplies: 1Last Post: 16th Oct 2015, 06:38 -
How to convert a VP9 video to simple AVI?
By ConverterCrazy in forum Newbie / General discussionsReplies: 1Last Post: 3rd Jul 2015, 13:25 -
VP9 encoding with latest ffmpeg
By racer-x in forum Video ConversionReplies: 3Last Post: 16th Apr 2015, 19:18 -
media coder now supports vp9 encoding...
By deadrats in forum Video ConversionReplies: 8Last Post: 12th Jan 2014, 18:56 -
Where can I find VP9 encoders or a transcoder software which has VP9 too?
By Stears555 in forum Video ConversionReplies: 8Last Post: 10th Sep 2013, 15:51