Problem with SDP file when using MP3 codec?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
simonb
Blank Cone
Blank Cone
Posts: 25
Joined: 15 Jan 2005 18:38
Operating System: Linux
Location: London

Problem with SDP file when using MP3 codec?

Postby simonb » 03 Nov 2008 09:14

Summary:
The SDP file produced when I select an MP3 codec appears to be broken resulting in a silent playback via a Wowza/Flash streaming server and client.
MP4 codec produces the following output in the SDP file.

Code: Select all

a=rtpmap:97 mpeg4-generic/44100/2 a=fmtp:97 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=0a10; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1;
MP3 codec produces the following output in the SDP file.

Code: Select all

a=rtpmap:14 MPA/90000/2
So do we have a 90000 sample rate here? Shouldn't there be more information? Doens't MPA imply MP1 layer 2 and not MP1 layer 3?

Detail:

The following command line produces an SDP file that works fine for feeding a Wowza streaming server for Flash clients (using Flowplayer).

Code: Select all

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-input=1 :v4l2-io=1 :v4l2-width=720 :v4l2-height=576 :v4l2-adev=hw:0,0 :v4l2-audio-method=3 :v4l2-stereo :v4l2-samplerate=44100 :v4l2-tuner=0: v4l2-tuner-audio-mode=1 :v4l2-controls-reset :v4l2-auto-white-balance=1 :v4l2-autogain=1 :no-v4l2-audio-mute --v4l2-set-ctrls={chroma agc=1,combfilter=1} --sout '#duplicate{dst="transcode{threads=4,width=640,height=480,venc=x264,fps=25,vcodec=x264,vb=300,deinterlace=linear,acodec=mp4a,ab=96,channels=2,samplerate=44100}:duplicate{dst=rtp{dst=192.168.0.18,port-video=10000,port-audio=10002,sdp=file:///tmp/playthis.sdp},dst=std{access=file, mux=ts, dst=/tmp/playthis.mpeg}}"}' --sout-x264-ref=5
Here is the SDP file it produces.

Code: Select all

v=0 o=- 14751873074713056480 14751873074713056480 IN IP4 localhost s=Unnamed i=N/A c=IN IP4 192.168.0.18 t=0 0 a=tool:vlc 0.9.5 a=recvonly a=type:broadcast a=charset:UTF-8 m=video 10000 RTP/AVP 96 b=AS:300 b=RR:0 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=4d4033;sprop-parameter-sets=Z01AM5pzAUB7YCIAAAMAAgAAAwBlHjBk0A==,aO48gA==; m=audio 10002 RTP/AVP 97 b=AS:96 b=RR:0 a=rtpmap:97 mpeg4-generic/44100/2 a=fmtp:97 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=0a10; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1;
I change the command line to use and MP3 codec instead by just changing the acodec setting the transcode statement. The command line now looks like this...

Code: Select all

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-input=1 :v4l2-io=1 :v4l2-width=720 :v4l2-height=576 :v4l2-adev=hw:0,0 :v4l2-audio-method=3 :v4l2-stereo :v4l2-samplerate=44100 :v4l2-tuner=0: v4l2-tuner-audio-mode=1 :v4l2-controls-reset :v4l2-auto-white-balance=1 :v4l2-autogain=1 :no-v4l2-audio-mute --v4l2-set-ctrls={chroma agc=1,combfilter=1} --sout '#duplicate{dst="transcode{threads=4,width=640,height=480,venc=x264,fps=25,vcodec=x264,vb=300,deinterlace=linear,acodec=mp3,ab=96,channels=2,samplerate=44100}:duplicate{dst=rtp{dst=192.168.0.18,port-video=10000,port-audio=10002,sdp=file:///tmp/playthis.sdp},dst=std{access=file, mux=ts, dst=/tmp/playthis.mpeg}}"}' --sout-x264-ref=5
And the resulting SDP file looks like this...

Code: Select all

v=0 o=- 14751874343142510294 14751874343142510294 IN IP4 localhost s=Unnamed i=N/A c=IN IP4 192.168.0.18 t=0 0 a=tool:vlc 0.9.5 a=recvonly a=type:broadcast a=charset:UTF-8 m=video 10000 RTP/AVP 96 b=AS:300 b=RR:0 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=4d4033;sprop-parameter-sets=Z01AM5pzAUB7YCIAAAMAAgAAAwBlHjBk0A==,aO48gA==; m=audio 10002 RTP/AVP 14 b=AS:96 b=RR:0 a=rtpmap:14 MPA/90000/2
The command line also saves the stream to disk. The audio is fine on the disk based recording. It is only streaming that doesn't work.

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

Re: Problem with SDP file when using MP3 codec?

Postby Jean-Baptiste Kempf » 03 Nov 2008 10:37

Can you put MP3 audio over RTP like this ?
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.

simonb
Blank Cone
Blank Cone
Posts: 25
Joined: 15 Jan 2005 18:38
Operating System: Linux
Location: London

Re: Problem with SDP file when using MP3 codec?

Postby simonb » 03 Nov 2008 10:58

Can you put MP3 audio over RTP like this ?
Just done a quick Google and it appears that you can. It is described as "MPA".
http://www.dmn.tzi.org/ietf/mmusic/54/s ... -video.ppt

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

Re: Problem with SDP file when using MP3 codec?

Postby Jean-Baptiste Kempf » 03 Nov 2008 11:20

Does VLC supports it ? Ask on the IRC...
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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15231
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Problem with SDP file when using MP3 codec?

Postby Rémi Denis-Courmont » 03 Nov 2008 17:43

MP3 codec produces the following output in the SDP file.

Code: Select all

a=rtpmap:14 MPA/90000/2
So do we have a 90000 sample rate here? Shouldn't there be more information? Doens't MPA imply MP1 layer 2 and not MP1 layer 3?
MPA means MPEG Audio. Any layer. 90000 refers to the RTP timestamps frequency, not the audio sampling here. This value is mandated by IETF RFC2038, and consistent with the MPEG clock frequency.

To the best of knowledge, VLC output is correct here.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

simonb
Blank Cone
Blank Cone
Posts: 25
Joined: 15 Jan 2005 18:38
Operating System: Linux
Location: London

Re: Problem with SDP file when using MP3 codec?

Postby simonb » 04 Nov 2008 11:04

OK. Thanks for shedding some light on this. That was most helpful. It looks like I was barking up the wrong tree.

Next step for me is to test an RTP/SDP feed from VLC to another client than the Wowza server and see if that works.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 18 guests