how to specify audio bitrate with acodec=samr

About encoding, codec settings, muxers and filter usage
PeeZee
New Cone
New Cone
Posts: 4
Joined: 25 Feb 2007 12:54

how to specify audio bitrate with acodec=samr

Postby PeeZee » 26 Sep 2007 16:49

I'm trying to stream 3gp encoded content.

I have recompiled ffmpeg and vlc with samr support.
When I try to encode a movie file with samr audio codec, I can't seem to specify the correct audio bitrate.

(Please ignore the mmsh access method, I don't know whether it works, I don't think it is related, I'm testing some mms streaming)

command line:

Code: Select all

vlc inputfile --sout '#transcode{width=128,height=96,vcodec=H263,acodec=samr,vb=28,ab=5.25,fps=12.5,samplerate=8000,channels=1}:standard{access=mmsh,dst=:1234/test.3gp}' -vvvv
snip of the log:

Code: Select all

[00000299] stream_out_standard private debug: mux opened [00000299] main private debug: using sout stream module "stream_out_standard" [00000296] main private debug: set config option: sout-transcode-width to 128 [00000296] main private debug: set config option: sout-transcode-height to 96 [00000296] main private debug: set config option: sout-transcode-vcodec to H263 [00000296] main private debug: set config option: sout-transcode-acodec to samr [00000296] main private debug: set config option: sout-transcode-vb to 28 [00000296] main private debug: set config option: sout-transcode-ab to 5.25 [00000296] main private debug: set config option: sout-transcode-fps to 12.5 [00000296] main private debug: set config option: sout-transcode-samplerate to 8000 [00000296] main private debug: set config option: sout-transcode-channels to 1 [00000296] stream_out_transcode private debug: codec audio=samr 8000Hz 1 channels 5Kb/s [00000296] stream_out_transcode private debug: codec video=H263 128x96 scaling: 1.000000 28kb/s
Important parts to read:
[00000296] main private debug: set config option: sout-transcode-ab to 5.25
...
[00000296] stream_out_transcode private debug: codec audio=samr 8000Hz 1 channels 5Kb/s

it seems vlc cuts off the bitrate at the decimal point...

This produces the following ffmpeg error message and no audio in the stream:

Code: Select all

[00000345] ffmpeg encoder warning: bitrate not supported: use one of 4.75k, 5.15k, 5.9k, 6.7k, 7.4k, 7.95k, 10.2k or 12.2k (libamr_nb@0x8456a0)
Is there a workaround for this ?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: how to specify audio bitrate with acodec=samr

Postby Jean-Baptiste Kempf » 27 Sep 2007 01:51

Seems a bug. Ask on the mailing lists or trac it.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

PeeZee
New Cone
New Cone
Posts: 4
Joined: 25 Feb 2007 12:54

Re: how to specify audio bitrate with acodec=samr

Postby PeeZee » 27 Sep 2007 11:41

Thanks to the help of some people on the IRC channel, we figured out a workaround:

Ssing 5150 in stead of 5.15 as audio bitrate seems to solve the problem.

(The 5.25 in the original post was a typo, should have been 5.15)

Thanks for the help!

diegofn
Blank Cone
Blank Cone
Posts: 48
Joined: 06 Mar 2008 17:34

Re: how to specify audio bitrate with acodec=samr

Postby diegofn » 12 Jul 2009 04:07

The audio bitrate only can you set in bits/sg.

acodec="samr",ab="7400",samplerate="8000",channels="1"
aenc=ffmpeg,acodec="sawb",ab="23850",samplerate="16000",channels="1"


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 3 guests