Opened 5 years ago

Closed 5 years ago

Last modified 2 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 cehoyos 5 years ago.
patchloas.diff (5.4 KB) - added by cehoyos 5 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 5 years ago by cehoyos

  • Status changed from new to open

Complete, uncut output of ffmpeg missing.

Which player does play your sample?

comment:2 Changed 5 years ago by cehoyos

  • Keywords latm added; trp sound removed

comment:3 Changed 5 years ago by Superb

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 Changed 5 years ago by cehoyos

  • Analyzed by developer set
  • Priority changed from normal to minor
  • Reproduced by developer set
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master

$ cp libavformat/aacdec.c libavformat/latmdec.c
and attached patch plays the file for me.

Version 0, edited 5 years ago by cehoyos (next)

comment:5 Changed 5 years ago by Superb

Any chance this will get committed soon? :)

Changed 5 years ago by cehoyos

comment:6 Changed 5 years ago by cehoyos

New version attached, it still waits for a review.

Did you test the patch?

comment:7 Changed 5 years ago by Superb

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 Changed 5 years ago by Superb

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 Changed 5 years ago by heleppkes

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

comment:10 Changed 5 years ago by cehoyos

New patch with a better name attached.

comment:11 Changed 5 years ago by reimar

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 Changed 5 years ago by cehoyos

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

Changed 5 years ago by cehoyos

comment:13 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

comment:14 Changed 2 years ago by cehoyos

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