Splitting Audio from Video (21)

1 Name: 4n0n4ym0u5 h4xx0r : 2006-09-02 17:02 ID:vMUEy+it

Ok, so say I have a video file and I want to separate the audio track. What program would I use to do that?

2 Name: 4n0n4ym0u5 h4xx0r : 2006-09-02 18:31 ID:EB0Rfj8N

mplayer

3 Name: 4n0n4ym0u5 h4xx0r : 2006-09-02 19:04 ID:+JAhDRwa

Depends on the file type. Normally, a video file has several formats:

  • A video format, like divx or xvid or h264, for pretty images.
  • An audio format like mp3 or ogg, for sound.
  • Sometimes, a subtitle format like ssa or vobsub.
  • A container format like avi or mkv that contains all the audio and video and subtitle streams.

What you want to do is get the audio stream from the file. How you do this depends on the container format.

4 Name: 4n0n4ym0u5 h4xx0r : 2006-09-03 04:50 ID:Heaven

>>3
or you could just use mplayer for all those formats...

mplayer -ao pcm:file=audio.wav -vc dummy -vo null <video file>

5 Name: 4n0n4ym0u5 h4xx0r : 2006-09-03 17:57 ID:Heaven

>>4
Enjoy either your huge filesize or your quality loss because of transcoding.

6 Name: 4n0n4ym0u5 h4xx0r : 2006-09-04 12:54 ID:YotifRNR

I use virtual dub for that :) (freeware)http://www.virtualdub.org/

7 Name: 4n0n4ym0u5 h4xx0r : 2006-09-04 19:58 ID:Heaven

>>5
hard drive space is cheap (less than $1/GB).
and transcoding? you don't do any transcoding, just decoding.
or you could use flac, which is lossless and takes less hard drive space than wav.

8 Name: 4n0n4ym0u5 h4xx0r : 2006-09-04 20:52 ID:6nIvAqfu

I would use virtualdubmod. http://virtualdubmod.sourceforge.net/

Just like vitualdub, but better audio support.

9 Name: 4n0n4ym0u5 h4xx0r : 2006-09-04 21:23 ID:Heaven

>>7
So, you like to store 3 minute long 80mb wav files on 512mb mobile audio players? Or use flac, which may manage to halve the filesize, but isn't supported by most mobile players?

The only real option for taking stuff with you (which you'll probably want to do with most of your music) or for re-using the audio in another video file is a lossy format, hence you'll have to reencode to something lossy. And decoding and then reencoding, also known as transcoding, is stupid and reduces audio quality.

10 Name: 4n0n4ym0u5 h4xx0r : 2006-09-05 03:23 ID:Heaven

>>9
flac works fine on my 30 GB ipod with rockbox.
and videos files on the internet usually have shitty audio quality anyway, so you're probably not going to lose much transcoding to another lossy format. if you want high audio quality, why are you getting your music from video files?

11 Name: 4n0n4ym0u5 h4xx0r : 2006-09-05 16:11 ID:Heaven

>>10
Not everyone can spare 300$ for a audio player and then experiment around with inofficial firmware, you know.

Also, if the sound quality is already bad, why make it even worse?

12 Name: 4n0n4ym0u5 h4xx0r : 2006-09-05 18:43 ID:Heaven

>>11
mine didn't cost $300. and rockbox works on a lot of other audio players, too.

and it would be extremely difficult to make the sound quality worse than it already is in most video files.

13 Name: Redhatter : 2006-09-07 09:39 ID:Heaven

ffmpeg -i INFILE OUTFILE.wav does this just nicely:

stuartl@beast /mnt/net/chasers $ ffmpeg -i chaser_ep27.mp4 chaser_audio.wav
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --prefix=/usr --mandir=/usr/share/man --disable-static --e
nable-shared --cc=i686-pc-linux-gnu-gcc --extra-ldflags= -Wl,-rpath-link,/tm
p/portage/ffmpeg-0.4.9_p20060302/work/ffmpeg-0.4.9-p20060302-shared/libavcod
ec -Wl,-rpath-link,/tmp/portage/ffmpeg-0.4.9_p20060302/work/ffmpeg-0.4.9-p20
060302-shared/libavformat -Wl,-rpath-link,/tmp/portage/ffmpeg-0.4.9_p2006030
2/work/ffmpeg-0.4.9-p20060302-shared/libavutil --disable-altivec --disable-d
ebug --disable-audio-oss --disable-opts --enable-mp3lame --enable-a52 --enab
le-dc1394 --enable-pthreads --enable-xvid --enable-libogg --enable-vorbis --
enable-theora --enable-dts --enable-x264 --enable-faad --enable-faac --enabl
e-amr_nb --enable-amr_wb --enable-gpl --enable-pp --disable-strip
libavutil version: 49.0.0
libavcodec version: 51.7.0
libavformat version: 50.3.0
built on Aug 1 2006 17:42:34, gcc: 3.4.6 (Gentoo Hardened 3.4.6-r1, ssp-3.4
.5-1.0, pie-8.7.9)
Input #0, mov,mp4,m4a,3gp,3g2, from 'chaser_ep27.mp4':
Duration: 00:27:28.7, start: 0.000000, bitrate: 470 kb/s
Stream #0.0(eng), 25.00 fps(r): Video: h264, yuv420p, 320x180
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo
File 'chaser_audio.wav' already exists. Overwrite ? [y/N] y
Output #0, wav, to 'chaser_audio.wav':
Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 13448kB time=78.1 bitrate=1411.2kbits/s
video:0kB audio:13448kB global headers:0kB muxing overhead 0.000320%
stuartl@beast /mnt/net/chasers $ file chaser_audio.wav
chaser_audio.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 b
it, stereo 44100 Hz

14 Name: Albright!LC/IWhc3yc : 2006-09-09 06:56 ID:u6TvNMaM

iPods support a lossless codec called Apple Lossless. It's only playable on the iPod hardware, and only encodable with the iTunes or QuickTime software, but it does allow iPods to have lossless compressed audio without installing Rockbox or other funky hacks.

I wouldn't mind seeing Apple (officially) add support to the iPod for other non-DRM codecs like Ogg Vorbis and FLAC; I don't quite understand what they would have to lose by doing so

15 Name: 4n0n4ym0u5 h4xx0r : 2006-09-10 00:01 ID:Heaven

>>14
i would apple lossless on my ipod, but itunes and quicktime are a pain to use even even on windows and os x. i'd rather not go to all the trouble of trying to get itunes working in wine.

16 Name: 4n0n4ym0u5 h4xx0r : 2006-09-11 15:57 ID:J3xDtMtR

> I wouldn't mind seeing Apple (officially) add support to the iPod for other non-DRM codecs like Ogg Vorbis and FLAC; I don't quite understand what they would have to lose by doing so

Development hours that could be better spent on pleasing a fraction of their user base larger than 0.1%, probably.

17 Name: 4n0n4ym0u5 h4xx0r : 2006-09-12 15:43 ID:Heaven

>>16
a lossless codec that doesn't require using itunes' poorly designed interface would doubtless please a lot more than 0.1% of their userbase.

18 Name: 4n0n4ym0u5 h4xx0r : 2006-09-12 21:50 ID:6F9yCT7+

>>14
they are?
I (a Mac user) used to have my music in FLAC, but noticed it's about ten times easier to have iTunes rip & auto-tag my CDs as Apple Lossless. Also, MacAmp Lite X was getting really long in the tooth.

19 Name: 4n0n4ym0u5 h4xx0r : 2006-09-12 23:05 ID:Heaven

>>18
logic error. are you sure you meant to quote >>14?

20 Name: Albright!LC/IWhc3yc : 2006-09-14 09:14 ID:u6TvNMaM

>>18
Not sure if this will be of any interest to you, but Xiph.Org has made a QuickTime Component (plug-in) for their formats, which includes FLAC. I haven't tried it, but theoretically, with this, you should be able to bring your FLACs into iTunes, then convert them to Apple Lossless without the intermediary step of converting it to an uncompressed format first (or without re-ripping your CDs).
http://xiph.org/quicktime/

Also, if you're looking for another non-iTunes player for more obscure audio formats, consider Cog. I haven't tried it myself, but it's got some attention recently.
http://cogosx.sourceforge.net/index.php

21 Name: 4n0n4ym0u5 h4xx0r : 2006-09-14 12:49 ID:Heaven

>>17

Noooo, I'm pretty sure you're still stuck at 0.1% or less.

This thread has been closed. You cannot post in this thread any longer.