Opened 23 months ago
Closed 14 months ago
#10118 closed defect (needs_more_info)
AC3 decoding throws error number -16976906 ... vlc plays well
Reported by: | mvelanka | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I intend to transcode an mpeg ts file such that I copy the video as it is but the audio will be encoded to aac ...so that I can play it in the browser. Please see the attached TS file.
I use the following ffmpeg command to attempt that
How to reproduce:
ffmpeg -i ff_vlc.ts -vcodec copy -acodec aac -map 0:v:0 -map 0:a:0 ff_vlc_2.ts ffmpeg version N-109444-geef763c705 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --enable-openssl libavutil 57. 43.100 / 57. 43.100 libavcodec 59. 55.103 / 59. 55.103 libavformat 59. 34.102 / 59. 34.102 libavdevice 59. 8.101 / 59. 8.101 libavfilter 8. 53.100 / 8. 53.100 libswscale 6. 8.112 / 6. 8.112 libswresample 4. 9.100 / 4. 9.100 [mpegts @ 0x55b4369b2440] Could not find codec parameters for stream 1 (Audio: ac3 ([129][0][0][0] / 0x0081), stereo, fltp): unspecified sample rate Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'ff_vlc.ts': Duration: 00:10:00.02, start: 1.400000, bitrate: 1839 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 856x480 [SAR 320:321 DAR 16:9], 30 fps, 59.94 tbr, 90k tbn Stream #0:1[0x101](spa): Audio: ac3 ([129][0][0][0] / 0x0081), stereo, fltp Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help Error while decoding stream #0:1: Error number -16976906 occurred Last message repeated 17065 times Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Error while decoding stream #0:1: Error number -16976906 occurred Last message repeated 2 times Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Error while decoding stream #0:1: Error number -16976906 occurred Last message repeated 2 times Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Error while decoding stream #0:1: Error number -16976906 occurred Last message repeated 2 times .... .... ....(repetitive output clipped and removed) .... .... Last message repeated 2 times Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Error while decoding stream #0:1: Error number -16976906 occurred Last message repeated 2 times Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Error while decoding stream #0:1: Error number -16976906 occurred Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. Too many packets buffered for output stream 0:0. Error submitting a packet to the muxer for output stream #0:0. [abuffer @ 0x56289e5ab100] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09] Last message repeated 1 times [abuffer @ 0x56289e5ab100] Error setting option time_base to value 1/0. [graph_0_in_0_1 @ 0x5628a3f5e800] Error applying options to the filter. Error reinitializing filters! Error while filtering: Numerical result out of range Finishing stream 0:1 without any data written to it. [abuffer @ 0x56289b2b89c0] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09] Last message repeated 1 times [abuffer @ 0x56289b2b89c0] Error setting option time_base to value 1/0. [graph_0_in_0_1 @ 0x56289a63e780] Error applying options to the filter. Error configuring filter graph Conversion failed!
When I play this original ts file in VLC player there is no problem whatsoever. I can even verify the AC3 codec in VLC properly
Attachments (1)
Change History (14)
by , 23 months ago
follow-up: 2 comment:1 by , 23 months ago
Component: | avcodec → undetermined |
---|---|
Keywords: | AAC_AC3_PARSE_ERROR_SYNC removed |
comment:2 by , 23 months ago
Replying to Carl Eugen Hoyos:
How did you create the file you attached? The console output indicates that you created it with FFmpeg which makes little sense for such a ticket - please use dd to cut transport streams, not FFmpeg.
We get TS from satellite. We have to transcode it so that we get audio in aac. That is what we are always doing. Even with this TS, the original TS had 3 audio streams and the other two did not have any problem. So I prepared a TS only with the video and the problematic Audio so that the issue can be demonstrated. So the TS that is uploaded has the original video + copied AC3 from the original...............
I hope I have made this clear.
Thanks
comment:3 by , 23 months ago
Please (also) upload a few seconds of the original satellite stream, you can cut it with dd (or use a file hoster of your choice for a bigger sample).
comment:4 by , 23 months ago
I am trying to upload clip from orig TS. However orig TS has 1 video and 3 audio streams. Even 1 second clip of that is becoming 3.8Mb file.. Let me try to host it somewhere else. Please wait.
Thank you.
comment:5 by , 23 months ago
I have uploaded the file at
https://www.mediafire.com/file/ee70pfx8cqywbi7/orig_file.ts/file
file name = orig_file.ts
It has following contents
Input #0, mpegts, from 'orig_file.ts':
Duration: 00:00:16.52, start: 251.672000, bitrate: 2479 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 856x480 [SAR 320:321 DAR 16:9], 30 fps, 59.94 tbr, 90k tbn, 60 tbc
Stream #0:1[0x101](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2[0x102](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:3[0x103](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired) (descriptions)
Stream #0:4[0x104]: Data: klv (KLVA / 0x41564C4B)
Out of above
Stream #0:2[0x102](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s
Is the stream in question.
Try to decode it or transcode it to 'aac' format.
What I have seen is the call to avcodec_send_packet returns AAC_AC3_PARSE_ERROR_SYNC
Also try to play it in VLC player .......you will get all the audio streams properly.
Please see what is the issue in ffmpeg and whether/how it can be solved/worked around.
Thanks for your support
follow-up: 7 comment:6 by , 23 months ago
Okay, first of all this is not just ac3, this is fltp.
Second, it does not happen here, use normal source of binaries: https://github.com/BtbN/FFmpeg-Builds
comment:7 by , 23 months ago
I am almost a newbie to this technology, so pl excuse me if I make some basic mistakes.
Replying to Balling:
Okay, first of all this is not just ac3, this is fltp.
yes. ffprobe output showed that; however all the audio streams in this TS seem to be AC3 fltp, if I understand it correctly. Then why only
Stream #0:2[0x102](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s
has this issue? Other two audio streams decode just fine with ffmpeg?
Second, it does not happen here, use normal source of binaries: https://github.com/BtbN/FFmpeg-Builds
Are you saying this issue is not happening/will not happen in one of those builds? Okay. I will try all those, if required; However please note that this happens in all the ffmpeg versions I have
and libav libraries we are using with go bindings in our golang application.
Thanks
follow-up: 9 comment:8 by , 23 months ago
Are you saying this issue is not happening/will not happen in one of those builds? Okay
Yes.
comment:9 by , 23 months ago
Replying to Balling:
Are you saying this issue is not happening/will not happen in one of those builds? Okay
Yes.
I downloaded ffmpeg-n4.4.3-3-gb48951bd29-linux64-gpl-4.4 to verify that.
Here is what I tried on that input file
./ffmpeg -i orig_file.ts -vcodec copy -acodec aac -map 0:v:0 -map 0:a:1 ff_vlc_aac_1.ts
I got this
ffmpeg version n4.4.3-3-gb48951bd29-20221224 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1) configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --disable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --disable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --disable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --disable-vulkan --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20221224 libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 [mpegts @ 0x55dc206ade40] start time for stream 4 is not set in estimate_timings_from_pts [mpegts @ 0x55dc206ade40] PES packet size mismatch [mpegts @ 0x55dc206ade40] Packet corrupt (stream = 1, dts = 24133680). Input #0, mpegts, from 'orig_file.ts': Duration: 00:00:16.52, start: 251.672000, bitrate: 2479 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 856x480 [SAR 320:321 DAR 16:9], 30 fps, 59.94 tbr, 90k tbn, 60 tbc Stream #0:1[0x101](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s Stream #0:2[0x102](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s Stream #0:3[0x103](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired) (descriptions) Stream #0:4[0x104]: Data: klv (KLVA / 0x41564C4B) Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:2 -> #0:1 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help Error while decoding stream #0:2: Error number -16976906 occurred Last message repeated 512 times Output #0, mpegts, to 'ff_vlc_aac_1.ts': Metadata: encoder : Lavf58.76.100 Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 856x480 [SAR 320:321 DAR 16:9], q=2-31, 30 fps, 59.94 tbr, 90k tbn, 90k tbc Stream #0:1(spa): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc58.134.100 aac frame= 495 fps=0.0 q=-1.0 Lsize= 3243kB time=00:00:16.50 bitrate=1609.4kbits/s speed= 985x video:3056kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.115911% [aac @ 0x55dc209bf0c0] Qavg: nan Conversion failed!
It created output file ff_vlc_aac_1.ts. I tried ffprobe on that file as follows:
./ffprobe ff_vlc_aac_1.ts
I got
ffprobe version n4.4.3-3-gb48951bd29-20221224 Copyright (c) 2007-2022 the FFmpeg developers built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1) configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --disable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --disable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --disable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --disable-vulkan --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20221224 libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 [mpegts @ 0x55b96a0a4580] start time for stream 1 is not set in estimate_timings_from_pts [mpegts @ 0x55b96a0a4580] stream 1 : no TS found at start of file, duration not set [mpegts @ 0x55b96a0a4580] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels): unspecified sample format Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'ff_vlc_aac_1.ts': Duration: 00:00:16.48, start: 1.438678, bitrate: 1611 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 856x480 [SAR 320:321 DAR 16:9], 30 fps, 59.94 tbr, 90k tbn, 60 tbc Stream #0:1[0x101](spa): Audio: aac ([15][0][0][0] / 0x000F), 0 channels
I tried to play the output file in VLC... I did not have any sound ... nor it could show any detailed codec info
I tried the exact same procedure with other two audio streams ... The results are successful.
Please see.
Thanks for the support you are trying to offer.
follow-up: 11 comment:10 by , 23 months ago
downloaded ffmpeg-n4.4.3-3-gb48951bd29-linux64-gpl-4.4 to verify that.
We do not support anything except git master here.
I tried to play the output file in VLC... I did not have any sound ..
Use something normal like mpv.
comment:11 by , 23 months ago
Replying to Balling:
downloaded ffmpeg-n4.4.3-3-gb48951bd29-linux64-gpl-4.4 to verify that.
We do not support anything except git master here.
In fact I started all this from cloning git repo. I faced the problem in master branch only. I posted that to both ffmpeg-users and ffmpeg-devel mailing lists. I was guided over to here from devel mailing list. If you see my orginal post here, that is the output that I got from master branch itself.
Subsequent to that when you said this problem does not occur in released branches, I tried to verify that... and did not see the expected result. That was the reason why I reported that.
Kindly consider this as an issue from master branch only.
I tried to play the output file in VLC... I did not have any sound ..
Use something normal like mpv.
Point of VLC was for confirming that there is no audio in the output.
Please see.
Thanks
comment:12 by , 22 months ago
In fact I started all this from cloning git repo
You do not need to clone anything. You should just download our official binaries: https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip
Point of VLC was for confirming that there is no audio in the output.
Insane amount of bugs in VLC... ffplay or mpv 99.99% work the same as ffmpeg. mpv build with master ffmpeg is here: https://github.com/zhongfly/mpv-winbuild
comment:13 by , 14 months ago
Resolution: | → needs_more_info |
---|---|
Status: | new → closed |
How did you create the file you attached? The console output indicates that you created it with FFmpeg which makes little sense for such a ticket - please use dd to cut transport streams, not FFmpeg.