Opened 12 years ago

Closed 12 years ago

#1811 closed defect (fixed)

Transport stream with intentional garbage in the beginning is detected as program stream

Reported by: Carl Eugen Hoyos Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mpegts mpegps
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

http://ffmpeg.org/pipermail/ffmpeg-user/2012-October/010297.html

Transport streams recorded with Belson TV sets (on USB) start with garbage, FFmpeg detects a program stream instead of a transport stream.

$ ffmpeg -i misdetectionps.ts
ffmpeg version N-45422-g6254ffe Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 13 2012 12:00:13 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      51. 76.100 / 51. 76.100
  libavcodec     54. 65.100 / 54. 65.100
  libavformat    54. 32.100 / 54. 32.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 19.102 /  3. 19.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[mpeg @ 0x3201280] Format mpeg detected only with low score of 25, misdetection possible!
[mpeg @ 0x3201280] probed stream 1 failed
[mpeg @ 0x3201280] probed stream 5 failed
[mpeg @ 0x3201280] probed stream 6 failed
[mpeg @ 0x3201280] probed stream 7 failed
[mpeg @ 0x3201280] Invalid timestamps stream=1, pts=852695377, dts=5539292435, size=34318
[mp1 @ 0x3248ca0] Header missing
    Last message repeated 3 times
[mpeg @ 0x3201280] Invalid timestamps stream=2, pts=2897908561, dts=4977112148, size=30969
[mpeg @ 0x3201280] DTS discontinuity in stream 2: packet 56 with DTS 2897947441, packet 57 with DTS 3620529164
[mp1 @ 0x3248ca0] Header missing
[mpeg @ 0x3201280] Could not find codec parameters for stream 1 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpeg @ 0x3201280] decoding for stream 4 failed
[mpeg @ 0x3201280] Could not find codec parameters for stream 4 (Audio: mp1, 0 channels, s16): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpeg @ 0x3201280] Could not find codec parameters for stream 5 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpeg @ 0x3201280] Could not find codec parameters for stream 6 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpeg @ 0x3201280] Could not find codec parameters for stream 7 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0x323e280] start time is not set in estimate_timings_from_pts
[NULL @ 0x325ffa0] start time is not set in estimate_timings_from_pts
[NULL @ 0x3290b20] start time is not set in estimate_timings_from_pts
[NULL @ 0x32c0600] start time is not set in estimate_timings_from_pts
Input #0, mpeg, from 'misdetectionps.ts':
  Duration: 08:32:34.86, start: 9474.393078, bitrate: 0 kb/s
    Stream #0:0[0x1c2]: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:1[0x1e1]: Video: none, 90k tbr, 90k tbn
    Stream #0:2[0x1c0]: Audio: mp3, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:3[0x20]: Subtitle: dvd_subtitle
    Stream #0:4[0x1c5]: Audio: mp1, 0 channels, s16
    Stream #0:5[0x1eb]: Video: none, 90k tbr, 90k tbn
    Stream #0:6[0x1ea]: Video: none, 90k tbr, 90k tbn
    Stream #0:7[0x1e0]: Video: none, 90k tbr, 90k tbn
At least one output file must be specified

The sample gets detected correctly with ffmpeg -f mpegts, I will open another ticket for the image corruption shown on transcoding the sample.

$ ffmpeg -f mpegts -i misdetectionps.ts
ffmpeg version N-45422-g6254ffe Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 13 2012 12:00:13 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      51. 76.100 / 51. 76.100
  libavcodec     54. 65.100 / 54. 65.100
  libavformat    54. 32.100 / 54. 32.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 19.102 /  3. 19.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[mpegts @ 0x332b2a0] Could not detect TS packet size, defaulting to non-FEC/DVHS
[mpeg2video @ 0x334da40] mpeg_decode_postinit() failure
    Last message repeated 1 times
[mpegts @ 0x332b2a0] PES packet size mismatch
[mpeg2video @ 0x334da40] mpeg_decode_postinit() failure
[mpeg2video @ 0x334da40] skipped MB in I frame at 5 7
[mpeg2video @ 0x334da40] ac-tex damaged at 5 19
[mpeg2video @ 0x334da40] Warning MVs not available
[mpeg2video @ 0x334da40] concealing 90 DC, 90 AC, 90 MV errors in I frame
[mpegts @ 0x332b2a0] PES packet size mismatch
    Last message repeated 6 times
[mpegts @ 0x332b2a0] Could not find codec parameters for stream 4 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x332b2a0] Could not find codec parameters for stream 5 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x332b2a0] Could not find codec parameters for stream 6 (Unknown: none ([12][0][0][0] / 0x000C)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x332b2a0] Could not find codec parameters for stream 7 (Unknown: none ([255][0][0][0] / 0x00FF)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x332b2a0] Could not find codec parameters for stream 8 (Unknown: none ([255][0][0][0] / 0x00FF)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0x336de60] start time is not set in estimate_timings_from_pts
[NULL @ 0x3374320] start time is not set in estimate_timings_from_pts
[NULL @ 0x337a7e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x3380ca0] start time is not set in estimate_timings_from_pts
[NULL @ 0x3387160] start time is not set in estimate_timings_from_pts
[mpegts @ 0x332b2a0] PES packet size mismatch
    Last message repeated 2 times
Input #0, mpegts, from 'misdetectionps.ts':
  Duration: 00:00:04.36, start: 40225.173822, bitrate: 4689 kb/s
  Program 257
    Metadata:
      service_name    : France 2
      service_provider: GR1 A
  Program 260
    Metadata:
      service_name    : France 5
      service_provider: GR1 A
    Stream #0:0[0x140]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 15000 kb/s, 25.25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x14a](fra): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:2[0x14b](qad): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:3[0x154](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
    Stream #0:4[0x172]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:5[0x173]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:6[0x174]: Unknown: none ([12][0][0][0] / 0x000C)
    Stream #0:7[0x175]: Unknown: none ([255][0][0][0] / 0x00FF)
    Stream #0:8[0x176]: Unknown: none ([255][0][0][0] / 0x00FF)
  Program 261
    Metadata:
      service_name    : ?France [0m
      service_provider: GR1 A
  Program 262
    Metadata:
      service_name    : LCP
      service_provider: GR1 A
  Program 282
    Metadata:
      service_name    : France 3
      service_provider: Nat
  Program 368
    Metadata:
      service_name    : TLT
      service_provider: Scopus Network Technologies
At least one output file must be specified

Attachments (1)

misdetectionps.ts (2.4 MB ) - added by Carl Eugen Hoyos 12 years ago.

Change History (2)

by Carl Eugen Hoyos, 12 years ago

Attachment: misdetectionps.ts added

comment:1 by Michael Niedermayer, 12 years ago

Reproduced by developer: set
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.