[FFmpeg-user] Mjpeg to h264 audio sync problem
Petr Tresnak
peter.cherry at quick.cz
Fri Dec 5 11:34:50 CET 2014
Hi,
the sound start is cut and audio is ahead even more with your command line.
ffmpeg -i mjpeg.avi -qscale 2 -strict -2 -vcodec mpeg4 -acodec aac out.mp4
encoder : Lavf56.14.100
Duration: 00:00:14.39, start: 0.092880, bitrate: 873 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 818 kb/s, 30 fps, 30 tbr, 65521 tbn, 65521 tbc (default)
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 11025 Hz, mono, fltp, 57 kb/s (default)
Here you have full console output:
ffmpeg version git-2014-11-20-e39f8fa Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 20 2014 12:58:03 with gcc 4.9.2 (Rev2, Built by MSYS2 project)
configuration: --arch=x86 --disable-debug --disable-shared --disable-doc --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avfilter --enable-
bzlib --enable-zlib --enable-librtmp --enable-gnutls --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-libbluray --enable-libcaca --enable-libop
enjpeg --enable-fontconfig --enable-libfreetype --enable-libass --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-am
rnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libsoxr --enable-libtwolame --enable-libspeex --enable-libtheora --enab
le-libutvideo --enable-libvorbis --enable-libvo-aacenc --enable-openal --enable-libopus --enable-libvidstab --enable-libvpx --enable-libwavpack --enable-libxavs
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-nonfree --enable-libfaac --enable-libfdk-aac
libavutil 54. 14.100 / 54. 14.100
libavcodec 56. 12.101 / 56. 12.101
libavformat 56. 14.100 / 56. 14.100
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'input.avi':
Metadata:
creation_time : 2005-12-30 14:13:20
encoder : CanonMVI02
Duration: 00:00:14.30, start: 0.000000, bitrate: 14883 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 14823 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, 1 channels, u8, 88 kb/s
[swscaler @ 051d8080] deprecated pixel format used, make sure you did set range correctly
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf56.14.100
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 640x480, q=2-31, 200 kb/s, 30 fps, 65521 tbn, 30 tbc
Metadata:
encoder : Lavc56.12.101 mpeg4
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 11025 Hz, mono, fltp, 64 kb/s
Metadata:
encoder : Lavc56.12.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (pcm_u8 (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 429 fps=266 q=31.0 Lsize= 1535kB time=00:00:14.30 bitrate= 879.0kbits/s
video:1428kB audio:101kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.374799%
Press any key to continue . . .
> To: ffmpeg-user at ffmpeg.org
> From: cehoyos at ag.or.at
> Date: Thu, 4 Dec 2014 08:55:54 +0000
> Subject: Re: [FFmpeg-user] Mjpeg to h264 audio sync problem
>
> Petr Tresnak <peter.cherry <at> quick.cz> writes:
>
> > sound is not synchronized.
> > ffmpeg -i mjpeg.avi -c:v libx264 -preset slow -crf 13
> > -pix_fmt yuvj420p -c:a libfdk_aac -b:a 192k output.mp4
>
> Is the issue also reproducible with the following command line?
> $ ffmpeg -i mjpeg.avi -qscale 2 -strict -2
> -vcodec mpeg4 -acodec aac out.mp4
>
> If yes, please provide the complete, uncut console output.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
More information about the ffmpeg-user
mailing list