PDA

View Full Version : No sound output by mencoder/mplayer


yawoo
9th January 2006, 17:59
Is that a known issue that there is no sound output when input AVS script to mplayer/mencoder? Is that any solution to solve it?

Thx,
Yawoo

Inc
9th January 2006, 19:35
It seems that the internal Audio Bitstream resulted out of Mencoders avs demuxer (based on the avisynth_c interface) is recognised wrong by Mencoders internal audio routines or even served wrong by the avs demuxer.
Once I did activate the audiosupport in the demux_avs file for testing but the result was as mentioned above (wrong samplerate shown in the DOS Window etc. and - crashing).
And my C experience is far away from beeing able to fix that. :(

Mug Funky
10th January 2006, 02:45
ah, i had wondered about that.

as a workaround you can pipe audio to mplayer/mencoder with avs2wav...

yawoo
10th January 2006, 08:42
Thanks for your reply.

Do you know any schedule that mplayer/mencoder team will fix this bug? Or they aren't aware of this bug?

In fact, I would like to encode both video and audio by one line of mencoder command. It will make my mencoder GUI frontend more complicated, if handle the encoding of video and audio seperately.

Inc
10th January 2006, 10:31
The mencoder/mplayer team by themselfes wherent interested at all supporting avs demuxing capabilities. That Add-on was applied by someone else who took the K.Atkinson Avisynth C-Interface and made it almost compatible for the internal Mencoder routines.

@MugFunky

Im not shure, but imho mencoder demands a videotrack to be included in the incoming stream, so a simple pipe fom av2wav | mencoder could result in an error. But as I know its possible in mencoder to set an external audiofile to be imported. Maybe you could set "that" argument in the CLI to request the audio via a avs2wav pipe?! ....

@ yawoo

If that doesnt work, then do build in your GUI a BAT file where in the first line the avs will be safed as a wav file using avs2wav, and in the second line you do call mencoder incl. the common arguments where you force the audio via argument to be loaded from an external wav (search the docs)- means the one resulted out of the avs2wav line before.

yawoo
13th February 2006, 07:45
To Inc:
You are correct. Just find the only solution in this forum that pipeline the result of avs2wav to the input of lame to create mp3 file. But I can't find any simple avi mux CLI program existed to mix up the video encoded by mencoder and the audio encoded by lame.

Hope that any expert can take up this job to enable the sound process of avisynth, or intergate avs2wav to mplayer/mecoder.

Inc
13th February 2006, 13:18
Why a separate task by using lame if mencoder already comes with internal audio encoders?
Do use avs2wav to generate the temp wav file,
then use the commandline for mencoder where you force the audio input via argument to be loaded from that external temp wav.
Use in the mencoder commandline the specific arguments to encode the audio to your whished codec/format (-ac mp3lame) so NO external lame.exe etc. needed.
The final result will be an avi container incl. the video and audio.

yawoo
17th February 2006, 18:32
To Inc:
Thanks for your suggestion. And I find that there is a switch "-audiofile" to get external audio file. But if use avs2wav to produce wav file for a movie, it may occupy 1GB size for temp file only. That's why I prefer to use avs2wav pipe-line with external lame encoder to save disk space. If mplayer/mencoder can handle audio part of avs file, it will not require temp file any more.