[FFmpeg-user] Samsung HanWha QNV-7010RN Security Camera Stream - No Sound with ffplay

Patrick Kirchner patrickkirchner at yahoo.com
Sat Jun 8 18:50:35 EEST 2019


 

    On Monday, June 3, 2019, 10:56:24 PM CDT, Patrick Kirchner <patrickkirchner at yahoo.com> wrote:  
 
 On Monday, June 3, 2019, 10:28:43 AM CDT, Moritz Barsnick <barsnick at gmx.net> wrote:  
 
 On Mon, Jun 03, 2019 at 01:44:58 +0000, Patrick Kirchner via ffmpeg-user wrote:
> SDL_OpenAudio (1 channels, 8000 Hz): ALSA: Couldn't set audio channels
> No more combinations to try, audio open failed

This means that ffplay's SDL audio implementation can't play to the
available audio device. Perhaps ffplay doesn't automatically try to
convert to a suitable format - assuming ALSA might accept 44.1 or 48
kHz. You could try to insert an audio filter into ffplay to change the
sample rate (probably "-af aresample=48000").

mplayer most likely uses some other mechanism for playing audio,
perhaps OSS, and therefore succeeds by default.

Cheers,
Moritz
_______________________________________________
Thanks Moritz.  I tried a few rates but they all failed and looked like this:
ffplay -fs -af aresample=48000 rtsp://nope:notmyrealpassword@192.168.1.20:554/profile3/media.smp
ffplay version 4.1.3 Copyright (c) 2003-2019 the FFmpeg developers
  built with gcc 8.3.0 (Gentoo 8.3.0-r1 p1.1)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/share/doc/ffmpeg-4.1.3/html --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=core-avx2 -O2 -pipe' --disable-static --enable-avfilter --enable-avresample --disable-stripping --disable-optimizations --disable-libcelt --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-nonfree --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt --disable-gnutls --disable-gmp --enable-gpl --enable-hardcoded-tables --enable-iconv --disable-libtls --disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --disable-vaapi --enable-vdpau --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libcodec2 --enable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm --disable-mmal --disable-libmodplug --disable-libopus --disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt --enable-librsvg --enable-ffnvcodec --enable-libvorbis --disable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b --disable-chromaprint --disable-libflite --disable-frei0r --disable-libfribidi --disable-fontconfig --disable-ladspa --disable-libass --disable-lv2 --enable-libfreetype --disable-librubberband --disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-libvo-amrwbenc --enable-libmp3lame --disable-libkvazaar --disable-libaom --disable-libopenh264 --disable-libsnappy --disable-libtheora --disable-libtwolame --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-fma4 --disable-xop --cpu=core-avx2 --disable-doc --disable-htmlpages --enable-manpages
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, rtsp, from 'rtsp://nope:notmyrealpassword@192.168.1.20:554/profile3/media.smp':
  Metadata:
    title           : Media Presentation
    comment         : samsung
  Duration: N/A, start: -0.225000, bitrate: N/A
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 2592x1520, 7.92 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: adpcm_g726le, 8000 Hz, mono, s16, 32 kb/s
    Stream #0:2: Data: none
SDL_OpenAudio (1 channels, 48000 Hz): ALSA: Couldn't set audio channels
SDL_OpenAudio (1 channels, 44100 Hz): ALSA: Couldn't set audio channels
No more combinations to try, audio open failed
[rtsp @ 0x7f2ba4000b80] max delay reached. need to consume packet
[rtsp @ 0x7f2ba4000b80] RTP: missed 11 packets
^C 0.93 M-V: -0.001 fd=   0 aq=    0KB vq=  491KB sq=    0B f=0/0
When I play it with mplayer I have to actually use "mplayer -ao alsa" in order for it to work, so I think it's should be possible with ffplay and alsa as well.
Looks like mplayer is bumping it up to 32000 and 2 channels:
 ==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 8000 Hz, 1 ch, s16le, 32.0 kbit/25.00% (ratio: 4000->16000)
Selected audio codec: [ffg726le] afm: ffmpeg (FFmpeg G.726 little endian Audio)
==========================================================================
AO: [alsa] 32000Hz 2ch s16le (2 bytes per sample)
I have no luck with ffplay using "-af aresample=32000" and when I try to change it to "-ac 2" I get this type of complaint:
[g726le @ 0x7f7070006600] Decoding more than one channel 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.

I know ffplay (version 4.1.3) can play this stream though as I'm able to play it from my OSX laptop using a MacPorts version of ffmpeg/ffplay that is also version 4.1.3 without any issues:
ffplay rtsp://nope:notmyrealpassword@192.168.1.20:554/profile3/media.smp
ffplay version 4.1.3 Copyright (c) 2003-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Input #0, rtsp, from 'rtsp://nope:notmyrealpassword@192.168.1.20:554/profile3/media.smp':
  Metadata:
    title           : Media Presentation
    comment         : samsung
  Duration: N/A, start: 0.064189, bitrate: N/A
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 2592x1520, 7.92 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: adpcm_g726le, 8000 Hz, mono, s16, 32 kb/s
    Stream #0:2: Data: none
   3.63 A-V: -0.018 fd=   0 aq=    8KB vq=  491KB sq=    0B f=0/0------------------------------------------------------------------------


I've still had no luck getting this to work with my nVidia/HDMI to A/V receiver system although it plays fine on my OSX MacPorts with ffplay.
With MPlayer, there are audio output options to chose either sdl or alsa seperately, but it seems that ffplay can only use alsa along with sdl.  Is there another way to play something with ffplay and alsa without use sdl?
Thanks,Patrick.


    


More information about the ffmpeg-user mailing list