[FFmpeg-user] merged video fails to play

a b microspam at list.ru
Thu Oct 9 13:13:17 CEST 2014


I have a PNG image and a video file and I want to merge them together into one video file. All of the work should be done under Linux.
1. The PNG image has 1280x720 resolution and I converted it to *.mp4 file using the following command:
$ ffmpeg -loop 1 -r 24 -i image.png -t 00:00:05 -vcodec h264 -pix_fmt yuv420p -an image.mp4

2. The video was created via pipe using the following command (pay attention to its last line):
$ gource -s 2 --auto-skip-seconds 0.1 --file-idle-time 0 --max-files 500 --multi-sampling --bloom-multiplier 0.9 \
--bloom-intensity 0.4 -1280x720 --stop-at-end --output-ppm-stream - history.xml \
| ffmpeg -y -r 24 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p video.mp4

3. Then I merged them in one video. The list of input files:
$ cat files.txt
file 'image.mp4'
file 'video.mp4'

This command was used to concatenate the files:
$ ffmpeg -f concat -i files.txt -c:v copy result.mp4

This command printed the following message, not sure if it is important:
[concat @ 0xc83b90] Estimating duration from bitrate, this may be inaccurate

4. Finally, I open result video with mplayer. I see the first image for 5 seconds, as expected. Then, when the second video should start, mplayer "hangs" and the following messages appear in the console:
[h264 @ 0x7f8e00260520]deblocking_filter_idc 16 out of range
[h264 @ 0x7f8e00260520]decode_slice_header error
[h264 @ 0x7f8e00260520]Missing reference picture, default is 65539
[h264 @ 0x7f8e00260520]Missing reference picture, default is 65539
...
[h264 @ 0x7f8e00260520]cabac_init_idc 32 overflow
[h264 @ 0x7f8e00260520]decode_slice_header error
[h264 @ 0x7f8e00260520]illegal reordering_of_pic_nums_idc
[h264 @ 0x7f8e00260520]decode_slice_header error
[h264 @ 0x7f8e00260520]abs_diff_pic_num overflow
...
[h264 @ 0x7f8e00260520]top block unavailable for requested intra mode at 3 0
[h264 @ 0x7f8e00260520]error while decoding MB 3 0, bytestream 2463
[h264 @ 0x7f8e00260520]number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 0x7f8e00260520]Cannot use next picture in error concealment
[h264 @ 0x7f8e00260520]concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7f8e00260520]number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 0x7f8e00260520]Cannot use next picture in error concealment
[h264 @ 0x7f8e00260520]concealing 3571 DC, 3571 AC, 3571 MV errors in P frame
...
[h264 @ 0x7f8e00260520]top block unavailable for requested intra4x4 mode -1 at 59 0
...
[h264 @ 0x7f8e00260520]deblocking_filter_idc 3 out of range
[h264 @ 0x7f8e00260520]decode_slice_header error
[h264 @ 0x7f8e00260520]Missing reference picture, default is 65536
[h264 @ 0x7f8e00260520]Missing reference picture, default is 65536
[h264 @ 0x7f8e00260520]Reference 5 >= 4
[h264 @ 0x7f8e00260520]error while decoding MB 49 0, bytestream 50981
[h264 @ 0x7f8e00260520]Cannot use next picture in error concealment
[h264 @ 0x7f8e00260520]concealing 3600 DC, 3600 AC, 3600 MV errors in P frame


Any ideas what could be wrong?

Here is ffmpeg's info about my video files:

$ ffmpeg -i image.mp4
[h264 @ 0x8e2f40] Warning: not compiled with thread support, using thread emulation
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'image.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:00:03.00, start: 0.000000, bitrate: 46 kb/s
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1280x720 [SAR 1260:1273 DAR 2240:1273], 41 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler

$ ffmpeg -i video.mp4
[h264 @ 0x15e7f30] Warning: not compiled with thread support, using thread emulation
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:19:17.38, start: 0.000000, bitrate: 2646 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 2645 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler

$ ffmpeg -i result.mp4
[h264 @ 0x119bf30] Warning: not compiled with thread support, using thread emulation
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'result.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:19:22.46, start: 0.000000, bitrate: 2635 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1260:1273 DAR 2240:1273], 2634 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler

ffmpeg info:
$ ffmpeg version 2.2.7
built on Oct 4 2014 16:07:27 with gcc 4.7.3 (Gentoo 4.7.3-r1 p1.4, pie-0.5.5)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=native -mtune=native -mmmx -msse -msse2 -msse4.1 -msse4.2 -mssse3 -maes -mpclmul -mf16c -mfma -mabm -mbmi -mbmi2' --extra-cflags='-O2 -pipe -march=native -mtune=native -mmmx -msse -msse2 -msse4.1 -msse4.2 -mssse3 -maes -mpclmul -mf16c -mfma -mabm -mbmi -mbmi2' --extra-cxxflags='-O2 -pipe -march=native -mtune=native -mmmx -msse -msse2 -msse4.1 -msse4.2 -mssse3 -maes -mpclmul -mf16c -mfma -mabm -mbmi -mbmi2' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --disable-indev=oss --disable-indev=jack --disable-outdev=oss --disable-outdev=sdl --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --disable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libaacplus --disable-libfaac --disable-libtheora --disable-libtwolame --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libcdio --disable-libiec61883 --disable-libdc1394 --enable-libcaca --disable-openal --enable-opengl --enable-libv4l2 --disable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-ladspa --enable-libass --disable-libfreetype --disable-libsoxr --disable-pthreads --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --disable-libvorbis --disable-libvpx --disable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --disable-sse3 --disable-sse4 --cpu=host
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100



More information about the ffmpeg-user mailing list