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?
+ Reply to Thread
Results 1 to 3 of 3
-
-
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
-
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"
Similar Threads
-
problems with mapping of livestream with ffmpeg
By Caidking in forum Video Streaming DownloadingReplies: 2Last Post: 15th Jul 2022, 16:29 -
ffmpeg mapping subtitles
By sambat in forum Video ConversionReplies: 4Last Post: 12th Jul 2022, 08:56 -
FFMPEG Save video from rtsp stream to hls stream
By Wisperrio in forum Video Streaming DownloadingReplies: 2Last Post: 26th Aug 2021, 22:38 -
FFmpeg multiple video filters chaining
By pascor in forum Video ConversionReplies: 4Last Post: 12th Jun 2021, 08:22 -
Question on order of video inputs when using ffmpeg and complex filters
By AspiringVideoProcessor in forum Video ConversionReplies: 1Last Post: 16th May 2021, 10:50