[MEncoder-users] mencoder -audiofile uses different bitrate

Grozdan neutrino8 at gmail.com
Tue Nov 3 19:11:38 CET 2009


2009/11/3  <mencoder at perlmeister.com>:
> How can I configure the bitrate/sample size of a PCM audio I want to add
> to a video? Mencoder seems to default to
>
>    AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit
>
> and for the life of me, I can't figure out how to get it to use
>
>    AUDIO: 8000 Hz, 1 ch, u8, 64.0 kbit
>
> instead. Okay, here's what I've done so far: I have an audio file,
> sound.wav, which has the correct bitrate:
>
>    $ mplayer sound.wav
>    ...
>    AUDIO: 8000 Hz, 1 ch, u8, 64.0 kbit/100.00%
>    ...
>
> And a have a video with no sound, nosound.avi:
>
>    $ mplayer nosound.avi
>    ...
>    AVI: No audio stream found -> no sound.
>    ...
>
> Now, let's use mencoder to add the audio to the video:
>
>    $ mencoder nosound.avi -oac pcm -ovc copy \
>        -audiofile sound.wav -o withsound.avi
>    ...
>    Audio stream:  128.000 kbit/s  (16000 B/s)
>    ...
>
> See? Mencoder used 128kbits, although the audio file has 64kbits. And
> the resulting .avi has 128kbits as well:

And why are you using -oac pcm with -audiofile? -oac pcm, combined
with -audiofile, will take the input audio, go over it and re-encode
to pcm format.... if you want to just copy the original, use -ovc copy
-oac copy -audiofile audio.wav

>
>    $ mplayer withsound.avi
>    ...
>    AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00%
>      (ratio: 16000->16000)
>    ...
>
> Is there any way I can convince mencoder to use the bitrate/sample size
> of the .wav file I've provided as input?
>
> Thanks for any help (sorry for the cross-post, I realized too late that
> there's a specific mencoder list as opposed to a generic mplayer one)!
>
> -- Mike
>
> Mike Schilli
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>


More information about the MEncoder-users mailing list