ffmpeg error: Too large number of skipped frames xxxxx > 60000 - ffmpeg

I try to record on RasperryPI from usb Cam (/dev/video0) using segments to obtain sliced video.
The command I'm using is:
ffmpeg -input_format mjpeg -video_size 640x480 -i /dev/video0 -y -y -f v4l2 -an -pix_fmt yuv420p -codec copy -f segment -segment_time 60 -segment_wrap 10 -t 180 stream/looper%02d.avi
I got an error after 2 minutes about skipped frames (see later for detail).
Is I run the same command without segmentation is working.
I tested on different HW, with different segment parameters, with different usb cam but the situation still the same.
Here there is the output:
ffmpeg version 4.1.4-1+rpt1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version='1+rpt1~deb10u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --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-omx-rpi --enable-mmal --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
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 40185.241073, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
[segment # 0x9800b0] Opening 'stream/looper00.avi' for writing
Output #0, segment, to 'stream/looper%02d.avi':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480, q=2-31, 25 fps, 25 tbr, 600 tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[segment # 0x9800b0] Opening 'stream/looper01.avi' for writing/A speed=1.01x
[segment # 0x9800b0] Opening 'stream/looper02.avi' for writing/A speed=1.01x
[avi # 0x9822a0] Too large number of skipped frames 72034 > 60000speed=1.01x
av_interleaved_write_frame(): Invalid argument
[avi # 0x9822a0] Too large number of skipped frames 72034 > 60000
frame= 3011 fps= 25 q=-1.0 Lsize=N/A time=00:02:00.06 bitrate=N/A speed=1.01x
I did not find any suggestion to solve it.
Could you help me?
Thanks
Dario

Related

Why did i get an error when using this ffmpeg command for 2 pass?

F:\Project>ffmpeg -y -i 2.mp4 -b:v 18M -pass 1 -an -f null NUL && ^
More? ffmpeg -i 2.mp4 -b:v 18M -pass 2 -c:a aac -b:a 128k brdown1.mp4
Used this command and got the following error. Why? any help please
ffmpeg version 4.3.2-2021-02-02-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.45.100
Duration: 10:00:36.00, start: 0.000000, bitrate: 40408 kb/s
Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 3840x2160, 40405 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 29.97 tbc (default)
Metadata:
handler_name : ?Mainconcept Video Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Output #0, null, to 'NUL':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.45.100
Stream #0:0(eng): Video: wrapped_avframe, yuv420p, 3840x2160, q=2-31, 18000 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
Metadata:
handler_name : ?Mainconcept Video Media Handler
encoder : Lavc58.91.100 wrapped_avframe
frame=1080000 fps= 36 q=-0.0 Lsize=N/A time=10:00:36.00 bitrate=N/A speed=1.19x
video:565312kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
ffmpeg version 4.3.2-2021-02-02-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.45.100
Duration: 10:00:36.00, start: 0.000000, bitrate: 40408 kb/s
Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 3840x2160, 40405 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 29.97 tbc (default)
Metadata:
handler_name : ?Mainconcept Video Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 # 000002831478e040] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 # 000002831478e040] ratecontrol_init: can't open stats file
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
If you use the null muxer, you have to specify the encoder, since the default encoder of null muxer won't match that of the MP4 muxer.
ffmpeg -y -i 2.mp4 -c:v libx264 -b:v 18M -pass 1 -an -f null NUL
Alternatively, use the MP4 muxer but make sure to keep directing the output to NUL.
ffmpeg -y -i 2.mp4 -b:v 18M -pass 1 -an -f mp4 NUL

How to transfer video as rtp stream with least delay by FFmpeg

I use AXIS M1045-LW supporting rtsp/http access, and my Windows 10 PC can access to the camera through LAN.
I would like to transfer the video as rtp with keeping H.264 codec which is supported by the camera.
Image
[Camera] == (rtsp or http) ==> [FFmpeg on Win10] == (rtp) ==>
When I accessed the camera through Google Chrome on my Win10 PC, there is only 1 or 2 sec delay.
However, when I tried access by the following command, I found over 10 sec delay.
How could I reduce the delay as much as possible?
[Windows Command Prompt A ] (sender)
C:\Users\xxxx\ffmpeg-4.3.1-2020-11-19-full_build\bin>ffmpeg -re -i rtsp://xxx:xxx#xxx.xxx.xxx.xxx/axis-media/media.amp -codec:v copy -f rtp rtp://localhost:30002 -sdp_file stream.sdp
ffmpeg version 4.3.1-2020-11-19-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, rtsp, from 'rtsp://xxx:xxx#xxx.xxx.xxx.xxx/axis-media/media.amp':
Metadata:
title : Session streamed with GStreamer
comment : rtsp-server
Duration: N/A, start: 2.979633, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709, progressive), 320x240 [SAR 1:1 DAR 4:3], 2 fps, 25 tbr, 90k tbn, 4 tbc
Output #0, rtp, to 'rtp://localhost:30002':
Metadata:
title : Session streamed with GStreamer
comment : rtsp-server
encoder : Lavf58.45.100
Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709, progressive), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 2 fps, 25 tbr, 90k tbn, 2 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[rtp # 000002da44da33c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -224986; changing to 0. This may result in incorrect timestamps in the output file.
[rtp # 000002da44da33c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -178194; changing to 0. This may result in incorrect timestamps in the output file.
[rtp # 000002da44da33c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -134998; changing to 0. This may result in incorrect timestamps in the output file.
[rtp # 000002da44da33c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -88201; changing to 0. This may result in incorrect timestamps in the output file.
[rtp # 000002da44da33c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -45002; changing to 0. This may result in incorrect timestamps in the output file.
frame= 89 fps=2.1 q=-1.0 size= 142kB time=00:00:43.01 bitrate= 27.0kbits/s speed= 1x
[Windows Command Prompt B ] (receiver)
C:\Users\xxx\ffmpeg-4.3.1-2020-11-19-full_build\bin>ffplay -protocol_whitelist "file,udp,rtp" stream.sdp
ffplay version 4.3.1-2020-11-19-full_build-www.gyan.dev Copyright (c) 2003-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[sdp # 000001832f4ecec0] decoding for stream 0 failed 0B f=0/0
Input #0, sdp, from 'stream.sdp':
Metadata:
title : Session streamed with GStreamer
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709, progressive), 320x240 [SAR 1:1 DAR 4:3], 2 fps, 2 tbr, 90k tbn, 4 tbc
[swscaler # 0000018336868d00] deprecated pixel format used, make sure you did set range correctly
127.52 M-V: -0.021 fd= 12 aq= 0KB vq= 11KB sq= 0B f=0/0

How to deal with "[asf XX] too long payload" message in ffmpeg?

I am trying to cut a small section of a video using the following sentence:
ffmpeg.exe -i video.wmv -ss 00:20:02 -to 00:20:09 -crf 22 "C:\test.mp4" -y
However, ffmpeg hangs showing messages like:
[asf # 03327b00] too long payload 0kB time=00:00:00.00 bitrate=N/A speed= 0x
Last message repeated 352 times
[asf # 03327b00] too long payload 0kB time=00:00:00.00 bitrate=N/A speed= 0x
Last message repeated 331 times
I have waited for more than 30 minutes and ffmpeg did not finish the cutting. Does anyone have any idea how to solve this?
Any suggestion will be appreciated
PD. the ffprobe output of the source file is the following:
ffprobe version N-81831-g97e7f03 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 32.100 / 55. 32.100
libavcodec 57. 60.101 / 57. 60.101
libavformat 57. 51.102 / 57. 51.102
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 63.100 / 6. 63.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 2.100 / 2. 2.100
libpostproc 54. 0.100 / 54. 0.100
[asf # 03b7afe0] too long payload
Last message repeated 159 times
Input #0, asf, from 'F:\video.wmv':
Metadata:
WMFSDKVersion : 11.0.5721.5145
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0
DeviceConformanceTemplate: M
Duration: 01:41:25.95, start: 0.000000, bitrate: 1649 kb/s
Stream #0:0(eng): Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 640x480, 1500 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 128 kb/s

FFMpeg is dropping video track when clipping an mpg video

I am extracting a clip from an mpg video using the following command.
ffmpeg.exe -i 271b.mpg -ss 00:00:05.000 -t 00:00:03.200 -c copy out_271b.mpg
I am using the copy parameter to avoid reencoding the clip.
The resulting mpg file only has the audio track, no video.
The following is the FFMpeg screen dump.
C:\ffmpeg-20170615\bin>ffmpeg.exe -i 271b.mpg -ss 00:00:05.000 -t 00:00:03.200 -c copy out_271b.mpg
ffmpeg version N-86482-gbc40674 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 66.100 / 55. 66.100
libavcodec 57. 99.100 / 57. 99.100
libavformat 57. 73.100 / 57. 73.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 92.100 / 6. 92.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Input #0, mpeg, from '271b.mpg':
Duration: 00:01:11.44, start: 0.460000, bitrate: 2154 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg, progressive), 640x480 [SAR 1:1 DAR 4:3], 2000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, mono, s16p, 128 kb/s
[mpeg # 0000000000666aa0] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'out_271b.mpg':
Metadata:
encoder : Lavf57.73.100
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bt470bg, progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 2000 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1: Audio: mp2, 44100 Hz, mono, s16p, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 74 fps=0.0 q=-1.0 Lsize= 786kB time=00:00:03.17 bitrate=2027.2kbits/s speed= 198x
video:730kB audio:50kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.843343%
Thanks
Addition: I tried to open the generated clip file with ffplay and got the following results. Note that ffplay was able to open and play the original mpg file.
ffplay.exe out_271b.mpg
ffplay version N-86482-gbc40674 Copyright (c) 2003-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 66.100 / 55. 66.100
libavcodec 57. 99.100 / 57. 99.100
libavformat 57. 73.100 / 57. 73.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 92.100 / 6. 92.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
[mpeg # 00000000023cde80] probed stream 2 failedB sq= 0B f=0/0
[mpeg # 00000000023cde80] start time for stream 0 is not set in estimate_timings_from_pts
[mpeg # 00000000023cde80] Could not find codec parameters for stream 2 (Video: none, none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpeg, from 'out_271bb.mpg':
Duration: 00:00:03.22, start: 0.500000, bitrate: 2068 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet 0KB sq= 0B f=0/0
Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, mono, s16p, 128 kb/s
Stream #0:2[0x1e0]: Video: none, none, 25 fps, 25 tbr, 90k tbn
SDL_OpenAudio (1 channels, 44100 Hz): DirectSoundCreate: No audio device found
No more combinations to try, audio open failed
No codec could be found with id 0
Failed to open file 'out_271b.mpg' or configure filtergraph

Error using ffmpeg and libvpx to encode webm from many images

The command I used was :
C:\cmd\ffmpeg\bin\ffmpeg.exe -i "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\out\out%d.png" -c:v libvpx -b:v 1M "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\video.webm" -y
The output was:
ffmpeg version N-82889-g54931fd Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 43.100 / 55. 43.100
libavcodec 57. 68.100 / 57. 68.100
libavformat 57. 61.100 / 57. 61.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, image2, from 'C:\Users\yb5243yv\Dropbox\Workspace - C#\SnowflakeGenerator\out\out%d.png':
Duration: 00:00:21.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 1000x1000 [SAR 3779:3779 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libvpx # 0000000000be89c0] v1.6.0
[libvpx # 0000000000be89c0] Transparency encoding with auto_alt_ref does not work
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> vp8 (libvpx))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
The error is:
[libvpx # 0000000000be89c0] Transparency encoding with auto_alt_ref does not work
and
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
I'm not sure exactly what is causing the issue, I followed this tutorial, however they did not mention the error. I should mention that I am not using audio, so I left the audio encoder out (I did try it with the audio encoder to make sure, and that was not the problem)
Like the error msg says, Transparency encoding with auto_alt_ref does not work, so
ffmpeg.exe -i "out%d.png" -c:v libvpx -b:v 1M -auto-alt-ref 0 "video.webm" -y

Resources