Sometime this year I thought I saw mention of ffmpeg and a LATM standalone demuxer. I may mis-recall/ may have misread, does anyone know anything about this? The reason I would need it is that currently feeding latm to decode with fdk seems impossible. Re-coding seems to lose the normal drc and the dvb (drc and mixdown) meta that fdk seems to have options to handle. In the absence of being able to do -c:a copy = the AAC re-coding case. Is there is a way not to loose meta data? TIA
Andy Furniss wrote:
Sometime this year I thought I saw mention of ffmpeg and a LATM standalone demuxer. I may mis-recall/ may have misread, does anyone know anything about this?
The reason I would need it is that currently feeding latm to decode with fdk seems impossible.
Re-coding seems to lose the normal drc and the dvb (drc and mixdown) meta that fdk seems to have options to handle.
In the absence of being able to do -c:a copy = the AAC re-coding case. Is there is a way not to loose meta data?
TIA
Hmm, it's years since I looked at this last and then IIRC it was stated that fdk lib didn't do latm. Looking at latest git there are files named like it possibly does now. Whatever, it doesn't work, so here's some output working without then failing with libfdk_aac. ffmpeg -i ~/bp-part-c1.ts -f null - ffmpeg version N-88204-g7f9de7b Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.3.0 (GCC) configuration: --prefix=/usr --disable-doc --enable-gpl --enable-nonfree --enable-libvpx --enable-libx265 --enable-libx264 --enable-gnutls --enable-libdrm --enable-libfreetype --enable-libfdk-aac libavutil 56. 0.100 / 56. 0.100 libavcodec 58. 0.101 / 58. 0.101 libavformat 58. 0.101 / 58. 0.101 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 0.100 / 7. 0.100 libswscale 5. 0.100 / 5. 0.100 libswresample 3. 0.100 / 3. 0.100 libpostproc 55. 0.100 / 55. 0.100 [h264 @ 0x389cc80] mmco: unref short failure Last message repeated 1 times [mpegts @ 0x38983a0] PES packet size mismatch Input #0, mpegts, from '/home/andy/bp-part-c1.ts': Duration: 00:24:18.20, start: 68053.963267, bitrate: 6403 kb/s Program 17540 Metadata: service_name : BBC ONE HD service_provider: Stream #0:0[0x19c9]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x19ca](eng): Audio: aac_latm (LC) ([17][0][0][0] / 0x0011), 48000 Hz, 5.1, fltp Stream #0:2[0x19ce](eng): Audio: aac_latm (HE-AACv2) ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp Stream #0:3[0x19cd](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native)) Stream #0:1 -> #0:1 (aac_latm (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [h264 @ 0x38cd2c0] mmco: unref short failure [h264 @ 0x391f660] mmco: unref short failure Output #0, null, to 'pipe:': Metadata: encoder : Lavf58.0.101 Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.0.101 wrapped_avframe Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, 5.1, s16, 4608 kb/s Metadata: encoder : Lavc58.0.101 pcm_s16le frame= 936 fps=267 q=-0.0 Lsize=N/A time=00:00:38.84 bitrate=N/A speed=11.1x video:483kB audio:21492kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown ffmpeg -c:a libfdk_aac -i ~/bp-part-c1.ts -f null - ffmpeg version N-88204-g7f9de7b Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.3.0 (GCC) configuration: --prefix=/usr --disable-doc --enable-gpl --enable-nonfree --enable-libvpx --enable-libx265 --enable-libx264 --enable-gnutls --enable-libdrm --enable-libfreetype --enable-libfdk-aac libavutil 56. 0.100 / 56. 0.100 libavcodec 58. 0.101 / 58. 0.101 libavformat 58. 0.101 / 58. 0.101 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 0.100 / 7. 0.100 libswscale 5. 0.100 / 5. 0.100 libswresample 3. 0.100 / 3. 0.100 libpostproc 55. 0.100 / 55. 0.100 [h264 @ 0x2d73c80] mmco: unref short failure Last message repeated 1 times [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4007 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4006 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 400a [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4006 Last message repeated 1 times [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 Last message repeated 1 times [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] Multiple frames in a packet. [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4007 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4007 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4007 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4004 Last message repeated 1 times [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4006 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 Last message repeated 2 times [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 400a [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001 [libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002 [mpegts @ 0x2d6f3a0] decoding for stream 1 failed [mpegts @ 0x2d6f3a0] decoding for stream 2 failed [mpegts @ 0x2d6f3a0] PES packet size mismatch [mpegts @ 0x2d6f3a0] Could not find codec parameters for stream 1 (Audio: aac ([17][0][0][0] / 0x0011), 0 channels, s16, 790 kb/s): unspecified sample rate Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x2d6f3a0] Could not find codec parameters for stream 2 (Audio: aac ([17][0][0][0] / 0x0011), 0 channels, s16, 106 kb/s): unspecified sample rate Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mpegts, from '/home/andy/bp-part-c1.ts': Duration: 00:24:18.20, start: 68053.963267, bitrate: 6403 kb/s Program 17540 Metadata: service_name : BBC ONE HD service_provider: Stream #0:0[0x19c9]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x19ca](eng): Audio: aac ([17][0][0][0] / 0x0011), 0 channels, s16, 790 kb/s Stream #0:2[0x19ce](eng): Audio: aac ([17][0][0][0] / 0x0011), 0 channels, s16, 106 kb/s Stream #0:3[0x19cd](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native)) Stream #0:1 -> #0:1 (aac (libfdk_aac) -> pcm_s16le (native)) Press [q] to stop, [?] for help [libfdk_aac @ 0x2dbfc60] Sample rate 0 invalid Error while processing the decoded data for stream #0:1 Conversion failed!
2017-10-31 15:54 GMT+01:00 Andy Furniss <adf.lists@gmail.com>:
Sometime this year I thought I saw mention of ffmpeg and a LATM standalone demuxer.
I committed it six years ago. (The technical name of the file format is "loas", "latm" is one of the things you can put into loas.) Your question was possibly: "Why does fdk not decode latm?" The answer is related to a decision FFmpeg developers made long ago (they knew it wasn't a very good idea), not implementing a bitstream filter that converts latm to aac and allowing to decode the result with any aac decoder but instead implementing an assigned latm decoder that cannot be replaced so easily. Carl Eugen PS: Concerning "clean-up": Instead of fixing issues like the above, known for nearly a decade, for example configure was changed so that on some systems, building takes (literally!) hours instead of minutes now.
Carl Eugen Hoyos wrote:
2017-10-31 15:54 GMT+01:00 Andy Furniss <adf.lists@gmail.com>:
Sometime this year I thought I saw mention of ffmpeg and a LATM standalone demuxer.
I committed it six years ago. (The technical name of the file format is "loas", "latm" is one of the things you can put into loas.)
Your question was possibly: "Why does fdk not decode latm?" The answer is related to a decision FFmpeg developers made long ago (they knew it wasn't a very good idea), not implementing a bitstream filter that converts latm to aac and allowing to decode the result with any aac decoder but instead implementing an assigned latm decoder that cannot be replaced so easily.
OK, thanks for the info. FWIW I eventually found the "mention of ffmpeg and LATM" that I referred to. It was in a devel mail suggesting some possible gsoc 2017 qualification tasks, one of which was a -bsf for LATM. I guess it wasn't actually used/taken.
Carl Eugen
PS: Concerning "clean-up": Instead of fixing issues like the above, known for nearly a decade, for example configure was changed so that on some systems, building takes (literally!) hours instead of minutes now.
Oh, nasty, it always did/does seem a bit long, but then not seeing stuff scrolling past may make the wait seem longer.
participants (2)
-
Andy Furniss -
Carl Eugen Hoyos