Originally Posted by shane2943
I suppose I'm not understanding something: can ffmpeg remove one channel from within a stereo audio track on the DVD? That's what I'm wanting to do. The DVDs have 3 audio tracks each. Track 1 is music+singing, track 2 is music only, and track 3 is a split track with music on the right channel and click on the left. I want to remove the music all together and either mono the click track to L and R or stereo it to L and R. Either way, I need the click coming out of both sides and no music.
Can ffmpeg do this?
Yes (I think).
First. ffmpeg can make a DVD compliant mpg file. That is if you want to make it into a DVD again. That would look something lke this:
ffmpeg -i dvd.vob -target ntsc-dvd dvd.mpg
To add a remapping of the audio tracks, you first need to know the track available (as ffmpeg see them). Here is what I get when I run it on a DVD file:
$ ffmpeg -i VTS_01_1.VOB FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau
--enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl
--enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 31 2011 18:53:20, gcc: 4.4.3
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, mpeg, from 'VTS_01_1.VOB':
Duration: 00:23:18.99, start: 0.233567, bitrate: 6139 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 7700 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 224 kb/s
At least one output file must be specified
The lines in red are the video and audio tracks. If you have multiple audio tracks, that would mean there would be a Stream #0.2, Stream #0.3 etc. Let's pretend that there is a third track (a second audio track), and you want to remap it to be the only audio track:
ffmpeg -i dvd.vob -map 0:0 -map 0:2 -target ntsc-dvd -ac 1 dvd.mpg -newaudio
That should map the second audio channel, and make it mono (-ac 1). I haven't tried it, so I don't know if it will work as I posted it. To try a short test run, ad the -vframes option:
ffmpeg -i dvd.vob -vframes 400 -map 0:0 -map 0:2 -target ntsc-dvd -ac 1 dvd.mpg -newaudio
I'm trying this on my DVD file and I get an error. If I remove the -newaudio, then it works. But my DVD only has one audio channel, so that may be why I get an error. You can't remap audio when you only have one channel!