[FFmpeg-trac] #6884(undetermined:new): Crash if libvmaf model file has DOS line endings or can't be found
FFmpeg
trac at avcodec.org
Thu Nov 30 12:54:28 EET 2017
#6884: Crash if libvmaf model file has DOS line endings or can't be found
-------------------------------------+-------------------------------------
Reporter: Gyan | Type: defect
Status: new | Priority: important
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I've compiled ffmpeg with libvmaf on Windows using MinGW. The filter works
fine if the model file is found and has Unix line endings, otherwise it
crashes.
'''Command 1''' - with no filter options passed to libvmaf so it looks in
default path for model file, which isn't there.
{{{
ffmpeg -i t:\anyfile.mp4 -lavfi [0][0]libvmaf -f null -
}}}
Log is pasted verbatim (with mangled character printing)
{{{
ffmpeg version N-89341-g0137386fc1-2017-11-30 Copyright (c) 2000-2017 the
FFmpeg developers
built with gcc 6.3.0 (x86_64-posix-sjlj-rev1, Built by MinGW-W64
project)
configuration: --disable-everything --disable-ffplay --disable-ffprobe
--disable-doc --enable-protocols --enable-demuxer=image2 --enable-
demuxer=matroska --enable-demuxer=mov --enable-demuxer=mpegts --enable-
demuxer=rawvideo --enable-demuxer=wav --enable-decoder=aac --enable-
decoder=h264 --enable-decoder=mjpeg --enable-decoder=mp3 --enable-
decoder=mpeg4 --enable-decoder=pcm_s16le --enable-decoder=png --enable-
decoder=rawvideo --enable-filter=libvmaf --enable-encoder=pcm_s16le
--enable-encoder=png --enable-encoder=rawvideo --enable-
encoder=wrapped_avframe --enable-muxer=image2 --enable-muxer=null
--enable-muxer=nut --enable-muxer=rawvideo --enable-muxer=wav --enable-
outdev=sdl2 --enable-libvmaf --disable-w32threads --enable-pthreads
--enable-static --disable-shared --extra-ldflags=-static --pkg-config-
flags=--static --enable-gpl --enable-version3 --extra-version=2017-11-30
--disable-hwaccel-libs
libavutil 56. 4.100 / 56. 4.100
libavcodec 58. 6.102 / 58. 6.102
libavformat 58. 2.103 / 58. 2.103
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 5.100 / 7. 5.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 't:\anyfile.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.2.100
Duration: 00:00:01.00, start: 0.000000, bitrate: 295 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
320x240 [SAR 1:1 DAR 4:3], 286 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
(default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 (h264) -> libvmaf:main
Stream #0:0 (h264) -> libvmaf:reference
libvmaf -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':S
t Metadata:
a major_brand : risomt
minor_version : c51a2l
c compatible_brands:u lisomiso2avc1mp41a
t encoder : iLavf58.2.103n
g Stream #0: 0V: Video: wrapped_avframe, yuv420p, 320x240 [SAR 1:1 DAR
4:3], q=2-31, 200 kb/sM, A25 fps, F25 tbn, 25 tbcs (default)c
o Metadata:
r encoder : eLavc58.6.102 wrapped_avframe.
..
Input model at /usr/local/share/model/vmaf_v0.6.1.pkl cannot be read
successfully.
terminate called after throwing an instance of 'VmafException'
what(): Error loading model (.pkl): Trouble reading the
file:/usr/local/share/model/vmaf_v0.6.1.pkl
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
}}}
Windows Problem Signature
{{{
Problem Event Name: APPCRASH
Application Name: ffmpeg.exe
Application Version: 0.0.0.0
Application Timestamp: 0026ff60
Fault Module Name: ffmpeg.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 0026ff60
Exception Code: 40000015
Exception Offset: 0000000000518c6e
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 4853
Additional Information 2: 48531a60e339689f315ee0b09464db2c
Additional Information 3: 5b25
Additional Information 4: 5b2547d963930beee67fa94195b51bca
}}}
'''Command 2''' - correct model path specified. Model file is that checked
out from VMAF repo, and has CRLF endings. Git repo was set to
`eol.mode=lf` before cloning.
{{{
ffmpeg -i t:\anyfile.mp4 -lavfi [0][0]libvmaf='C\:\\avutils\\ffmpeg-
libs\\compiled\\share\\model\\vmaf_v0.6.1.pkl' -f null -
}}}
Log
{{{
ffmpeg version N-89341-g0137386fc1-2017-11-30 Copyright (c) 2000-2017 the
FFmpeg developers
built with gcc 6.3.0 (x86_64-posix-sjlj-rev1, Built by MinGW-W64
project)
configuration: --disable-everything --disable-ffplay --disable-ffprobe
--disable-doc --enable-protocols --enable-demuxer=image2 --enable-
demuxer=matroska --enable-demuxer=mov --enable-demuxer=mpegts --enable-
demuxer=rawvideo --enable-demuxer=wav --enable-decoder=aac --enable-
decoder=h264 --enable-decoder=mjpeg --enable-decoder=mp3 --enable-
decoder=mpeg4 --enable-decoder=pcm_s16le --enable-decoder=png --enable-
decoder=rawvideo --enable-filter=libvmaf --enable-encoder=pcm_s16le
--enable-encoder=png --enable-encoder=rawvideo --enable-
encoder=wrapped_avframe --enable-muxer=image2 --enable-muxer=null
--enable-muxer=nut --enable-muxer=rawvideo --enable-muxer=wav --enable-
outdev=sdl2 --enable-libvmaf --disable-w32threads --enable-pthreads
--enable-static --disable-shared --extra-ldflags=-static --pkg-config-
flags=--static --enable-gpl --enable-version3 --extra-version=2017-11-30
--disable-hwaccel-libs
libavutil 56. 4.100 / 56. 4.100
libavcodec 58. 6.102 / 58. 6.102
libavformat 58. 2.103 / 58. 2.103
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 5.100 / 7. 5.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 't:\anyfile.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.2.100
Duration: 00:00:01.00, start: 0.000000, bitrate: 295 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
320x240 [SAR 1:1 DAR 4:3], 286 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
(default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 (h264) -> libvmaf:main
Stream #0:0 (h264) -> libvmaf:reference
libvmaf -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
SOutput #0, null, to 'pipe:':
ta Metadata:
major_brand : rtisom
c minor_version : a51l2c
u compatible_brands:l aisomiso2avc1mp41t
i encoder : nLavf58.2.103g
Stream #0:V0M: Video: wrapped_avframe, yuv420p, 320x240 [SAR 1:1 DAR
4:3], q=2-31, 200 kb/sA, F25 fps, 25 tbn, s25 tbcc (default)o
r Metadata:
e encoder : .Lavc58.6.102 wrapped_avframe.
.
Input model at C:\avutils\ffmpeg-libs\compiled\share\model\vmaf_v0.6.1.pkl
cannot be read successfully.
terminate called after throwing an instance of 'VmafException'
what(): Error loading model (.pkl): No newline at end o string
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
}}}
Windows
{{{
Problem Event Name: APPCRASH
Application Name: ffmpeg.exe
Application Version: 0.0.0.0
Application Timestamp: 0026ff60
Fault Module Name: ffmpeg.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 0026ff60
Exception Code: 40000015
Exception Offset: 0000000000518c6e
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 4853
Additional Information 2: 48531a60e339689f315ee0b09464db2c
Additional Information 3: 5b25
Additional Information 4: 5b2547d963930beee67fa94195b51bca
}}}
'''Command 3''' - same command as above, after running `dos2unix` on the
model file
{{{
ffmpeg version N-89341-g0137386fc1-2017-11-30 Copyright (c) 2000-2017 the
FFmpeg developers
built with gcc 6.3.0 (x86_64-posix-sjlj-rev1, Built by MinGW-W64
project)
configuration: --disable-everything --disable-ffplay --disable-ffprobe
--disable-doc --enable-protocols --enable-demuxer=image2 --enable-
demuxer=matroska --enable-demuxer=mov --enable-demuxer=mpegts --enable-
demuxer=rawvideo --enable-demuxer=wav --enable-decoder=aac --enable-
decoder=h264 --enable-decoder=mjpeg --enable-decoder=mp3 --enable-
decoder=mpeg4 --enable-decoder=pcm_s16le --enable-decoder=png --enable-
decoder=rawvideo --enable-filter=libvmaf --enable-encoder=pcm_s16le
--enable-encoder=png --enable-encoder=rawvideo --enable-
encoder=wrapped_avframe --enable-muxer=image2 --enable-muxer=null
--enable-muxer=nut --enable-muxer=rawvideo --enable-muxer=wav --enable-
outdev=sdl2 --enable-libvmaf --disable-w32threads --enable-pthreads
--enable-static --disable-shared --extra-ldflags=-static --pkg-config-
flags=--static --enable-gpl --enable-version3 --extra-version=2017-11-30
--disable-hwaccel-libs
libavutil 56. 4.100 / 56. 4.100
libavcodec 58. 6.102 / 58. 6.102
libavformat 58. 2.103 / 58. 2.103
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 5.100 / 7. 5.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 't:\anyfile.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.2.100
Duration: 00:00:01.00, start: 0.000000, bitrate: 295 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
320x240 [SAR 1:1 DAR 4:3], 286 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
(default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 (h264) -> libvmaf:main
Stream #0:0 (h264) -> libvmaf:reference
libvmaf -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':St
Metadata:
ar major_brand : isomt
minor_version : ca512lc
compatible_brands:ul isomiso2avc1mp41at
encoder : inLavf58.2.103
g Stream #0:V0M: Video: wrapped_avframe, yuv420p, 320x240 [SAR 1:1 DAR
4:3], q=2-31, 200 kb/sA, F 25 fps, 25 tbn, sc25 tbc (defauolt)r
e Metadata:
. encoder : .Lavc58.6.102 wrapped_avframe.
frame= 25 fps=0.0 q=-0.0 Lsize=N/A time=00:00:01.00 bitrate=N/A
speed=2.67x
video:13kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Exec FPS: 66.133787
VMAF score = 99.896002
[libvmaf @ 000000000030b320] VMAF score: 99.896002
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6884>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list