Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5890 closed defect (fixed)

DVTel Camera G726 Audio

Reported by: Dennis Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: rtp g726
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
The G726 audio stream from my DVTel camera is not automatically decoded properly by ffmpeg. Default output produces noise. Forcing the decoder: "g726le" produces the desired audio.

Please see attached packet capture for more information.

How to reproduce:

ffmpeg -i rtsp://172.16.10.31/h264 C:\Temp\Test.mp4
ffmpeg version N-81972-g8063978 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 --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 61.102 / 57. 61.102
  libavformat    57. 51.106 / 57. 51.106
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, rtsp, from 'rtsp://172.16.10.31/h264':
  Metadata:
    title           : Session streamed by "nessyMediaServer"
    comment         : h264
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709), 2560x1440 [SAR 1:1 DAR 16:9], 24 fps, 30 tbr, 90k tbn, 48 tbc
    Stream #0:1: Audio: adpcm_g726, 8000 Hz, mono, s16, 40 kb/s
    Stream #0:2: Data: none
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0000000003340780] using SAR=1/1
[libx264 @ 0000000003340780] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000000003340780] profile High, level 5.0
[libx264 @ 0000000003340780] 264 - core 148 r2721 72d53ab - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[aac @ 0000000003461260] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
Output #0, mp4, to 'C:\Temp\Test.mp4':
  Metadata:
    title           : Session streamed by "nessyMediaServer"
    comment         : h264
    encoder         : Lavf57.51.106
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 2560x1440 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.61.102 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 8000 Hz, mono, fltp, 48 kb/s
    Metadata:
      encoder         : Lavc57.61.102 aac
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (adpcm_g726 (g726) -> aac (native))
Press [q] to stop, [?] for help
Past duration 0.996986 too large
Past duration 0.996666 too large
Past duration 0.995995 too large
Past duration 0.995659 too large
[rtsp @ 0000000000f46300] max delay reached. need to consume packet
[rtsp @ 0000000000f46300] RTP: missed 45 packets
[h264 @ 000000000082f800] error while decoding MB 135 19, bytestream -5
[h264 @ 000000000082f800] concealing 11274 DC, 11274 AC, 11274 MV errors in P frame
[rtsp @ 0000000000f46300] max delay reached. need to consume packet   0.3kbits/s dup=11 drop=4 speed=2.68x
[rtsp @ 0000000000f46300] RTP: missed 9 packets
[h264 @ 000000000082f340] error while decoding MB 145 60, bytestream -5
[h264 @ 000000000082f340] concealing 4704 DC, 4704 AC, 4704 MV errors in P frame
[rtsp @ 0000000000f46300] max delay reached. need to consume packet=2801.9kbits/s dup=24 drop=4 speed=1.36x
[rtsp @ 0000000000f46300] RTP: missed 67 packets
[h264 @ 000000000082ee60] error while decoding MB 44 72, bytestream -7
[h264 @ 000000000082ee60] concealing 2885 DC, 2885 AC, 2885 MV errors in P frame
frame=  127 fps= 23 q=-1.0 Lsize=    4235kB time=00:00:05.00 bitrate=6926.3kbits/s dup=33 drop=4 speed=0.912x
video:4208kB audio:23kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.086667%
[libx264 @ 0000000003340780] frame I:1     Avg QP:17.71  size:255770
[libx264 @ 0000000003340780] frame P:44    Avg QP:20.31  size: 63998
[libx264 @ 0000000003340780] frame B:82    Avg QP:23.93  size: 15081
[libx264 @ 0000000003340780] consecutive B-frames: 11.0%  6.3%  7.1% 75.6%
[libx264 @ 0000000003340780] mb I  I16..4: 20.0% 50.9% 29.1%
[libx264 @ 0000000003340780] mb P  I16..4:  0.7%  2.0%  0.8%  P16..4: 39.2%  8.1%  5.8%  0.0%  0.0%    skip:43.5%
[libx264 @ 0000000003340780] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 25.4%  1.5%  0.5%  direct: 4.3%  skip:68.2%  L0:55.1% L1:43.5% BI: 1.4%
[libx264 @ 0000000003340780] 8x8 transform intra:55.5% inter:41.1%
[libx264 @ 0000000003340780] coded y,uvDC,uvAC intra: 76.5% 83.3% 41.8% inter: 9.9% 25.7% 2.6%
[libx264 @ 0000000003340780] i16 v,h,dc,p: 37% 14% 33% 16%
[libx264 @ 0000000003340780] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 17% 26%  5%  5%  6%  6%  6%  6%
[libx264 @ 0000000003340780] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 19% 23%  6%  6%  6%  6%  5%  5%
[libx264 @ 0000000003340780] i8c dc,h,v,p: 59% 18% 18%  5%
[libx264 @ 0000000003340780] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000003340780] ref P L0: 70.0%  7.5% 15.5%  7.0%
[libx264 @ 0000000003340780] ref B L0: 93.9%  5.5%  0.6%
[libx264 @ 0000000003340780] ref B L1: 96.2%  3.8%
[libx264 @ 0000000003340780] kb/s:8141.69
[aac @ 0000000003461260] Qavg: 52130.945
Exiting normally, received signal 2.

Attachments (2)

test.pcapng (92.5 KB ) - added by Dennis 7 years ago.
test capture with ffplay forced to the correct codec g726le
patchrtpg726.diff (843 bytes ) - added by Carl Eugen Hoyos 7 years ago.

Download all attachments as: .zip

Change History (8)

by Dennis, 7 years ago

Attachment: test.pcapng added

test capture with ffplay forced to the correct codec g726le

by Carl Eugen Hoyos, 7 years ago

Attachment: patchrtpg726.diff added

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedavformat
Keywords: rtp g726 added
Priority: minornormal
Version: unspecifiedgit-master

Please test attached patch.

comment:2 by Dennis, 7 years ago

Thank you for the fast patch.
Unfortunately, I am unable to compile ffmpeg myself in order to test.

Last edited 7 years ago by Dennis (previous) (diff)

comment:3 by Carl Eugen Hoyos, 7 years ago

Resolution: fixed
Status: newclosed

Should be fixed in 6969bed12c6fc53509aa694aab32d01838318f30, please test and report back.

in reply to:  3 comment:4 by Carl Eugen Hoyos, 7 years ago

Replying to cehoyos:

Should be fixed in 6969bed12c6fc53509aa694aab32d01838318f30, please test and report back.

Ping.

comment:5 by Dennis, 7 years ago

Sorry for the delay.
Yes, I confirm this is fixed.

comment:6 by Carl Eugen Hoyos, 7 years ago

Thank you!

Note: See TracTickets for help on using tickets.