[FFmpeg-user] FFMPEG image2 : Error setting option start_number

Gyan Doshi ffmpeg at gyani.pro
Thu Nov 5 06:05:22 EET 2020



On 05-11-2020 02:02 am, seb seb wrote:
> Sorry
>
> The complete command and the output
>
>   ffmpeg -i udp://239.100.0.1:1234 -start_number 40110891900 %d.pgm
> ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg
> developers
>    built with gcc 8 (Debian 8.3.0-6)
>    configuration: --prefix=/usr --extra-version='1~deb10u1'
>    --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
>    --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
>    --disable-stripping --enable-avresample --disable-filter=resample
>    --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom
>    --enable-libass --enable-libbluray --enable-libbs2b
>    --enable-libcaca --enable-libcdio --enable-libcodec2
>    --enable-libflite --enable-libfontconfig --enable-libfreetype
>    --enable-libfribidi --enable-libgme --enable-libgsm
>    --enable-libjack --enable-libmp3lame --enable-libmysofa
>    --enable-libopenjpeg --enable-libopenmpt --enable-libopus
>    --enable-libpulse --enable-librsvg --enable-librubberband
>    --enable-libshine --enable-libsnappy --enable-libsoxr
>    --enable-libspeex --enable-libssh --enable-libtheora
>    --enable-libtwolame --enable-libvidstab --enable-libvorbis
>    --enable-libvpx --enable-libwavpack --enable-libwebp
>    --enable-libx265 --enable-libxml2 --enable-libxvid
>    --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx
>    --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394
>    --enable-libdrm --enable-libiec61883 --enable-chromaprint
>    --enable-frei0r --enable-libx264 --enable-shared
>    libavutil      56. 22.100 / 56. 22.100
>    libavcodec     58. 35.100 / 58. 35.100
>    libavformat    58. 20.100 / 58. 20.100
>    libavdevice    58.  5.100 / 58.  5.100
>    libavfilter     7. 40.101 /  7. 40.101
>    libavresample   4.  0.  0 /  4.  0.  0
>    libswscale      5.  3.100 /  5.  3.100
>    libswresample   3.  3.100 /  3.  3.100
>    libpostproc    55.  3.100 / 55.  3.100
> [mpeg2video @ 0x55c688a24fc0] Invalid frame dimensions 0x0.
>      Last message repeated 14 times
> Input #0, mpegts, from 'udp://239.100.0.1:1234':
>    Duration: N/A, start: 30980.017933, bitrate: N/A
>    Program 2
>      Metadata:
>        service_name    : ?TIPIK
>        service_provider: ?RTBF
>      Stream #0:0[0x1f4]: Video: mpeg2video (Main)
> ([2][0][0][0] / 0x0002), yuv420p(tv, top first),
> 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
>      Stream #0:1[0x1f5](fra): Audio: mp2 ([3][0][0][0] / 0x0003),
> 48000 Hz, stereo, fltp, 192 kb/s
>      Stream #0:2[0x1f6](V.O): Audio: mp2 ([3][0][0][0] / 0x0003),
> 48000 Hz, stereo, fltp, 192 kb/s
>      Stream #0:3[0x1f8](fra): Subtitle: dvb_teletext ([6][0][0][0] /
> 0x0006)
> Stream mapping:
>    Stream #0:0 -> #0:0 (mpeg2video (native) -> pgm (native))
> Press [q] to stop, [?] for help



> [image2 muxer @ 0x55c688a9c3c0] Value 40110891900.000000 for
> parameter 'start_number' out of range [0 - 2.14748e+09]
> [image2 muxer @ 0x55c688a9c3c0] Error setting option start_number
> to value 40110891900.

The start number is limited to max 2^31-1 as it says above. Yours is 
close to 20 times that value.

Simply change it to

     -start_number 10891900 401%08d.pgm

This will work, assuming you don't have around 90 million images to write.

Regards,
Gyan


More information about the ffmpeg-user mailing list