[Libav-user] Parsing TS 188 bytes header

Andy Shaules bowljoman at gmail.com
Wed Aug 12 22:41:07 CEST 2015


On 8/11/2015 11:32 PM, Self User wrote:
> Hi and thanks for the comment.
>
> I tried to do it but it is not helped me...
>
> The flow you wrote helps when I am decoding packets/frames.
>
> looks likes the read packet/frame methods are for the codecs themselves.
>
> I am trying to find some code that gives me the == TS packets == and 
> its fields (continuity counter, scramble bit etc...)
>
> Also, the example that I saw under doc/sample in the ffmpeg package 
> are mostly for decode/transcode/encode and I didnt see
>
> any API that gives me handling of the TS packets themselves.
>
> can you please be more specific with some example that I can look on.
>
> Thank you very much
>
>
>
> On Tue, Aug 4, 2015 at 9:05 PM, Talgorn François-Xavier 
> <fxtalgorn-at-yahoo.fr at ffmpeg.org 
> <mailto:fxtalgorn-at-yahoo.fr at ffmpeg.org>> wrote:
>
>     Hi,
>
>     In avcodec library, the AVPacket structure seems to provide your
>     needs.
>
>     https://www.ffmpeg.org/doxygen/2.5/structAVPacket.html
>
>     To parse each packet you'll need to:
>     - Register codecs
>     - Open file
>     - Read frame (AVFrame structure)
>     - Read packet
>     - Extract what you need.
>
>     Plenty of examples in the FFMPEG sources.
>
>     Good luck.
>
>     Fixta.
>
>     Le 4 août 2015 à 13:42, Self User <selfuser at gmail.com
>     <mailto:selfuser at gmail.com>> a écrit :
>
>>     Hi all,
>>
>>
>>     I am using c++ code under redgat/ubuntu.
>>
>>
>>     My goaI is to parse each TS packet (each 188 bytes) and for each
>>     extract its field values.
>>
>>
>>     What lib function should I use ?
>>
>>
>>     Can you give an example for this kind of parsing?
>>
>>
>>     Thanks
>>
>>
>>     LibUser
>>
>>     _______________________________________________
>>     Libav-user mailing list
>>     Libav-user at ffmpeg.org <mailto:Libav-user at ffmpeg.org>
>>     http://ffmpeg.org/mailman/listinfo/libav-user
>
>
>     _______________________________________________
>     Libav-user mailing list
>     Libav-user at ffmpeg.org <mailto:Libav-user at ffmpeg.org>
>     http://ffmpeg.org/mailman/listinfo/libav-user
>
>
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
That would be somthing like DVB snoop. with -s ts flag I believe. Or 
MPEG-2 packet analyzer if you need a gui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150812/edf7bc68/attachment.html>


More information about the Libav-user mailing list