[FFmpeg-user] ffmpeg playback of unusual MPEG-4 layer 2 format video

Ed Torbett ed.torbett at simulation-systems.co.uk
Fri Feb 14 11:38:00 CET 2014


Hi all,

I'm currently implementing a custom I/O context to receive a live video stream from a Siemens digital video recorder. I'm able to do all the necessary handshaking etc, so I get access to a raw MPEG4 layer 2 stream that I can pass to ffmpeg. The link to the attached clip is a dump of exactly what is passed to ffmpeg. 

The stream plays perfectly in Siemens' own client, but ffmpeg looks like it has an issue handling the intra frames, although no errors are reported until the end of the file. I'm not sure if this is because the stream has been altered in some way to make it unplayable in any other player, or due to a decoding issue in ffmpeg.

Can anyone shed some light on this issue?

Link to sample demonstrating the issue: 
https://www.dropbox.com/s/lg4tes2m9hpidu2/unusual-intra-frames.dat

Link to wireshark trace of the full communications between the Siemens client and the DVR (for comparison): https://www.dropbox.com/s/n6dnerc12bn6ico/wireshark_trace_of_client.pcapng

Full, uncut console output below:

[etorbett at ssl26 ~]$ ffplay -v 9 -loglevel 99 siemensData0.dat
ffplay version N-54178-gbbe26ef Copyright (c) 2003-2013 the FFmpeg developers
  built on Jun 24 2013 17:34:56 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-51)
  configuration: --enable-gpl --enable-libvorbis --enable-libx264
  libavutil      52. 37.101 / 52. 37.101
  libavcodec     55. 17.100 / 55. 17.100
  libavformat    55.  9.100 / 55.  9.100
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 77.101 /  3. 77.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Format m4v probed with size=65536 and score=500KB sq=    0B f=0/0
[m4v @ 0x9b577c0] File position before avformat_find_stream_info() is 0
[m4v @ 0x9b577c0] All info found
[m4v @ 0x9b577c0] File position after avformat_find_stream_info() is 344064
Input #0, m4v, from 'siemensData0.dat':
  Duration: N/A, start: 0.040000, bitrate: N/A
    Stream #0:0, 22, 1/1200000: Video: mpeg4 (Simple Profile), yuv420p, 336x272 [SAR 1:1 DAR 21:17], 1/30000, 25 tbr, 1200k tbn, 30k tbc
detected 2 logical cores
Video frame changed from size:0x0 format:none serial:-1 to size:336x272 format:yuv420p serial:1
[ffplay_buffer @ 0x9cba560] Setting 'video_size' to value '336x272'
[ffplay_buffer @ 0x9cba560] Setting 'pix_fmt' to value '0'
[ffplay_buffer @ 0x9cba560] Setting 'time_base' to value '1/1200000'
[ffplay_buffer @ 0x9cba560] Setting 'pixel_aspect' to value '1/1'
[ffplay_buffer @ 0x9cba560] Setting 'frame_rate' to value '25/1'
[ffplay_buffer @ 0x9cba560] w:336 h:272 pixfmt:yuv420p tb:1/1200000 fr:25/1 sar:1/1 sws_param:
[ffplay_crop @ 0x9d20920] Setting 'out_w' to value 'floor(in_w/2)*2'
[ffplay_crop @ 0x9d20920] Setting 'out_h' to value 'floor(in_h/2)*2'
[AVFilterGraph @ 0x9c2dfa0] query_formats: 3 queried, 2 merged, 0 already done, 0 delayed
[ffplay_crop @ 0x9d20920] w:336 h:272 sar:1/1 -> w:336 h:272 sar:1/1
ac-tex damaged at 7 2d=   0 aq=    0KB vq=    1KB sq=    0B f=0/0
[mpeg4 @ 0x9b5b400] Error at MB: 51
[mpeg4 @ 0x9b5b400] concealing 357 DC, 357 AC, 357 MV errors in P frame
Statistics: 1646975 bytes read, 0 seeksvq=    0KB sq=    0B f=0/0


--
Edward Torbett BSc(Hons) MBCS
Principal Software Engineer

SSL Highway Control Systems
Unit 12, Market Industrial Estate,
Yatton, Bristol
BS49 4RF

Tel: + 44 (0)1934 839036
Switchboard: + 44 (0)1934 838803
Email: ed.torbett at simulation-systems.co.uk
Web: http://www.simulation-systems.co.uk





More information about the ffmpeg-user mailing list