[FFmpeg-user] Using -filter_complex instead of lavfi with amerge hangs.

Nicolas George nicolas.george at normalesup.org
Tue Jun 26 12:54:06 CEST 2012


Le nonidi 9 messidor, an CCXX, Tim Nicholson a écrit :
> Trying to update some scripts to use the new filter_complex syntax, but
> am finding it hangs the process....
> 
> Original version to extract first 2 audio streams from a 4 stream file
> and convert to a single stereo stream:-
> 
> ffmpeg -i LTA01631701.mxf -f lavfi -i "
> amovie=LTA01631701.mxf:si=1 , aconvert=s16:mono:planar [a1];
> amovie=LTA01631701.mxf:si=2 , aconvert=s16:mono:planar [a2];
> [a1][a2] amerge" -map 0:0 -map 1:0 \
> -c:v dvvideo -pix_fmt yuv420p \
> -c:a pcm_s16le -ar 48k -ac 2 \
> -t 10 -y ./LTA01631701-V1.mov
> 
> 
> This works fine however:-
> 
> ffmpeg -i LTA01631701.mxf -map 0:0 -filter_complex "
> amovie=LTA01631701.mxf:si=1, aconvert=s16:mono:planar [a1];
> amovie=LTA01631701.mxf:si=2, aconvert=s16:mono:planar [a2];
> [a1] [a2] amerge" \
> -c:v dvvideo -pix_fmt yuv420p \
> -c:a pcm_s16le -ar 48k -ac 2 -t 10 -y ./LTA01631701-4-1.mov
> 
> Hangs after producing the followng console output and has to be killed
> pressing q or <CTL> q or anything less than SIGKILL is ignored.

-filter_complex is not just an alias for -f lavfi. It has inputs and
outputs. Yours has no inputs. Since ffmpeg's streams are currently
input-driven (this needs to be fixed, but this is not urgent), your filter
graph does not fit its scheduling.

Rule of thumb: do not use (a)movie with -filter_complex, use the ffmpeg -i
option instead (and second rule of thumb: do not use the same inputs several
times).

I need to add examples for amerge with -filter_complex. The syntax should be
something like that:

-i LTA01631701.mxf -filter_complex '[0.1] [0.2] amerge [audio]' \
  -map 0.0 -map '[audio]'

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120626/9ba5730e/attachment.asc>


More information about the ffmpeg-user mailing list