Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#365 closed enhancement (fixed)

trp/ts file w/o PAT/PMT is not supported

Reported by: Superb Owned by:
Priority: minor Component: avformat
Version: git-master Keywords: mpegts aac pat pmt latm
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

See: http://code.google.com/p/lavfilters/issues/detail?id=39

When trying to render this trp file, the sound is recognized as mp1 instead of AAC.

Developer of LAV Filters commented:
"Files without a PAT/PMT are not properly supported by ffmpeg, this is a upstream problem, and you should take it to ffmpeg/libav for better hopes of getting it fixed properly."

Sample: http://www.sendspace.com/file/8v77k3
MediaInfo: http://pastebin.com/nBtREGvX

Attachments (2)

patchlatm.diff (4.6 KB ) - added by Carl Eugen Hoyos 13 years ago.
patchloas.diff (5.4 KB ) - added by Carl Eugen Hoyos 13 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by Carl Eugen Hoyos, 13 years ago

Status: newopen

Complete, uncut output of ffmpeg missing.

Which player does play your sample?

comment:2 by Carl Eugen Hoyos, 13 years ago

Keywords: latm added; trp sound removed

comment:3 by Superb, 13 years ago

C:\ffmpeg-git-9c2651a-win32-static\bin>ffprobe.exe rec_00000000.trp
ffprobe version N-31627-g9c2651a, Copyright (c) 2007-2011 the FFmpeg developers
  built on Jul 23 2011 15:02:13 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec   53.  9. 0 / 53.  9. 0
  libavformat  53.  6. 0 / 53.  6. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 27. 3 /  2. 27. 3
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[NULL @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[mp3 @ 002CA820] Header missing
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[mp3 @ 002CA820] Header missing
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] non-existing PPS referenced
[h264 @ 0270B840] non-existing PPS 0 referenced
[h264 @ 0270B840] decode_slice_header error
[h264 @ 0270B840] no frame!
[h264 @ 0270B840] mmco: unref short failure
[mp3 @ 002CA820] Header missing
[mpegts @ 002C9A80] max_analyze_duration 5000000 reached at 5000000
Input #0, mpegts, from 'rec_00000000.trp':
  Duration: 00:01:08.61, start: 28650.598189, bitrate: 2513 kb/s
    Stream #0.0[0xa21]: Video: h264 (Main), yuv420p, 720x576 [PAR 12:11 DAR 15:1
1], 62 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0xa22]: Audio: mp1, 0 channels, s16

C:\ffmpeg-git-9c2651a-win32-static\bin>

comment:4 by Carl Eugen Hoyos, 13 years ago

Analyzed by developer: set
Priority: normalminor
Reproduced by developer: set
Type: defectenhancement
Version: unspecifiedgit-master

Attached patch plays the file for me.

Last edited 13 years ago by Carl Eugen Hoyos (previous) (diff)

comment:5 by Superb, 13 years ago

Any chance this will get committed soon? :)

by Carl Eugen Hoyos, 13 years ago

Attachment: patchlatm.diff added

comment:6 by Carl Eugen Hoyos, 13 years ago

New version attached, it still waits for a review.

Did you test the patch?

comment:7 by Superb, 13 years ago

I don't have a compilation environment set and running here.
I used the win32 builds from http://ffmpeg.zeranoe.com/builds/, so unless the patch gets committed, I won't be able to test it.

Maybe I should download mingw and compile it quickly... :o

comment:8 by Superb, 13 years ago

Alright... so I went ahead and created a quick compilation environment. Had to learn a few new things, but why not... :)

Patch WORKS great. Verified. AAC stream is recognized @ ffprobe:
Input #0, mpegts, from 'rec_00000000.trp':

Duration: 00:01:08.61, start: 28650.598189, bitrate: 2513 kb/s

Stream #0.0[0xa21]: Video: h264 (Main), yuv420p, 720x576 [SAR 12:11 DAR 15:1

1], 63.04 fps, 50 tbr, 90k tbn, 50 tbc

Stream #0.1[0xa22]: Audio: aac_latm, 48000 Hz, 2 channels (FC), s16

:D

Then I tried converting the file via ffmpeg.exe and it worked wonderfully.

Thanks.

comment:9 by Hendrik, 13 years ago

I can confirm that the patch works fine for detecting AAC LATM streams.
Thanks for your efforts!

comment:10 by Carl Eugen Hoyos, 13 years ago

New patch with a better name attached.

comment:11 by reimar, 13 years ago

I sent a patch for a bug in the code this is derived from.
Also this:

uint32_t header = AV_RB16(buf2);
if((header&0xFFE0) != 0x56E0) "0x2B7"

break;

fsize = ((AV_RB32(buf2) >> 8) & 0x1FFF) + 3;

could/should be simplified to something like e.g.

uint32_t header = AV_RB24(buf2);
if(header >> 13 != 0x2B7)

break;

fsize = (header & 0x1FFF) + 3;

Which would also allow the - 4 in calculating "end" to be reduced to - 3.

comment:12 by Carl Eugen Hoyos, 13 years ago

New patch attached.
I changed auto-detection to succeed already for 100 frames, some streams are otherwise recognized as mpeg-ps.

by Carl Eugen Hoyos, 13 years ago

Attachment: patchloas.diff added

comment:13 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: openclosed

comment:14 by Carl Eugen Hoyos, 10 years ago

Keywords: mpegts added; ts removed
Note: See TracTickets for help on using tickets.