[vlc] Re: AMR stream query
Chris Dobbs
chris_dobbs at dobbscr.karoo.co.uk
Fri Mar 17 22:02:46 CET 2006
Hi Ross,
Thanks for your interest. It does seem that VLC is incorrectly using the
live555 code to extract the AMR speech frames.
Some background info:
So far I have built a test RTSP AMR streamer server using the live555 code
(just hacked the test server provided) and have been using this to test
with - so far I can now play this stream using the ffmpeg client program
(ffplay) both locally and via RTSP - I had to modify ffmpeg library code to
correctly parse the RTSP sdp layer to deal with AMR correctly- I then
plugged this ffmpeg tree into VLC but just got static.
After some debugging I noticed that the routine:
amr_nb_decode_frame() - in the ffmpeg code tree (libeavformat/amr.c)
Is called by both VLC and the ffplay programs and is normally passed the amr
speech frame data as an argument. i.e you can do the following to get the
toc and mode
tocbyte=(buf[1] >> 2) & 0x01
mode=(buf[1] >>3) & 0x0F (this ends up as 7 (and this 31 byte speech
frame size) for the data streamed out by the live555 code
where buf is the AMR data passed into the above routine.
However when VLC calls this routine, it seems the data passed in is not
recognisable from source at all. From what I understand , this must occur
AFTER the stage which VLC (using the live555 code) has extracted the AMR
payload out of the RTP packet therefore it seems logical that as VLC must be
either using the live555 code wrongly OR the live555 code is bugged - I
can't imagine the live555 code is at fault thou as I can successfully pass
AMR around using the test code and it works fine.
So basically I now have an ffmpeg library which I have proved works fine
with live555 code but not with VLC. Interestingly VLC does correclty parse
the RTSP session layer and knows it's AMR-NB , and even opens the correct
ffmpeg codec, it's simply that it is passing the wrong data the the decode
routine!
Will keep you informed.
I you want the modified ffmpeg code let me know and I will tidy it up and
provide a patch. (not released to ffmpeg project yet as I havn't fully
implement AMR in line with RFC3267)
Cheers,
-Chris
----- Original Message -----
From: "Ross Finlayson" <finlayson at live555.com>
To: <vlc at videolan.org>
Cc: <vlc-devel at videolan.org>
Sent: Friday, March 17, 2006 3:53 PM
Subject: [vlc] Re: AMR stream query
>
> >I think it's simply that vlc is pulling the amr payload datat out of
> >the rtp packet incorrectly.
>
> No, VLC (actually, the "LIVE555 Streaming Media" libraries) is
> pulling AMR payload data out of RTP packets correctly. The problem
> is that VLC (e.g., using FFMPEG) is not then processing the data
correctly.
>
> You can demonstrate this by trying to play the following file
> http://www.live555.com/test.amr
> VLC (version 0.8.5-test1) cannot play this file, either locally, or
> using HTTP. Nor can it play the RTSP/RTP stream
> rtsp://217.19.213.233:554/cfamr.avi.3gp
> from which this file was derived (using "openRTSP"). (This RTSP
> server is currently not accessible.)
>
> I.e., if you can get VLC to play the file
> http://www.live555.com/test.amr
> you will probably solve the problem.
>
>
>
> Ross Finlayson
> Live Networks, Inc. (LIVE555.COM)
> <http://www.live555.com/>
>
> --
> This is the vlc mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://www.videolan.org/support/lists.html
>
>
>
>
--
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
More information about the vlc
mailing list