LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-14-2007, 01:47 AM   #1
steven_yu
LQ Newbie
 
Registered: Jun 2007
Posts: 19

Rep: Reputation: 0
Video codec Mpeg 1/2/4 and RTP


These days we lunch a VOD (Video On Demand) project, since I am a fresh men to multimedia field and don't have any experience on audio, video, encoding and decoding issues. So I ask some simple questions, any proposal or advise is welcome. I want to discuss with anyone who is interested in this topic.

Now I have spend much time on researching some famous open source projects, such as VLC, Mpeg4IP, MPlayer. Since I try to use RTP as our file (audio and video) transfer protocol, so the following items are the most important.
1. During server mode, how does the server packetize its audio and video data into RTP packets? And these are so many codec format, such as MPEG 1/2/4, ASF, XVID and so forth.

2. The second question is based on above, since when I meet a media file, how do I find its codec type and any other useful information from its file data? Known we can't just guess it from its backwared name, such *.rm,*.mp3.

3. In the client issue, when it receives data from remote area, encapsulated in RTP, of course we need to analysis its rtp header and get its payload data and then send to the decoder. Now my question is when packets lost, how do we deal with it? And buffer size, how much should we allocate in order not to be overflow?

Open topic any discussion is welcome.
 
Old 06-18-2007, 08:39 AM   #2
cppkid
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
Well you have asked 3 questions. I'll try to answer them one by one.

Quote:
1. During server mode, how does the server packetize its audio and video data into RTP packets?
This question needs a little explanation. What you want to know?? the algo used by server or what?
If you are confused that how the server packetize the different types of data like ASF,MPEG,XVID into RTP packets. The answer is that RTP is just the carrier, it doesn't need to know what is inside the packet. It just carry the data to the destination. No matter its MPEG or ASF etc...

Quote:
2. how do I find its codec type and any other useful information from its file data
You will find it from the header. Like if you see that its a AVI container then there could be MPEG4 data or H264 data or something. So all you need to do is that read the first 2K of the AVI file and parse it, it contains all the information about the CODEC, Video Stream, Audio Stream, Index location etc... You need to read some more information about the "Audio Video Containers" like AVI and header information about these containers. But its not a very tuff job to determine.

Quote:
3. Now my question is when packets lost, how do we deal with it?
You don't need to worry about that. When you use RTP, it ensures that you will find each and every packet. In case some packet is corrupted or lost, the RTP control channel that is running over TCP/IP requests for the retransmission of that packet. So all this process will be at lower layer and will be transparent to you. So when ever you will read the data from RTP client. you will get the complete data.

Hope i answered your questions.
 
  


Reply

Tags
rtp, vlc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Video codec question on Slack 10.2 Lord_Tenebrus Slackware 10 11-07-2006 11:44 AM
Video Problems After Codec Install thugic Slackware 1 11-09-2005 04:02 AM
What program use to receive RTP audio or video that compatible with JMF vanhelsing Programming 0 08-05-2004 10:58 AM
Couple of Video Codec problems... Aeiri Linux - Software 1 06-30-2004 12:52 PM
MPEG and other video SlavaVB Linux - Newbie 3 03-08-2002 02:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration