[MPlayer-users] Video from one, audio from another

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sat Dec 16 23:37:54 CET 2006


On Saturday, 16 December 2006 at 22:23, Jason Greb wrote:
> I have been using mencoder to rip video off of Mini-DVDs recorded by Sony
> DVD Cams. (I've done about 100 DVDs, and will be doing about another 300).
> In these videos, GPS data is embedded in the audio stream. It sounds
> similar to a fax machine (very annoying, must keep speakers on mute). I've
> written a bash script along with Zenity that reads track 1, and rips each
> chapter separately into MPEG2 files:
> 
> mencoder dvd://1 -dvd-device $dvddevice -chapter
> $chapternumber-$chapternumber -alang English -of mpeg -mpegopts
> format=mpeg2:tsaf:vaspect=4/3 -o
> $outputdvdfolder/$foldername\_$chapternumber.mpg -oac copy -ovc lavc
> -lavcopts vcodec=mpeg2video:vbitrate=4000:keyint=15:mbd=2:aspect=4/3 -vf
> pp=fd

Don't use -vf pp=fd. There are better deinterlacers:
http://guru.multimedia.cx/index.php?s=deinterlacing

> It takes the audio track and just copies it over so no data is lost. It
> took the longest time for me to get it to play under Windows. Anyway, some
> of the videos were taken before the GPS attachments, and have regular
> sound. I've taped one chapter with GPS data in a known location, so I can
> manually edit the GPS data later in ArcMap.
> 
> I need to take the video out of the MPEGs missing the GPS data, and take
> the audio of the one file that I have recorded with GPS data, and mix them
> together. I've used Mplayer to do an audiodump, but when I try to use -ova
> copy (and pcm) and -audiofile out.wav, it never copies the audio into the
> file.
> 
> I've gotten the following:
> 
> Audio format 0x56444152 is incompatible with '-oac copy', please try
> '-oac pcm' instead....

printf  '\x56\x44\x41\x52\n'
VDAR

-> FourCC is "RADV"

Looks like RAW DV audio. -oac copy can't handle that.

> Also, just to note, while doing all this mixing, I've take the one MPEG2
> file and the sound, and used -ovc copy, and for some reason it creates an
> AVI instead. Do I need to specify more options for that part?

Yes. You need -of mpeg. There is a big warning about that in mencoder
output. I'm surprised you missed it.

> Or can I encoded from MPEG2 to MPEG2 without losing anything (kinda like
> saving a JPG several times)?

Reencoding to JPG serveral times looses quality each time. Same with any
lossy codec.

> Does anyone have an easy way to take two different sources and combine
> them?

Dump the audio track from one of them and remux with the other using
-audiofile.

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan



More information about the MPlayer-users mailing list