Opened 7 years ago
Last modified 7 years ago
#5820 new defect
WMA Lossless 24-bit Distortions via RTSP
Reported by: | Dennis | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | udp rtsp |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When trans-coding an RTSP stream with WMA Lossless 24-bit audio to a WAV file, ffmpeg produces many audible artifacts. Stream is publicly available for testing: rtsp://djxmmx.net/rap-rnb. Please see next post for links to the output files produced by ffmpeg.
How to reproduce:
ffmpeg -i rtsp://djxmmx.net/rap-rnb C:\Temp\Out-RTSP.wav ffmpeg version N-81516-gbe07c25 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.0 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --ena ble-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --ena ble-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --e nable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-lib openh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-lib soxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvo rbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-li bxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib libavutil 55. 29.100 / 55. 29.100 libavcodec 57. 54.101 / 57. 54.101 libavformat 57. 48.101 / 57. 48.101 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 58.100 / 6. 58.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 [wmalossless @ 00000000003fe4e0] Decoding audio at 24 bit-depth Input #0, rtsp, from 'rtsp://djxmmx.net/rap-rnb': Metadata: MediaFoundationVersion: 2.112 DeviceConformanceTemplate: N2 WM/WMADRCPeakReference: 32767 WM/WMADRCPeakTarget: 32767 WM/WMADRCAverageReference: 10194 WM/WMADRCAverageTarget: 10194 genre : R&B WMFSDKVersion : 11.0.5721.5145 WMFSDKNeeded : 0.0.0.0000 album : Thr33 Ringz track : 11 WM/Track : 10 WM/Year : 2008 PeakValue : 32673 AverageLevel : 7035 IsVBR : 1 title : Long Lap Dance artist : T-Pain Duration: 00:04:36.47, start: 199.296000, bitrate: N/A Stream #0:0: Audio: wmalossless (c[1][0][0] / 0x0163), 96000 Hz, stereo, s32p (24 bit), 1152 kb/s [wmalossless @ 0000000002d04120] Decoding audio at 24 bit-depth [wav @ 0000000002d045c0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar in stead. Output #0, wav, to 'C:\Temp\Out-RTSP.wav': Metadata: MediaFoundationVersion: 2.112 DeviceConformanceTemplate: N2 WM/WMADRCPeakReference: 32767 WM/WMADRCPeakTarget: 32767 WM/WMADRCAverageReference: 10194 WM/WMADRCAverageTarget: 10194 IGNR : R&B WMFSDKVersion : 11.0.5721.5145 WMFSDKNeeded : 0.0.0.0000 IPRD : Thr33 Ringz IPRT : 11 WM/Track : 10 WM/Year : 2008 PeakValue : 32673 AverageLevel : 7035 IsVBR : 1 INAM : Long Lap Dance IART : T-Pain ISFT : Lavf57.48.101 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 96000 Hz, stereo, s16, 3072 kb/s Metadata: encoder : Lavc57.54.101 pcm_s16le Stream mapping: Stream #0:0 -> #0:0 (wmalossless (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [rtsp @ 000000000030a920] max delay reached. need to consume packet [rtsp @ 000000000030a920] RTP: missed 141 packets [wmalossless @ 0000000002d04120] broken frame: channel len(6656) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(4352) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(4608) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(7680) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(5632) > samples_per_frame(4096) [wmalossless @ 0000000002d04120] broken frame: channel len(4864) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(4352) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] Order[0][1] 608 > max (256), not supported [rtsp @ 000000000030a920] max delay reached. need to consume packet [rtsp @ 000000000030a920] RTP: missed 15 packets [wmalossless @ 0000000002d04120] Packet loss detected! seq 3 vs 6 [wmalossless @ 0000000002d04120] broken frame: channel len(5120) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] Arithmetic coding is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [wmalossless @ 0000000002d04120] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(4352) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(4352) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] Order[0][0] 776 > max (256), not supported Error while decoding stream #0:0: Invalid data found when processing input [rtsp @ 000000000030a920] max delay reached. need to consume packet [rtsp @ 000000000030a920] RTP: missed 6 packets [wmalossless @ 0000000002d04120] Packet loss detected! seq 6 vs 8 [wmalossless @ 0000000002d04120] broken frame: channel len(4608) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] broken frame: channel len(6912) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [rtsp @ 000000000030a920] max delay reached. need to consume packet [rtsp @ 000000000030a920] RTP: missed 24 packets [wmalossless @ 0000000002d04120] Packet loss detected! seq 2 vs 6 [rtsp @ 000000000030a920] max delay reached. need to consume packet [rtsp @ 000000000030a920] RTP: missed 6 packets [wmalossless @ 0000000002d04120] Packet loss detected! seq c vs e [rtsp @ 000000000030a920] max delay reached. need to consume packet [rtsp @ 000000000030a920] RTP: missed 24 packets [wmalossless @ 0000000002d04120] Packet loss detected! seq 4 vs 8 [rtsp @ 000000000030a920] RTP: missed 9 packets [wmalossless @ 0000000002d04120] Packet loss detected! seq 8 vs a [wmalossless @ 0000000002d04120] broken frame: channel len(4608) > samples_per_frame(4096) [wmalossless @ 0000000002d04120] broken frame: channel len(6144) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] Expect wrong output since inverse LPC filter is not implemented. Update your FFmpeg ver sion to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been i mplemented. [wmalossless @ 0000000002d04120] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org) [wmalossless @ 0000000002d04120] Expect wrong output since inverse LPC filter is not implemented. Update your FFmpeg ver sion to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been i mplemented. [wmalossless @ 0000000002d04120] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org) [wmalossless @ 0000000002d04120] broken frame: channel len(4608) > samples_per_frame(4096) Error while decoding stream #0:0: Invalid data found when processing input [wmalossless @ 0000000002d04120] Order[0][0] 968 > max (256), not supported Error while decoding stream #0:0: Invalid data found when processing input size= 24720kB time=00:01:08.18 bitrate=2970.1kbits/s speed=1.27x video:0kB audio:24720kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000735% Exiting normally, received signal 2.
Change History (6)
follow-up: 2 comment:1 by , 7 years ago
comment:2 by , 7 years ago
Keywords: | udp rtsp added |
---|---|
Version: | unspecified → git-master |
Replying to DJX:
https://www.djxmmx.net/ffmpeg/5820/
"Out-File.wav" was created with ffmpeg, trans-coding the same file that was streamed over RTSP but directly on the hard disk.
"Out-RTSP.wav" was created with ffmpeg, trans-coding the RTSP stream.
I would say both do not help, providing the original wma lossless file might.
Am I correct that the issue is not reproducible with -rtsp_method tcp
?
comment:3 by , 7 years ago
Sorry for not providing the original file.
I put a copy of it in the same directory: https://www.djxmmx.net/ffmpeg/5820/
As far as your suggestion of "-rtsp_method tcp", I tried that both before and after my input argument and I receive: "Unrecognized option 'rtsp_method'.Error splitting the argument list: Option not found".
I should of also mentioned this in my original post but this is an RTSP stream from a Windows Media Server.
comment:5 by , 7 years ago
Playing the same song again on the stream and running the modified command you suggested results in artifact free output and only a few warnings about "Non-monotonous DTS":
ffmpeg -rtsp_transport tcp -i rtsp://djxmmx.net/rap-rnb C:\Temp\Out-RTSP.wav ffmpeg version N-81516-gbe07c25 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.0 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --ena ble-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --ena ble-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --e nable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-lib openh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-lib soxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvo rbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-li bxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib libavutil 55. 29.100 / 55. 29.100 libavcodec 57. 54.101 / 57. 54.101 libavformat 57. 48.101 / 57. 48.101 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 58.100 / 6. 58.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 [wmalossless @ 00000000002ce680] Decoding audio at 24 bit-depth Input #0, rtsp, from 'rtsp://djxmmx.net/rap-rnb': Metadata: MediaFoundationVersion: 2.112 DeviceConformanceTemplate: N2 WM/WMADRCPeakReference: 32767 WM/WMADRCPeakTarget: 32767 WM/WMADRCAverageReference: 10194 WM/WMADRCAverageTarget: 10194 genre : R&B WMFSDKVersion : 11.0.5721.5145 WMFSDKNeeded : 0.0.0.0000 album : Thr33 Ringz track : 11 WM/Track : 10 WM/Year : 2008 PeakValue : 32673 AverageLevel : 7035 IsVBR : 1 title : Long Lap Dance artist : T-Pain Duration: 00:04:36.47, start: 1.962000, bitrate: N/A Stream #0:0: Audio: wmalossless (c[1][0][0] / 0x0163), 96000 Hz, stereo, s32p (24 bit), 1152 kb/s [wmalossless @ 00000000002cc2e0] Decoding audio at 24 bit-depth [wav @ 0000000002d13b80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar in stead. Output #0, wav, to 'C:\Temp\Out-RTSP.wav': Metadata: MediaFoundationVersion: 2.112 DeviceConformanceTemplate: N2 WM/WMADRCPeakReference: 32767 WM/WMADRCPeakTarget: 32767 WM/WMADRCAverageReference: 10194 WM/WMADRCAverageTarget: 10194 IGNR : R&B WMFSDKVersion : 11.0.5721.5145 WMFSDKNeeded : 0.0.0.0000 IPRD : Thr33 Ringz IPRT : 11 WM/Track : 10 WM/Year : 2008 PeakValue : 32673 AverageLevel : 7035 IsVBR : 1 INAM : Long Lap Dance IART : T-Pain ISFT : Lavf57.48.101 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 96000 Hz, stereo, s16, 3072 kb/s Metadata: encoder : Lavc57.54.101 pcm_s16le Stream mapping: Stream #0:0 -> #0:0 (wmalossless (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [wav @ 0000000002d13b80] Non-monotonous DTS in output stream 0:0; previous: 577600, current: 577536; changing to 577600. This may result in incorrect timestamps in the output file. [wav @ 0000000002d13b80] Non-monotonous DTS in output stream 0:0; previous: 9158752, current: 9158688; changing to 91587 52. This may result in incorrect timestamps in the output file. [wav @ 0000000002d13b80] Non-monotonous DTS in output stream 0:0; previous: 9617536, current: 9617472; changing to 96175 36. This may result in incorrect timestamps in the output file. [wav @ 0000000002d13b80] Non-monotonous DTS in output stream 0:0; previous: 15913024, current: 15912960; changing to 159 13024. This may result in incorrect timestamps in the output file. [wav @ 0000000002d13b80] Non-monotonous DTS in output stream 0:0; previous: 16580704, current: 16580640; changing to 165 80704. This may result in incorrect timestamps in the output file. [wav @ 0000000002d13b80] Non-monotonous DTS in output stream 0:0; previous: 26275936, current: 26275872; changing to 262 75936. This may result in incorrect timestamps in the output file. [wav @ 0000000002d13b80] Non-monotonous DTS in output stream 0:0; previous: 26349664, current: 26349600; changing to 263 49664. This may result in incorrect timestamps in the output file. av_interleaved_write_frame(): Immediate exit requested Error writing trailer of C:\Temp\Out-RTSP.wav: Immediate exit requestedsize= 102816kB time=00:04:34.54 bitrate=3067.9kb its/s speed=0.973x video:0kB audio:102827kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Exiting normally, received signal 2.
https://www.djxmmx.net/ffmpeg/5820/
"Out-File.wav" was created with ffmpeg, trans-coding the same file that was streamed over RTSP but directly on the hard disk.
"Out-RTSP.wav" was created with ffmpeg, trans-coding the RTSP stream.