[FFmpeg-devel] [FFmpeg-soc] [Patch]GSoC 2008 qualification task TS Muxer

zhentan feng spyfeng
Mon Mar 24 16:09:12 CET 2008


hi all,
I have read through ISO13818 and the original TS Muxer codes by
several days, and finally generated a patch attached below.
I just extracted the common code lines from mpegtsenc.c and mpegenc.c,
and added these codes to mpegpesenc.c and .h files.
It may have some errors or unsuitable format although i have reviewed
many times.
Thanks anyone who points them out.

Further more, I have 2 questions:
1)How can I test my patch is correct?
I just get 4 files through the link:
svn://svn.mplayerhq.hu/soc/dvbmuxer.
I download the ffmpeg source code from
svn://svn.mplayerhq.hu/ffmpeg/trunk,but I can not find the 4files.
Is it means that I should copy the 4 files to ffmpeg sourcer code and
overwrite some files and rebuild the all source codes?

> Well, you must understand the code, and verify output stream
> conformance, more especially PCR values, buffer sizes, VBR muxing,
> against "specifications", and some advanced tools if you can have access to.

2)what is the sign of  the codes do work correctly?
I think i need some TS sample files or anything else?

best regards ~


2008/3/19, Baptiste Coudurier <baptiste.coudurier at smartjog.com>:
> Hi,
>
>
>  zhentan feng wrote:
>  > 2008/3/19, Baptiste Coudurier <baptiste.coudurier at smartjog.com>:
>  >> Hi,
>  >>
>  >>
>  >>  zhentan feng wrote:
>  >>  > hi all,
>  >>  > My name is zhentan feng,and I am very glad to apply the gsoc project.
>  >>  >
>  >>  > According to the idea list and ffmpeg wiki, I prefer to apply the  MXF
>  >>  > muxer which mentored by   Baptiste Coudurier.
>  >>  >
>  >>  > As to qualification task, I want to choose the TS Muxer project which
>  >>  > also mentored by Baptiste Coudurier.
>  >>  > So,could Baptiste Coudurier or anybody give me more details about the
>  >>  > TS Muxer qualification task?
>  >>  > best wished to all~
>  >>
>  >>
>  >> Good, last year SoC TS muxer was not finished though working, and more
>  >>  important not integrated.
>  >>
>  >>  The qualification task is:
>  >>
>  >>  1) Eliminate duplicated code found in both mpegtsenc.c and mpegenc.c
>  >>  (current PS muxer): extract common functions, putting them in
>  >>  mpegpesenc.c, extending them for TS only if strictly needed.
>  >>
>  >>  Code is at: svn://svn.mplayerhq.hu/soc/dvbmuxer
>  > I already checked it out and look through the files.
>  > It seems that mpegpesenc.c is the common functions extracted from both
>  > mpegtsenc.c and  mpegenc.c.
>  > The mpegpesenc.c just packet stream to PES packet.
>  > But I still confused what're the problems with mpegpesenc.c?
>
>
> Basically nothing.
>
>
>  > Is mpegpesenc.c lack of some function or can not work correctly?
>
>
> It lacks some functions and might not work "as is" with the PS muxer, so
>  it would need to be extended a bit.
>
>
>  > further more, I think i need some time to farmilar with the TS, PS,
>  > PES packet format.
>  > Do you have some useful documents to recommend?
>
>
> Sure, ISO 13818-1.
>
>
>  >>  2) Verify strictly the conformance of generated TS streams (we do need
>  >>  another broken muxer), if not, fix it.
>  >>
>  > I understand the 2) as follow:
>  > first, generate a TS stream (T1) by mpegtsenc.c originally;
>
>
> If you mean current svn, no, this is not needed, current TS muxer (in
>  svn) is broken.
>
>
>  > second , generate a TS stream (T2) by mpegtsenc.c(modified by cutting
>  > the common code with mpegenc.c) call the functions in mpegpesenc.c ;
>  > T1 and T2 have the same source stream.
>  > then compare T1 and T2 to see are they conformance by examine the TS
>  > packet format?
>
>
> Well, you must understand the code, and verify output stream
>  conformance, more especially PCR values, buffer sizes, VBR muxing,
>  against "specifications", and some advanced tools if you can have access to.
>
>
>  >>  3) Submit clean and separate patches against SVN for inclusion.
>  >>
>  > Does this point means if I have finished 1) and 2), I should commit
>  > the codes to ffmpeg src repo?
>
>
> Send separate, clean and incremental patches first, for review.
>  Don't wait the last day to send patches.
>
>
>  >>  3) Extend it to support H264 muxing.
>  > I understand it as follow:
>  > read the stream which is H264 coded, and transform the header and
>  > payload to PES packet,and then packeted  to TS stream itend to
>  > transport high efficiency?
>
>
> Well, TS muxer will get H264 stream in AVPackets, and this must be PES
>  muxed,
>  then TS packetized, you must ensure stream is muxed correctly according
>  to specifications.
>
>
>  > I think the qualification task is not a easy task ,but I'll try my best.
>  > Thank for anyone could give me any help.
>
>
> I don't think extracting duplicated code from mpegenc.c and mpegtsenc.c
>  is that hard. H264 muxing might be slightly harder.
>
>  This qualification task should really familiarize you with muxing
>  concepts needed for the MXF muxer.
>
>  --
>
> Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
>  SMARTJOG SAS                                     http://www.smartjog.com
>  Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
>  Phone: +33 1 49966312
>  _______________________________________________
>
> FFmpeg-soc mailing list
>  FFmpeg-soc at mplayerhq.hu
>  https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
>


-- 
Best wishes~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TSMuxer_extract.patch
Type: application/octet-stream
Size: 27441 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080324/33e90668/attachment.obj>



More information about the ffmpeg-devel mailing list