[FFmpeg-user] Better way to merge audio and video? (ffmpeg 1.2.1)
John Crossman
johncrossman at berkeley.edu
Mon Jul 22 23:49:21 CEST 2013
On Mon, Jul 22, 2013 at 2:38 PM, Lou <lou at lrcd.com> wrote:
> > Is the following the best I can do? My current wait for process to finish
> > seems too long.
>
> What are you trying to do?
>
Merge the audio and video into a single video track (i.e., output.mp4)
> > *ffmpeg -i audio.mp2 -i video.mp4 -qscale 0 -shortest -strict
> experimental
> > output.mp4
> > *
> >
> > Also, should I replace '-qscale 0' with '-q:v 0'?
>
> You did not include the complete console output. Note that the default
> encoder used for mp4 output (libx264 or mpeg4) depends on your ffmpeg
> configuration, and libx264 ignores "-qscale", but you did not provide
> enough information for me to give you any suggestions.
>
*Output is below. *Note: this is a job in progress so you don't get final
summary.* *I can send that once it is done.
*
*
/usr/bin/ffmpeg -i /export/mh_data/.../1013/audio.mp2 -i
/export/mh_data/.../1013/screen.mp4 -qscale 0 -shortest -strict
experimental
/export/mh_data/.../1013/screen_804358ef-3eff-41ef-9f90-fa24144a17ab-work2.mp4
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on May 10 2013 15:14:14 with gcc 4.4.6 (GCC) 20120305 (Red Hat
4.4.6-4)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect
--enable-gpl --enable-version3 --enable-postproc --enable-avfilter
--enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth
--enable-frei0r --enable-libopencv --enable-libdc1394 --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[mp3 @ 0x12f5b60] max_analyze_duration 5000000 reached at 5015510
microseconds
[mp3 @ 0x12f5b60] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from
'/export/mh_data/opencast/shared/workspace/collection/1013/audio.mp2':
Duration: 01:19:52.53, start: 0.000000, bitrate: 192 kb/s
Stream #0:0: Audio: mp2, 44100 Hz, stereo, s16p, 192 kb/s
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from
'/export/mh_data/opencast/shared/workspace/collection/1013/screen.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41isomiso2
creation_time : 2013-07-22 19:31:00
Duration: 01:19:59.64, start: 0.000000, bitrate: 1157 kb/s
Stream #1:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p, 1024x768 [SAR 1:1 DAR 4:3], 1151 kb/s, 100 fps, 100
tbr, 1k tbn, 1073741824 tbc
Metadata:
creation_time : 2013-07-22 19:31:00
handler_name : VideoHandler
Please use -q:a or -q:v, -qscale is ambiguous
[libx264 @ 0x1307880] using SAR=1/1
[libx264 @ 0x1307880] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x1307880] profile High, level 4.2
[libx264 @ 0x1307880] 264 - core 130 - H.264/MPEG-4 AVC codec - Copyleft
2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3
deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1
weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to
'/export/mh_data/opencast/shared/workspace/collection/1013/screen_804358ef-3eff-41ef-9f90-fa24144a17ab-work2.mp4':
Metadata:
encoder : Lavf54.63.104
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
1024x768 [SAR 1:1 DAR 4:3], q=-1--1, 12800 tbn, 100 tbc
Metadata:
creation_time : 2013-07-22 19:31:00
handler_name : VideoHandler
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo,
fltp, 128 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (h264 -> libx264)
Stream #0:0 -> #0:1 (mp2 -> aac)
Press [q] to stop, [?] for help
frame= 6820 fps=120 q=33.0 size= 7924kB time=00:01:07.70 bitrate=
958.7kbits/s
More information about the ffmpeg-user
mailing list