The only information which you should know about the incoming stream is the
Codec of the stream so that you can provide proper codec ID in the
avcodeccontext structure as follows:


   m_pContext->flags    |= CODEC_FLAG_4MV;
        m_pContext->flags     |= CODEC_FLAG_PART;
        m_pContext->flags     |=CODEC_FLAG_TRUNCATED;
        m_pContext->flags2  |=  CODEC_FLAG2_CHUNKS;
        m_pContext->pix_fmt   =   PIX_FMT_YUV420P  /*It can be RGB also*/;
        m_pContext->skip_frame = AVDISCARD_DEFAULT;
        m_pContext->error_concealment = 3;
        m_pContext->error_recognition = 1;
        m_pContext->skip_loop_filter = AVDISCARD_DEFAULT;
        m_pContext->workaround_bugs = 1;
        m_pContext->codec_type = CODEC_TYPE_VIDEO;
        m_pContext->codec_id = /*Put the incoming packet's codec ID over
here as it is mandatory */;


I think this will solve your purpose as long as you are not decoding H.264
stream.
To decode H.264 stream you need to have SPS and PPS NAL units also .

Regards
Deepti


|---------+------------------------------->
|         |           Debjyoti Mukherjee  |
|         |           <debjyo...@calsoftla|
|         |           bs.com>             |
|         |           Sent by:            |
|         |           libav-user-boun...@m|
|         |           playerhq.hu         |
|         |                               |
|         |                               |
|         |           07/21/2010 12:24 PM |
|         |           Please respond to   |
|         |           Libav* user         |
|         |           questions and       |
|         |           discussions         |
|         |                               |
|---------+------------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                                 |
  |       To:       Libav* user questions and discussions 
<[email protected]>                                              |
  |       cc:                                                                   
                                                 |
  |       Subject:  Re: [libav-user] Can ffmpeg decode video streams from the 
network (not  from file)                           |
  
>------------------------------------------------------------------------------------------------------------------------------|





Hi Deepti
How do i fill avcodeccontext structure if i dont have information about
media file? My issue is i am getting chunk by chunk media data over tcp.
Now i how do i proceed in this case. I am trying to do some real time
transcoding. Hope i am clear about my issue.

Thanks and Regards,


Debjyoti Mukherjee




------------------------------ --------------------
Calsoft Labs, Bangalore
Ph: +91-988-655-9096 (M)
Email:debjyo...@calsoftlabs. com
------------------------------ -------------------- ----- Original Message
-----
From: "Deepti Saraswat" <[email protected]>
To: "Libav* user questions and discussions" <[email protected]>
Cc: [email protected], [email protected]
Sent: Tuesday, 20 July, 2010 4:51:35 PM
Subject: Re: [libav-user] Can ffmpeg decode video streams from the network
(not from file)


Hi,

Please have a look at ffplay.c file . av_open_input_file can take any RTSP
url as an input and can decode incoming packets from network.

if you are not using RTSP url to get the video packets then simply fill
the avcodeccontext structure in a right manner and start decoding the
incoming packets.

Deepti


|---------+------------------------------->
| | Debjyoti Mukherjee |
| | <debjyo...@calsoftla|
| | bs.com> |
| | Sent by: |
| | libav-user-boun...@m|
| | playerhq.hu |
| | |
| | |
| | 07/20/2010 02:43 PM |
| | Please respond to |
| | Libav* user |
| | questions and |
| | discussions |
| | |
|---------+------------------------------->
>------------------------------------------------------------------------------------------------------------------------------|

| |
| To: [email protected] |
| cc: |
| Subject: [libav-user] Can ffmpeg decode video streams from the network
(not from file) |
>------------------------------------------------------------------------------------------------------------------------------|





Hello ,
I would like to know if ffmpeg can decode chunks of video streams that
come from TCP packets, the av_open_input_file only opens a file
...How do I make it read streams from TCP packets .. Can you please
suggest ideas or alternatives?
--
Thanks and Regards,


Debjyoti Mukherjee




------------------------------ --------------------
Calsoft Labs, Bangalore
Ph: +91-988-655-9096 (M)
Email:debjyo...@calsoftlabs. com
------------------------------ --------------------



_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user






Help save paper - do you need to print this email ?

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual(s) or entity addressed above. If you
are not the intended recipient of this e-mail, then (i) please notify us at
[email protected] (ii) do not use the information contained &
(iii) delete it from your system . E-mail communications are not secure.
Though efforts have been taken to ensure that this communication has not
been tampered with; however, Canon India Pvt Ltd. is not responsible for
any changes made to the contents of or any attachments to this message
without its consent.
All information contained in this message which are not of an official
nature shall not be deemed as given or endorsed by Canon India Pvt. Ltd.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user


--






_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user






Help save paper - do you need to print this email ? 
     
This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual(s) or entity addressed above. If you are 
not the intended recipient of this e-mail, then (i) please notify us at 
[email protected] (ii) do not use the information contained  & 
(iii) delete it from your system . E-mail communications are not secure. Though 
efforts have been taken to ensure that this communication has not been tampered 
with; however,  Canon India Pvt Ltd. is not responsible for any changes made to 
the contents of or any attachments to this message without its consent. 
All information contained in this message which are not of an official nature 
shall not be deemed as given or endorsed by Canon India Pvt. Ltd.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to