ffmpeg VP9 file won't play in Firefox, but will play in other media players

317 views
Skip to first unread message

Wouter Verhelst

unread,
Aug 24, 2017, 1:31:18 PM8/24/17
to WebM Discussion
Hi,

I'm trying to transcode the videos from DebConf17 into VP9, but I'm having issues with doing so.

My transcode script (written in perl) currently does the following:

# VP8
system("ffmpeg -y -i $outputdir/$slug.ts -pass 1 -passlogfile $tmpdir/passlog-vp8 -c:v libvpx -crf 10 -qmin 0 -qmax 20 -b:v 1M -c:a libvorbis $outputdir/$slug.vp8.webm");
system("ffmpeg -y -i $outputdir/$slug.ts -pass 2 -passlogfile $tmpdir/passlog-vp8 -c:v libvpx -crf 10 -qmin 0 -qmax 20 -b:v 1M -c:a libvorbis -metadata \"title=$title\" -metadata \"event=$event\" -metadata \"language=eng\" -metadata \"speakers=$speakers\" -metadata \"track=$track\" -metadata \"date=$startdate\" $outputdir/$slug.vp8.webm");
# VP9
system("ffmpeg -y -i $outputdir/$slug.ts -pass 1 -passlogfile $tmpdir/passlog-vp9 -c:v libvpx-vp9 -crf 32 -b:v 1024k -minrate 512k -maxrate 1485k -c:a libopus -quality good -speed 4 -g 240 -tile-columns 2 -threads 4 $outputdir/$slug.vp9.webm");
system("ffmpeg -y -i $outputdir/$slug.ts -pass 2 -passlogfile $tmpdir/passlog-vp9 -c:v libvpx-vp9 -crf 32 -b:v 1024k -minrate 512k -maxrate 1485k -c:a libopus -quality good -speed 2 -g 240 -tile-columns 2 -threads 4 -metadata \"title=$title\" -metadata \"event=$event\" -metadata \"language=eng\" -metadata \"speakers=$speakers\" -metadata \"track=$track\" -metadata \"date=$startdate\" $outputdir/$slug.vp9.webm");

The resulting VP8 files play in everything I throw at it. The VP9 files play in Chromium, mpv, and vlc (at least), but Firefox claims the files are "corrupt", also in Firefox nightly.

For an example of such a file, see https://people.debian.org/~wouter/business-erp-freelancer-and-personal-acc.vp8.webm (and ...vp9.webm for the VP9 version).

Is this a bug in ffmpeg, a bug in Firefox, or did I do something wrong?

Thanks,

James Zern

unread,
Aug 24, 2017, 6:15:12 PM8/24/17
to WebM Discussion
Hi,
These command lines look all right aside from the comment below.

> The resulting VP8 files play in everything I throw at it. The VP9 files play
> in Chromium, mpv, and vlc (at least), but Firefox claims the files are
> "corrupt", also in Firefox nightly.
>

I actually saw failures in chromium as well from tip of tree and
chrome at M60. The reason seems to be the source is 422 which vp9
supports (vp8 will be downsampled to 420). Neither chrome or firefox
support this output, however.
Stream #0:0: Video: vp9 (Profile 1), yuv422p(tv, progressive), 1280x720, ...
You can force the pixel format at encode time (-pix_fmt yuv420p) to
work around the issue.

> For an example of such a file, see
> https://people.debian.org/~wouter/business-erp-freelancer-and-personal-acc.vp8.webm
> (and ...vp9.webm for the VP9 version).
>
> Is this a bug in ffmpeg, a bug in Firefox, or did I do something wrong?
>
> Thanks,
>
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to webm-discuss...@webmproject.org.
> To post to this group, send email to webm-d...@webmproject.org.
> Visit this group at
> https://groups.google.com/a/webmproject.org/group/webm-discuss/.
> For more options, visit
> https://groups.google.com/a/webmproject.org/d/optout.

Wouter Verhelst

unread,
Aug 25, 2017, 8:50:07 AM8/25/17
to WebM Discussion
Hi,

Op vrijdag 25 augustus 2017 00:15:12 UTC+2 schreef James Zern:
[...]

I actually saw failures in chromium as well from tip of tree and
chrome at M60. The reason seems to be the source is 422 which vp9
supports (vp8 will be downsampled to 420). Neither chrome or firefox
support this output, however.
Stream #0:0: Video: vp9 (Profile 1), yuv422p(tv, progressive), 1280x720, ...
You can force the pixel format at encode time (-pix_fmt yuv420p) to
work around the issue.

Re-encoding that file with those options seemed to fix it, yes. Thanks!
Reply all
Reply to author
Forward
0 new messages