[FFmpeg-user] VP9 HLS

Romain Beauxis romain.beauxis at gmail.com
Wed Jul 19 18:16:37 EEST 2023


Le mer. 19 juil. 2023 à 10:05, Geoff Flarity <geoff.flarity at gmail.com> a
écrit :
>
> Hi,
>
> First thanks to the community of anyone who's contributed to ffmpeg and
its
> community in any way. How foundational it is to anything computer media
> can't be overstated.
>
> I'd like to be able to publish codec royalty-free bitrate/resolution
> adaptive VODs that work with hls.js or other similar open source players.
I
> can get this working with MPEG-DASH, but it's not supported by apple
> products unfortunately.
>
> For the life of me I can't get it working using my ARM mac. Here's a
> simplified example of what I've tried, I can include a link to the files
if
> that helps as well.
>
> With libx264, which isn't royalty free, the following works perfectly:
>
> ffmpeg -i ../Big_Buck_Bunny_1080_10s_30MB.mp4 -c:v libx264  -f hls
test.m3u8
>
>
> However if I switch the codec to libvpx-vp9 does not:
>
> ffmpeg -i ../Big_Buck_Bunny_1080_10s_30MB.mp4 -c:v libvpx-vp9  -f hls
> > foo.m3u8
>
>
> Here's the full output from the command, but obviously "Stream 0, codec
> vp9, is muxed as a private data stream and may not be recognized upon
> reading." stands out. I just have no idea what this means and I couldn't
> find anything after a bit of googling.

Looks like this codec is not supported inside mpegts bitstreams:
https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/mpegtsenc.c#L452

You should see if the mp4 container can support them.

BTW, are the mpeg containers (mpegts, mp4) royalty-free?

> (base) geoff at geoffreys-mbp test % ffmpeg -i
> > ../Big_Buck_Bunny_1080_10s_30MB.mp4 -c:v libvpx-vp9  -f hls foo.m3u8
> > ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
> >   built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
> >   configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0
--enable-shared
> > --enable-pthreads --enable-version3 --cc=clang --host-cflags=
> > --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl
> > --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d
> > --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist
> > --enable-librubberband --enable-libsnappy --enable-libsrt
> > --enable-libsvtav1 --enable-libtesseract --enable-libtheora
> > --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx
> > --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
> > --enable-libxvid --enable-lzma --enable-libfontconfig
--enable-libfreetype
> > --enable-frei0r --enable-libass --enable-libopencore-amrnb
> > --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex
> > --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack
> > --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
> > --enable-neon
> >   libavutil      58.  2.100 / 58.  2.100
> >   libavcodec     60.  3.100 / 60.  3.100
> >   libavformat    60.  3.100 / 60.  3.100
> >   libavdevice    60.  1.100 / 60.  1.100
> >   libavfilter     9.  3.100 /  9.  3.100
> >   libswscale      7.  1.100 /  7.  1.100
> >   libswresample   4. 10.100 /  4. 10.100
> >   libpostproc    57.  1.100 / 57.  1.100
> > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> > '../Big_Buck_Bunny_1080_10s_30MB.mp4':
> >   Metadata:
> >     major_brand     : isom
> >     minor_version   : 512
> >     compatible_brands: isomiso2avc1mp41
> >     title           : Big Buck Bunny, Sunflower version
> >     artist          : Blender Foundation 2008, Janus Bager Kristensen
2013
> >     composer        : Sacha Goedegebure
> >     encoder         : Lavf57.63.100
> >     comment         : Creative Commons Attribution 3.0 -
> > http://bbb3d.renderfarming.net
> >     genre           : Animation
> >   Duration: 00:00:10.00, start: 0.000000, bitrate: 24563 kb/s
> >   Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
> > yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 24559 kb/s, 30 fps,
30
> > tbr, 15360 tbn (default)
> >     Metadata:
> >       handler_name    : VideoHandler
> >       vendor_id       : [0][0][0][0]
> > Stream mapping:
> >   Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
> > Press [q] to stop, [?] for help
> > [libvpx-vp9 @ 0x135705610] v1.13.0
> > [libvpx-vp9 @ 0x135705610] Neither bitrate nor constrained quality
> > specified, using default CRF of 32
> > Output #0, hls, to 'foo.m3u8':
> >   Metadata:
> >     major_brand     : isom
> >     minor_version   : 512
> >     compatible_brands: isomiso2avc1mp41
> >     title           : Big Buck Bunny, Sunflower version
> >     artist          : Blender Foundation 2008, Janus Bager Kristensen
2013
> >     composer        : Sacha Goedegebure
> >     genre           : Animation
> >     comment         : Creative Commons Attribution 3.0 -
> > http://bbb3d.renderfarming.net
> >     encoder         : Lavf60.3.100
> >   Stream #0:0(und): Video: vp9, yuv420p(progressive), 1920x1080 [SAR 1:1
> > DAR 16:9], q=2-31, 30 fps, 90k tbn (default)
> >     Metadata:
> >       handler_name    : VideoHandler
> >       vendor_id       : [0][0][0][0]
> >       encoder         : Lavc60.3.100 libvpx-vp9
> >     Side data:
> >       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
> > [mpegts @ 0x135605f00] Stream 0, codec vp9, is muxed as a private data
> > stream and may not be recognized upon reading.
> > [hls @ 0x135704890] Opening 'foo0.ts' for writing.20 bitrate=N/A
> > speed=0.202x
> > [hls @ 0x135704890] Opening 'foo.m3u8.tmp' for writing
> > [hls @ 0x135704890] Opening 'foo1.ts' for writing.46 bitrate=N/A
> > speed=0.202x
> > [hls @ 0x135704890] Opening 'foo.m3u8.tmp' for writing
> > [hls @ 0x135704890] Opening 'foo2.ts' for writing.13 bitrate=N/A
> > speed=0.204x
> > [hls @ 0x135704890] Opening 'foo.m3u8.tmp' for writing
> > frame=  300 fps=6.1 q=32.0 Lsize=N/A time=00:00:09.96 bitrate=N/A
> > speed=0.203x
> > video:6051kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> > muxing overhead: unknown
>
>
> Thanks!
> Geoff
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list