[FFmpeg-user] C:v copy h264 to mp4 blured frames problem

Carl Eugen Hoyos ceffmpeg at gmail.com
Sat Sep 28 20:16:09 EEST 2019


Am Sa., 28. Sept. 2019 um 17:58 Uhr schrieb Johanna Nilson <jnils75 at gmail.com>:
>
> Good day!
>
> I try to convert h264 file to mp4 without converting video data. I use this
> command line:
>
> ffmpeg -y -f h264 -i input.h264 -c:v copy output.mp4
> or
> ffmpeg -y -f h264 -i input.h264 -c:v copy output.avi
>
> Output:
> ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers

For future questions:
Please remember that only current FFmpeg git head is supported here.

>   built with gcc 9.1.1 (GCC) 20190807
>
>   configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray
> --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
> --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
> --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
> --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
> --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
> --enable-dxva2 --enable-avisynth --enable-libopenmpt
>   libavutil      56. 31.100 / 56. 31.100
>   libavcodec     58. 54.100 / 58. 54.100
>   libavformat    58. 29.100 / 58. 29.100
>   libavdevice    58.  8.100 / 58.  8.100
>   libavfilter     7. 57.100 /  7. 57.100
>   libswscale      5.  5.100 /  5.  5.100
>   libswresample   3.  5.100 /  3.  5.100
>   libpostproc    55.  5.100 / 55.  5.100
> Input #0, h264, from '1920x1080.h264':
>   Duration: N/A, bitrate: N/A
>     Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 30
> fps, 30 tbr, 1200k tbn, 60 tbc
> Output #0, mp4, to 'output.mp4':
>   Metadata:
>     encoder         : Lavf58.29.100
>     Stream #0:0: Video: h264 (High) (avc1 / 0x31637661),
> yuv420p(progressive), 1920x1080, q=2-31, 30 fps, 30 tbr, 1200k tbn, 1200k tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help
>
> [mp4 @ 000000143378e900] Timestamps are unset in a packet for stream 0.
> This is deprecated
> and will stop working in the future. Fix your code to set the timestamps
> properly
> frame=  271 fps=0.0 q=-1.0 Lsize=    7360kB time=00:00:09.00
> bitrate=6694.0kbits/s speed= 376x
> video:7356kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.049757%
>
> Link to input.h264 <https://ufile.io/nu973jrm> (https://ufile.io/nu973jrm)
> Link to output.mp4 <https://ufile.io/aavprii7> (https://ufile.io/aavprii7)
>
> But the output.mp4 and output.avi files have bad quality in every nth
> frame, they are blured.

As does your input sample (as expected since remuxing cannot change
the video quality).

> But when I use command line:
>
> ffmpeg -f h264 -i input.h264 -c:v copy output.h264

This command line produces a bit-identical copy of the input
file and this output file (also) has the same quality issues as
your input file.

Carl Eugen


More information about the ffmpeg-user mailing list