[Live-devel] testH264VideoToTransportStream error

Mcnamara, JohnX johnx.mcnamara at intel.com
Fri Jun 22 06:12:43 PDT 2012


Ross Finlayson wrote:

> That's odd; it works just fine for me:
> in.264 (copied from tc10.264):           2680806 bytes
> out.ts:                                 2798756 bytes



Hi Ross,
I get the same results as you with live.2012.06.17 on Linux:
    $ ./testH264VideoToTransportStream
    Beginning to read...
    Done reading.
    Wrote output file: "out.ts"
    $ ls -l in.264 tc10.264 out.ts
    -rw-r--r-- 1 user user 2680806 2012-06-22 13:09 tc10.264
    -rw-r--r-- 1 user user 2680806 2012-06-22 13:10 in.264
    -rw-r--r-- 1 user user 2798756 2012-06-22 13:13 out.ts
However, while playing with the output TS file I encountered an issue that I've seen before.
Specifically, if you try to play the output TS file with VLC it spits out a lot of errors:
    $ vlc out.ts
    VLC media player 1.1.9 The Luggage (revision exported)
    ...
    corrupted macroblock 23 16 (total_coeff=-1)
    error while decoding MB 23 16
    ...
    Missing reference picture
    decode_slice_header error
    number of reference frames exceeds max
    (probably corrupt input), discarding one
    decode_slice_header error
    ...
    first_mb_in_slice overflow
    ...
    Missing reference picture
   decode_slice_header error
This could be a VLC issue but it doesn't have any problem playing the input H.264 file (apart from requiring a .h264 extension) and it doesn't have any problem playing a MPEG-TS file created with ffmpeg:
    $ ffmpeg -i in.264 -vcodec copy ffmpeg.ts
The ffplay application also has problems playing the out.ts file.
I think this is caused by erroneous 0x00000001 start codes being inserted in the TS file by H264VideoStreamParser.
You can verify this if you demux the out.ts file and compare it with the original in.264 input:
    $ ffmpeg -i out.ts -vcodec copy demuxed.h264
    $ cmp in.264 demuxed.h264
    in.264 demuxed.h264 differ: byte 149998, line 502
If you examine the two files at that location you will see the extra start code:
    $ xxd -s 149976 -l 32 in.264
    00249d8: ba13 9663 cc85 d621 56b2 4afc 4f9a 887f  ...c...!V.J.O...
    00249e8: 0580 c162 2cff fff7 c637 5056 54eb 740e  ...b,....7PVT.t.
    $ xxd -s 149976 -l 32 demuxed.h264
    00249d8: ba13 9663 cc85 d621 56b2 4afc 4f9a 887f  ...c...!V.J.O...
    00249e8: 0580 c162 2c00 0000 01ff fff7 c637 5056  ...b,........7PV
                         ^^ ^^^^ ^^

Is this an issue?

If you think it is then I have some ideas about what might be causing it but I don't want to second guess you.
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/20120622/3adff176/attachment-0001.html>


More information about the live-devel mailing list