[Live-devel] Issue converting H.264 with EOS NALU to MPEG-TS

Mcnamara, JohnX johnx.mcnamara at intel.com
Wed Jul 18 06:31:37 PDT 2012


Hi Ross,
Following on from an earlier post in relation to H264VideoStreamParser:
    http://lists.live555.com/pipermail/live-devel/2012-June/015350.html
The fix provided worked for all the cases that I tested at the time but I recently encountered some other files where the H.264 stream was truncated in the MPEG-TS container when using H264VideoStreamFramer and MPEG2TransportStreamFromESSource.
The files in question had an end_of_stream NAL Unit of 0x0000010b. This is a valid nal_unit_type according to Section 7.4.1, "NAL unit semantics", of the H.264 specification.
You can reproduce the issue as follows with your sample tc10.264 file:

    cd testProgs
    cp ~/Videos/tc10.264 in.264

    # Convert in.264 to out.ts:
    ./testH264VideoToTransportStream
    # Demux it back to H.264:
    ffmpeg -i out.ts -vcodec copy demuxed01.h264
    # Verify that the files are the same:
    cmp in.264 demuxed01.h264
    # Add the end of stream NALU to in the input file:
    perl -i -0777 -ne 'print $_, pack "N", 0x0000010b if eof' in.264

    # Convert in.264 to out.ts again:
    ./testH264VideoToTransportStream
    # Demux it back to H.264 again:
    ffmpeg -i out.ts -vcodec copy demuxed02.h264
    # Verify that the files are no longer the same:
    cmp in.264 demuxed02.h264

You will see that the demuxed02.h264 file is truncated in relation to the input file:
    $ ls -l in.264 demuxed0?.h264
    -rw-r--r-- 1 test test 2680810 2012-07-18 13:59 in.264
    -rw-r--r-- 1 test test 2680806 2012-07-18 13:59 demuxed01.h264
    -rw-r--r-- 1 test test 2674518 2012-07-18 13:59 demuxed02.h264


I tested with version  live.2012.07.14.

Regards,
John.
--

--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120718/25b3e82d/attachment.html>


More information about the live-devel mailing list