[FFmpeg-user] C:v copy h264 to mp4 blured frames problem
Johanna Nilson
jnils75 at gmail.com
Sat Sep 28 18:58:13 EEST 2019
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
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-libfree
type --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-lib
openjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-li
btheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-l
ibx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
--enable-zlib --ena
ble-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa -
-enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-amf --enable-ffn
vcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enabl
e-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= 3
76x
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.
But when I use command line:
ffmpeg -f h264 -i input.h264 -c:v copy output.h264
I have no problems with corrupted frames. Can anyone from skilled ffmpeg
specialists explain the nature of this problem and advice what can I do to
get a good copy of this file in mp4 format, so that all frames are not
blurred. The same problem I have with streams from h264 to mpegts. And it
is very important to copy (-c:v copy) h264 data, not to convert.
More information about the ffmpeg-user
mailing list