Log in

View Full Version : How to create mp4 file from RTP packets payload data.


jagan_mp4
15th March 2005, 03:08
Hi,
i am getting RTP packets (payload data) from server. i want to know general idea about how i can write in mp4 file (i.e recoding the stream) by receiveing RTP packets.
Thanks & Regds,
Jagan

Dmitry Vergheles
15th March 2005, 07:40
Hello Jagan,
The general idea is quite simple as any one.

You need to extract MPEG-4 audio/video data from RTP packets and multiplex them to MP4 file by means of appropriate multiplexer.

As far as I know both 3ivX and Elecard has own Mp4 Muxer.

There is a link concerning RTP and MPEG4:

RTP Payload Format for MPEG-4 Audio/Visual Streams
http://www.faqs.org/rfcs/rfc3016.html
or
http://www.ietf.org/proceedings/99mar/I-D/draft-ietf-avt-rtp-mpeg4-01.txt

jagan_mp4
15th March 2005, 09:38
Hello Mr.Dmitry Vergheles,
Thanks for given basic detail about RTP format for MPEG4. Suppose if i am going start development mp4 writer from RTP format MPEG4 datas, where can i get development details & ideas (i.e open source code for mp4 writer from mpeg4 format).

Thanks & Regds,
Jagan

Dmitry Vergheles
15th March 2005, 11:21
Suppose if i am going start development mp4 writer from RTP format MPEG4 datas, where can i get development details & ideas (i.e open source code for mp4 writer from mpeg4 format).

It depends on what specifically age you going to develop.
To get elementary streams from RTP an above doc is enough, I suppose.
Then you can make use any existing muxers.

If you are going to provide own muxer, there are some appropreate open source project that you can have found in this thread.

iapir
15th March 2005, 13:05
VLC could theoretically do that for you. But apparently it doesn't work yet. But if you want to code something, that would probably be where you should have a look/hand.