VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Nov 2006
    Location
    Washington, USA
    Search Comp PM
    The command line syntax for ffmpeg can be a bit confusing. My intent is to have the final output file to have the streams as follows:
    0 = input file first video stream
    1 = input file first audio file with no filtering
    2 = input file first audio file with filtering to change pitch
    3+ = input file subtitle streams (copied)

    by using the ffmpeg command
    ffmpeg -y -i input.mkv -i -map 0:v:0 -map 0:a:0 -map 0:a:0 -map 0:s -c:0 copy -c:1 copy -c:2 ac3 -b:2 640K -af:2 "rubberband=pitch=0.5:pitchq=quality" -c:s copy output.mkv

    When I use the command above I get the following error message:
    Filtergraph 'rubberband=pitch=0.5:pitchq=quality' was defined for audio output stream 0:1 but codec copy was selected.
    Filtering and streamcopy cannot be used together.

    Can somebody point me in the right direction to understand stream definitions? Why does -af:2 not apply the rubberband filter to only output stream 2 and the codec "copy" definitions apply only to output streams 0, 1, and the subtitles?
    Quote Quote  
  2. Try
    Code:
    ffmpeg -y -i input.mkv -map 0:v:0 -map 0:a:0 -map 0:a:0 -map 0:s -c:0 copy -c:1 copy -c:2 ac3 -b:a 640K -filter:a:2 "rubberband=pitch=0.5:pitchq=quality" -c:s copy output.mkv
    Quote Quote  
  3. Member
    Join Date
    Nov 2006
    Location
    Washington, USA
    Search Comp PM
    Thanks.

    I had to tweak it just a bit to work. I ended up with the following:

    ffmpeg -y -i "%~1" -map 0:v:0 -map 0:a:0 -map 0:a:0 -map 0:s -c:0 copy -c:1 copy -c:2 ac3 -b:a:1 640K -filter:a:1 "rubberband=pitch=0.50:pitchq=quality" -c:s copy "%~dpn1 (modified).mkv"
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!