Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-07-2018, 07:13 PM   #1
Registered: Mar 2009
Distribution: Slackware, Linux From Scratch, Bedrock
Posts: 412
Blog Entries: 53

Rep: Reputation: 57
ffmpeg now fails to see audio stream

So when I re-code a DVD, I use mencoder to handle the video part and ffmpeg to handle the audio (including mixing 5:1 down to stereo). The reason for the latter is in all the years I've tried, I've never figured out how to get mencoder to extract mix and write just audio.

Got a new DVD. vobcopied it. Identified which VOBs are the one I want. Ran a script to recode just the video part. Nothing new there. Do this all the time. Familiar. No problems. Did not expect any.

Problem: I ran my usual command options with ffmpeg to get audio and ... ffmpeg claims there is no audio stream. That's a new one. And yet somehow ffplay plays the files fine, with sound. Contradiction.

The relevant section of my script (which has worked for ages):
cat \
/hsc/vobcopy_temp/$MOVHERE/VIDEO_TS/VTS_07_[1-7].VOB | \
ffmpeg \
 -i - -f wav -vn \
 -map i:0x80 \
 -af pan=stereo:FL=FC+0.30*FL+0.30*BL:FR=FC+0.30*FR+0.30*BR \
 -acodec pcm_s16le \
The above is code that has worked for many movies. Seemes the English/first audio track is always 0x:80. I do not see why it would fail now.

Ran mplayer just to see what streams it saw. Hmm, 0x80, 0x81, 0x82, 0x83, yup: four audio streams, named (well, numbered) as usual.

Consultation of the manual reveals that maybe the syntax for ffmpeg's "-map" has changed. Right, so I say "-map 0:0" or even "-map 0:a:0" now? OK, whatever. I make the change. Nope. Still fails. Sigh.

Right: two questions. One: how to accomplish the following ...
me: Hey ffmpeg, how ya doing?
ff: Great! How are you?
me: Excellent. hey, I have an input stream for you coming in on stdin.
ff: I can do that!
me: Great. Hey, it's 5:1, you can handle that, right?
ff: Yessir!
me: And it's the first of four known streams, as revealed by mplayer
ff: I don't like mplayer.
me: Well, ffmpeg, you're smarter than mplayer, right? So you can do this, right?
ff: Yes I can!
me: Great, find that audio, mix it to stereo, and send it to a wav file, mmmkay?
ff: Sure thing!
... via command line options to an ffmpeg run.

Failing that, question two:

If mencoder can do this, how? I've never been able to figure this out over several years

Thank you.
Old 05-07-2018, 08:23 PM   #2
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
I don't know if mencoder will extract audio directly from a DVD. But it will from a video file, such as avi or mpg. I don'[t know the exact command line off the top of my head. But try ripping the mpg off the DVD and then get the audio off that.
Old 05-07-2018, 08:37 PM   #3
Senior Member
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Dobbs what has changed ? Put a pipe in it and see the DIFF
Old 01-07-2019, 08:35 PM   #4
Registered: Mar 2009
Distribution: Slackware, Linux From Scratch, Bedrock
Posts: 412

Original Poster
Blog Entries: 53

Rep: Reputation: 57
So after giving up (six months ago) I returned to the problem.

First step: although ffmpeg programs all fail to recognize nor play the audio, ffplay at least indicates that there is audio, in the form of AAC, but zero channels. There is no such thing as audio with zero chaannels, so that' s some indication of the problem. Maybe it is the interleaving of the audio with the video that is funky. So we break the processing of the audio into two tasks.

First task, seperate the audio out, as-is. The raw audio codec data, all by itself in a different container, may work with fflay/ffmpeg. So how to get that? Various search engines, docs, and Trial & error resulted in a way to get that audio out using mencoder:
cat /hsc/vobcopy_temp/$MOVHERE/VIDEO_TS/VTS_07_[1-7].VOB | \
mencoder \
 - \
 -ni \
 -o output.aac \
 -ni \
 -of rawaudio \
 -ovc frameno \
 -oac copy
I took ffplay's word that the audio was AAC and apparently it was, because that command worked. Putting -ni in twice was not a mistake. That was the result of an error message saying I should use -ni. Did so. Got the message again. Put a second -ni in. Then it worked. Go figure.

Turns out that, once the audio was all by itself, suddenly ffplay, and thus ffmpeg, would read it. Great.

The audio was in six channel form. No problem, many DVDs use this and that is familiar ground:
ffmpeg \
 -i output.aac -f wav -vn \
 -af pan=stereo:FL=FC+0.30*FL+0.30*BL:FR=FC+0.30*FR+0.30*BR \
 -acodec pcm_s16le \
In the above, we mix 5:1 down to stereo, dropping the subsonic track and mixing the center track louder than the others: this makes speech a bit more discernable.

That worked. From then on, usual conversion to a compressed format and remuxing with the video.

Last edited by jr_bob_dobbs; 01-07-2019 at 08:37 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mplayer problems. MPEG: no audio stream found. hondaman Linux - Software 0 10-10-2005 11:28 AM
MPlayer: Recording specific time period of audio stream nazarioz Linux - Newbie 7 06-02-2005 10:47 PM
tv stream on Mplayer - all wrong Ligius Linux - Software 2 11-06-2004 10:07 PM
mplayer to output stream eantoranz Linux - Software 0 05-17-2004 03:47 PM
wrong audio stream with mplayer for DVD general4172 Linux - Software 2 09-05-2003 05:31 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration