[FFmpeg-trac] #10256(undetermined:new): ffmpeg incorrectly classifies .yuv input format as "gsm"
FFmpeg
trac at avcodec.org
Tue Mar 14 04:22:17 EET 2023
#10256: ffmpeg incorrectly classifies .yuv input format as "gsm"
-------------------------------------+-------------------------------------
Reporter: Martin | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: gsm | Blocked By:
rawvideo yuv .yuv |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Input a raw 4:2:0 .yuv, attempting to pad black pixels
ffmpeg classifies the image as "gsm", then fails to parse image dimensions
supplied, using either "-s WxH" or "-video_size WxH"
How to reproduce:
{{{
%
ffmpeg -y -v 99 -pix_fmt yuv420p -video_size 1882x1062 -i
"problem_file.yuv"
-vf "pad=iw+16:ih+8:0:0:color=0x000000, format=pix_fmts=yuv420p"
"problem_file_pad.yuv"
ffmpeg version 4.4.1-static https://johnvansickle.com/ffmpeg/ Copyright
(c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-
debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio
--cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp
--enable-libgme --enable-gray --enable-libaom --enable-libfribidi
--enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid
--enable-libzvbi --enable-libzimg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files)
with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument '99'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv420p'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '1882x1062'.
Reading option '-i' ... matched as input url with argument
'problem_file.yuv'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with
argument 'pad=iw+16:ih+8:0:0:color=0x000000, format=pix_fmts=yuv420p'.
Reading option 'problem_file_pad.yuv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option v (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input url problem_file.yuv.
Applying option pix_fmt (set pixel format) with argument yuv420p.
Successfully parsed a group of options.
Opening an input file: problem_file.yuv.
[NULL @ 0x6f601c0] Opening 'problem_file.yuv' for reading
[file @ 0x6f60f00] Setting default whitelist 'file,crypto,data'
Probing gsm score:51 size:2048
[gsm @ 0x6f601c0] Format gsm probed with size=2048 and score=51
st:0 removing common factor 160 from timebase
Option video_size not found.
}}}
Notes: This error only occurs with one of my images out 166.
Workaround: Add input file option "-f rawvideo" to force ffmpeg to
classify the input image format as "rawvideo".
{{{
ffmpeg -y -v 99 -pix_fmt yuv420p -f rawvideo -video_size 1882x1062 -i
"problem_file.yuv"
-vf "pad=iw+16:ih+8:0:0:color=0x000000, format=pix_fmts=yuv420p"
"problem_file_pad.yuv"
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10256>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list