libtheora is segfaulting, depending on the data and quality level
Tested with a 10-second yuv file dumped by mplayer from menace00.mov
trailer,
quality 0 works, higher ones segfault.
For different input files a larger range of qualities may work but higher ones (mostly) crash while the lowest ones (can) work. The behavior looks deterministic, in simple testing.
Working:
$ ffmpeg -i menace00.yuv -c:v libtheora -q:v 0 -y menace00.ogg
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (Alpine 5.3.0)
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libmp3lame --enable-librtmp --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-x11grab --disable-stripping --disable-static --enable-vaapi --enable-libopus --disable-asm --disable-debug
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, yuv4mpegpipe, from 'menace00.yuv':
Duration: 00:00:10.29, start: 0.000000, bitrate: 29308 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 480x212, SAR 1:1 DAR 120:53, 24 fps, 24 tbr, 24 tbn, 24 tbc
Output #0, ogg, to 'menace00.ogg':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: theora (libtheora), yuv420p, 480x212 [SAR 1:1 DAR 120:53], q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc
Metadata:
encoder : Lavc57.24.102 libtheora
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> theora (libtheora))
Press [q] to stop, [?] for help
frame= 247 fps=134 q=-0.0 Lsize= 57kB time=00:00:10.29 bitrate= 45.4kbits/s speed=5.59x
video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 9.283814%
Crashing:
$ ffmpeg -i menace00.yuv -c:v libtheora -q:v 1 -y menace00.ogg
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (Alpine 5.3.0)
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libmp3lame --enable-librtmp --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-x11grab --disable-stripping --disable-static --enable-vaapi --enable-libopus --disable-asm --disable-debug
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, yuv4mpegpipe, from 'menace00.yuv':
Duration: 00:00:10.29, start: 0.000000, bitrate: 29308 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 480x212, SAR 1:1 DAR 120:53, 24 fps, 24 tbr, 24 tbn, 24 tbc
Output #0, ogg, to 'menace00.ogg':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: theora (libtheora), yuv420p, 480x212 [SAR 1:1 DAR 120:53], q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc
Metadata:
encoder : Lavc57.24.102 libtheora
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> theora (libtheora))
Press [q] to stop, [?] for help
Segmentation fault
My own libtheora builds and tests with encoder_example suggest that these crashes are not related to ffmpeg but probably triggered by using xiph libraries with musl.
(from redmine: issue id 6132, created on 2016-09-12, closed on 2017-05-22)
- Changesets:
- Revision fafe26db by Timo Teräs on 2016-09-15T05:33:55Z:
main/libtheora: fix mmx/fpu usage
fixes #6132