Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6273 closed defect (invalid)

Transport stream mp3 audio stream with 0 channels

Reported by: Patrick Bogdan Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Analysing a given .ts sample shows 0 channels in the second audio stream.
Using MediaInfo to analyse the given file shows a stereo channel layout.

Is the file corrupted or is this some kind of wired bug in ffmpeg?

The used sample can be downloaded here:
https://www.dropbox.com/sh/8cl0nwjub12grv9/AACFVLDC99KH6xjjuq6yzRTUa?dl=0

Thanks in advance!

Best, pb

ffprobe output

ffprobe started on 2017-03-28 at 16:55:29
Report written to "ffprobe-20170328-165529.log"
Command line:
/Users/bogdan/ffmpeg/FFmpeg/ffprobe -report logan_mpeg2__mp3_0_channel_audio__4_unknown_stream.ts
ffprobe version N-84307-gfa8db3f Copyright (c) 2007-2017 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: 
  libavutil      55. 50.100 / 55. 50.100
  libavcodec     57. 83.101 / 57. 83.101
  libavformat    57. 66.105 / 57. 66.105
  libavdevice    57.  3.100 / 57.  3.100
  libavfilter     6. 78.100 /  6. 78.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
[file @ 0x7ff7e9417260] Setting default whitelist 'file,crypto'
[mpegts @ 0x7ff7e9816c00] Format mpegts probed with size=2048 and score=50
[mpegts @ 0x7ff7e9816c00] stream=0 stream_type=2 pid=65 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=1 stream_type=3 pid=66 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=2 stream_type=3 pid=6a prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=3 stream_type=6 pid=69 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=4 stream_type=6 pid=98 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=5 stream_type=5 pid=96 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=6 stream_type=b pid=1c21 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=7 stream_type=b pid=1c33 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] stream=8 stream_type=5 pid=1c66 prog_reg_desc=
[mpegts @ 0x7ff7e9816c00] Before avformat_find_stream_info() pos: 0 bytes read:98304 seeks:1 nb_streams:9
[mpegts @ 0x7ff7e9816c00] parser not found for codec none, packets or times may be invalid.
[mpegts @ 0x7ff7e9816c00] parser not found for codec none, packets or times may be invalid.
[mpegts @ 0x7ff7e9816c00] parser not found for codec none, packets or times may be invalid.
[mpegts @ 0x7ff7e9816c00] parser not found for codec none, packets or times may be invalid.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpegts @ 0x7ff7e9816c00] probing stream 4 pp:2500
[mpegts @ 0x7ff7e9816c00] Probe with size=3456, packets=1 detected mp3 with score=51
[mpegts @ 0x7ff7e9816c00] probed stream 4
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x7ff7e983ce00] Invalid frame dimensions 0x0.
[mpegts @ 0x7ff7e9816c00] PES packet size mismatch
[mpegts @ 0x7ff7e9816c00] PES packet size mismatch
[mpegts @ 0x7ff7e9816c00] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0x7ff7e9816c00] PES packet size mismatch
[mpegts @ 0x7ff7e9816c00] PES packet size mismatch
[mpegts @ 0x7ff7e9816c00] stream 2 : no TS found at start of file, duration not set
[mpegts @ 0x7ff7e9816c00] Could not find codec parameters for stream 2 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x7ff7e9816c00] Could not find codec parameters for stream 5 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x7ff7e9816c00] Could not find codec parameters for stream 6 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x7ff7e9816c00] Could not find codec parameters for stream 7 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x7ff7e9816c00] Could not find codec parameters for stream 8 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x7ff7e9816c00] After avformat_find_stream_info() pos: 0 bytes read:3897288 seeks:4 frames:433
Input #0, mpegts, from 'logan_mpeg2__mp3_0_channel_audio__4_unknown_stream.ts':
  Duration: 00:00:04.39, start: 84600.931811, bitrate: 5691 kb/s
  Program 4164 
    Metadata:
      service_name    : BBC ONE Lon
      service_provider: 
    Stream #0:0[0x65], 98, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x66](eng), 164, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:2[0x6a](eng), 0, 1/90000: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p (visual impaired)
    Stream #0:3[0x69](eng), 7, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:4[0x98], 164, 1/90000: Audio: mp2 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:5[0x96], 0, 1/90000: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:6[0x1c21], 0, 1/90000: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:7[0x1c33], 0, 1/90000: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:8[0x1c66], 0, 1/90000: Unknown: none ([5][0][0][0] / 0x0005)
Unsupported codec with id 0 for input stream 5
Unsupported codec with id 0 for input stream 6
Unsupported codec with id 0 for input stream 7
Unsupported codec with id 0 for input stream 8
[AVIOContext @ 0x7ff7e9416d40] Statistics: 3897288 bytes read, 4 seeks

MediaInfo output

$ mediainfo logan_mpeg2__mp3_0_channel_audio__4_unknown_stream.ts 
General
ID                                       : 4164 (0x1044)
Complete name                            : logan_mpeg2__mp3_0_channel_audio__4_unknown_stream.ts
Format                                   : MPEG-TS
File size                                : 2.98 MiB
Duration                                 : 3 s 780 ms
Start time                               : UTC 2017-03-01 23:20:43
End time                                 : UTC 2017-03-01 23:20:46
Overall bit rate mode                    : Variable
Overall bit rate                         : 6 357 kb/s
Network name                             : London
Original network name                    : UK Digital Terrestrial Television
Country                                  : GBR / IRL
Timezone                                 : +00:00:00 / +00:00:00

Video
ID                                       : 101 (0x65)
Menu ID                                  : 4164 (0x1044)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Format settings, picture structure       : Frame
Codec ID                                 : 2
Duration                                 : 3 s 400 ms
Bit rate mode                            : Variable
Bit rate                                 : 5 655 kb/s
Maximum bit rate                         : 15.0 Mb/s
Width                                    : 704 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Active Format Description                : Letterbox 16:9 image, with alternative 14:9 center
Frame rate                               : 25.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.558
Stream size                              : 2.29 MiB (77%)

Audio #1
ID                                       : 102 (0x66)
Menu ID                                  : 4164 (0x1044)
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 3
Duration                                 : 3 s 792 ms
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Delay relative to video                  : -512 ms
Stream size                              : 118 KiB (4%)
Language                                 : English

Audio #2
ID                                       : 152 (0x98)
Menu ID                                  : 4164 (0x1044)
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Mode                                     : Joint stereo
Codec ID                                 : 6
Duration                                 : 3 s 696 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Delay relative to video                  : -408 ms
Stream size                              : 57.8 KiB (2%)

Text
ID                                       : 105 (0x69)
Menu ID                                  : 4164 (0x1044)
Format                                   : DVB Subtitle
Codec ID                                 : 6
Duration                                 : 1 s 550 ms
Delay relative to video                  : 2 s 448 ms
Language                                 : English
... ''cut output''

Change History (5)

comment:1 by Patrick Bogdan, 7 years ago

Sorry but apparently MediaInfo completely ignores the audio stream with 0 channels.
Did not see this before creating the bug report.
But anyways, is this a general problem with the file then?

comment:2 by Carl Eugen Hoyos, 7 years ago

Keywords: mpegts added; transport ts audio channel removed
Resolution: invalid
Status: newclosed

I don't think there is an issue: The sample you provided contains PMT/PAT for three audiostreams but only two contain actual data.

comment:3 by rmk, 7 years ago

So is this an invalid file? Just asking: Could ffmpeg handle this by ignoring that stream instead of exposing it with broken metadata that no application will be able to deal with? It can, of course be handled by an application but in such a case the demuxer feels like the better place.

in reply to:  3 comment:4 by Carl Eugen Hoyos, 7 years ago

Replying to rmk:

So is this an invalid file?

I don't know but my guess is that this depends on which specification you use.

comment:5 by rmk, 7 years ago

OK, thanks for the opinion.

Note: See TracTickets for help on using tickets.