LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 05-12-2010, 02:43 AM   #1
tushs
LQ Newbie
 
Registered: Apr 2010
Posts: 17

Rep: Reputation: 1
Decode tcp/udp packets using ffmpeg


Hi All,
I am quite new to Audio/Video.I am getting raw packets of MPEG, camera board sends raw packets, no protocol (RTP or else...). application reads it using tcp/udp. My first question is, are there multiple frames of I frame,P Frame,B frame in single packet? and after decoding it we will get BMP which we can to render?

I tried example of http://dranger.com/ffmpeg/ffmpegtutorial_all.html but I am getting following error error,

[mpeg2video @ 0x9200330]invalid mb type in P Frame at 2 4
[mpeg2video @ 0x9200330]concealing 220 DC, 220 AC, 220 MV errors
[mpeg2video @ 0x9200330]ac-tex damaged at 11 5
[mpeg2video @ 0x9200330]concealing 200 DC, 200 AC, 200 MV errors
[mpeg2video @ 0x9200330]invalid cbp at 17 3
[mpeg2video @ 0x9200330]concealing 240 DC, 240 AC, 240 MV errors
[mpeg2video @ 0x9200330]ac-tex damaged at 0 4
[mpeg2video @ 0x9200330]concealing 220 DC, 220 AC, 220 MV errors
[mpeg2video @ 0x9200330]slice mismatch
[mpeg2video @ 0x9200330]concealing 200 DC, 200 AC, 200 MV errors
[mpeg2video @ 0x9200330]ac-tex damaged at 7 6
[mpeg2video @ 0x9200330]concealing 180 DC, 180 AC, 180 MV errors
[mpeg2video @ 0x9200330]invalid cbp at 10 7
[mpeg2video @ 0x9200330]concealing 160 DC, 160 AC, 160 MV errors
[mpeg2video @ 0x9200330]ac-tex damaged at 9 7
[mpeg2video @ 0x9200330]concealing 160 DC, 160 AC, 160 MV errors
[mpeg2video @ 0x9200330]ac-tex damaged at 10 2
[mpeg2video @ 0x9200330]concealing 260 DC, 260 AC, 260 MV errors
[mpeg2video @ 0x9200330]ac-tex damaged at 3 6
[mpeg2video @ 0x9200330]concealing 180 DC, 180 AC, 180 MV errors
[mpeg2video @ 0x9200330]ac-tex damaged at 4 7
[mpeg2video @ 0x9200330]concealing 160 DC, 160 AC, 160 MV errors

one solution to this I found is use AVParser I need help how can I use it to get correct frame to pass it to decoder.
 
Old 05-21-2010, 09:43 PM   #2
jcomeau_ictx
LQ Newbie
 
Registered: Aug 2004
Location: Petaluma, CA, US
Distribution: Debian GNU/Linux squeeze/sid
Posts: 28

Rep: Reputation: 17
I'm pretty clueless about all this, but using vlc I've been able to transcode different camera inputs to other formats. Have you looked into vlc?
 
Old 05-25-2010, 12:08 AM   #3
tushs
LQ Newbie
 
Registered: Apr 2010
Posts: 17

Original Poster
Rep: Reputation: 1
Thanks for reply..
Yes VLC is the best player ever I seen, but since I want to code my player I was using ffmpeg. The problem was solved when i used
if(av_read_frame(pFormatContext,&packet))
{
Log(ERROR);
}
I think there is problem with av_read_packet(). Please share the difference between both if any one knows details.
 
  


Reply

Tags
decode, ffmpeg, mpeg2, mpeg4


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
Tcpdump decode Gzip packets mattseanbachman Linux - Newbie 2 03-12-2010 02:06 AM
UDP: Short Packets: and UDP bad checksum: entries in dmesg minutes2memories Linux - Networking 2 02-26-2006 07:28 PM
encapsulating TCP packets in UDP packets... yoshi95 Programming 3 06-03-2004 02:53 PM
How to receive UDP and ICMP packets, by one UDP socket(PMTUD) myself_rajat Linux - Networking 0 05-28-2004 05:43 AM
Only receiving UDP packets, no TCP erevlehdeux Linux - Networking 1 04-23-2004 07:36 PM


All times are GMT -5. The time now is 08:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration