Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I've tried but I can't seem to find the right ffmpeg options to extract the pcm_bluray audio from a mpegts and output a WAV.

Here's ffmpeg's info on the source file:

Input #0, mpegts, from '00009_StickmanValentine.m2ts':
  Duration: 00:04:22.87, start: 599.958344, bitrate: 15951 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR
       16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
    Stream #0:1[0x1100]: Audio: pcm_bluray (HDMV / 0x564D4448), 48000 Hz, stereo, s16, 1536 kb/s

Most important I need to keep the audio levels as close to the original as possible. Maintaining the bit depth would be good too, but not mandatory. The source is not encrypted.

If you can suggest a great reference for ffmpeg arguments, I'd appreciate that as well.

share|improve this question

migrated from Mar 8 '13 at 21:23

This question came from our site for professional and enthusiast programmers.

The best reference I can suggest for ffmpeg arguments is its documentation :) – slhck Mar 8 '13 at 20:05
Doh! I looked a lot of places but not there. Google was leading me on a wild goose chase. Thanks! – John Pilgrim Mar 9 '13 at 1:09
up vote 4 down vote accepted

Well you left out what you have already tried, so I will assume this has yet to be tried.

ffmpeg -i 00009_StickmanValentine.m2ts b.wav


share|improve this answer
That works! Thanks! The following were tried and did not work: ffmpeg -i 00009_StickmanValentine.m2ts -acodec pcm_s24be out.wav ffmpeg -i 00009_StickmanValentine.m2ts -acodec copy out.wav ffmpeg -i 00009_StickmanValentine.m2ts -acodec copy out.aif Looks like I was ovethinking it! – John Pilgrim Mar 9 '13 at 1:07
@John IIRC, pcm_s24be is incompatible with WAV, you'd have to use pcm_s24le. be=big-endian=stores some data at the end of the stream, this is used by AIFF (Apple's equivalent to WAV, though AFAIK all systems support both equally well); le=little-endian=that data is stored at the beginning off the stream. – evilsoup Mar 9 '13 at 10:16
This answer will probably work, but you might find ffmpeg converting the audio to 16-bit (I have no audio DVDs to check with here). This won't actually lead to any quality loss, but if you're buying audio DVDs, I assume you want the 24-bit audio, in which case use -acodec pcm_s24le - or -c:a pcm_s24le in the current ffmpeg syntax. – evilsoup Mar 9 '13 at 10:19
Thanks! This is actually for ripping the audio from BluRay videos, to perform loudness (LKFS) analysis using AudioLeak and Dolby Media Meter. The command given in the original answer produces a file what works in those apps, and which has the following specs per ffmpeg: Input #0, wav, from '/path/to/00009_StickmanValentine.wav': Duration: 00:04:22.83, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s – John Pilgrim Mar 9 '13 at 20:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .