iliketowatch
13th December 2007, 23:18
I have some video shows that were transferred to DVDs. On some of them, there
is only audio in the right channel. I want to duplicate the right channel to
the left. I have been searching many FAQs and newsgroups and have only come
up with one method (to be described below) that works once in a while. What
I consider not working is when the audio and video are noticeably out of sync.
Sometimes A/V is out of sync by several seconds towards the start of
the video; sometimes just a fraction of a second out of sync towards the end.
I use mplayer to extract the VOB (MPEG-2) from the DVD; this is flawless and has worked fine on all videos:
mplayer -dvd-device DVD-483_484.image -af volnorm dvd://1 -dumpstream -dumpfile AV_483.mpeg
It's easy, using mplayer, to play the video with audio in both channels.
However, if I dump the stream to another file, it is the same as the
original. I also tried mencoder to copy the video and remap the right
channel audio to both channels (sorry, can't find the code I tried) but in
trying to keep the audio ac3, I got avi video.
For the videos with one channel of audio I do the following:
# Extract video
mplayer -cache 8192 AV_483.mpeg -dumpstream -dumpfile /dev/stdout |
tcextract -t vob -a 0 -x mpeg2 > /tmp/TEMP/AV_483.mp2
# Extract audio
# this will save the mono audio as 2 chan. pcm
mplayer -cache 8192 AV_483.mpeg -vc dummy -vo null -channels 1 -ao pcm:file=/tmp/TEMP/AV_483.wav
# Noramlize audio, then encode back to ac3
normalize /tmp/TEMP/AV_483.wav
ffmpeg -i /tmp/TEMP/AV_483.wav -acodec ac3 -ab 384k TEMP/AV_483.ac3
# Merge the two back together
mplex -f 8 -V -o AV_483.mpeg /tmp/TEMP/AV_483.mp2 TEMP/AV_483.ac3
I've tried different -cache settings, faster machines, etc. without any
reliable results. I've also tried sync offsets in mplex, such as
"-O 1501mpt", but again, no reliable results.
Am I missing something here? Should I use different tools?
Here are the versions I used:
---
MPlayer 1.0rc2-3.3.4
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
mjpegtools mplex-2 version 1.8.0 (2.2.4)
ffmpeg version 0.4.9-pre1
tcextract (transcode v1.0.2)
normalize 0.7.6
---
Thanks in advance for any help/insights.
Brian.
is only audio in the right channel. I want to duplicate the right channel to
the left. I have been searching many FAQs and newsgroups and have only come
up with one method (to be described below) that works once in a while. What
I consider not working is when the audio and video are noticeably out of sync.
Sometimes A/V is out of sync by several seconds towards the start of
the video; sometimes just a fraction of a second out of sync towards the end.
I use mplayer to extract the VOB (MPEG-2) from the DVD; this is flawless and has worked fine on all videos:
mplayer -dvd-device DVD-483_484.image -af volnorm dvd://1 -dumpstream -dumpfile AV_483.mpeg
It's easy, using mplayer, to play the video with audio in both channels.
However, if I dump the stream to another file, it is the same as the
original. I also tried mencoder to copy the video and remap the right
channel audio to both channels (sorry, can't find the code I tried) but in
trying to keep the audio ac3, I got avi video.
For the videos with one channel of audio I do the following:
# Extract video
mplayer -cache 8192 AV_483.mpeg -dumpstream -dumpfile /dev/stdout |
tcextract -t vob -a 0 -x mpeg2 > /tmp/TEMP/AV_483.mp2
# Extract audio
# this will save the mono audio as 2 chan. pcm
mplayer -cache 8192 AV_483.mpeg -vc dummy -vo null -channels 1 -ao pcm:file=/tmp/TEMP/AV_483.wav
# Noramlize audio, then encode back to ac3
normalize /tmp/TEMP/AV_483.wav
ffmpeg -i /tmp/TEMP/AV_483.wav -acodec ac3 -ab 384k TEMP/AV_483.ac3
# Merge the two back together
mplex -f 8 -V -o AV_483.mpeg /tmp/TEMP/AV_483.mp2 TEMP/AV_483.ac3
I've tried different -cache settings, faster machines, etc. without any
reliable results. I've also tried sync offsets in mplex, such as
"-O 1501mpt", but again, no reliable results.
Am I missing something here? Should I use different tools?
Here are the versions I used:
---
MPlayer 1.0rc2-3.3.4
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
mjpegtools mplex-2 version 1.8.0 (2.2.4)
ffmpeg version 0.4.9-pre1
tcextract (transcode v1.0.2)
normalize 0.7.6
---
Thanks in advance for any help/insights.
Brian.