Can I change audio codec of RTSP stream from Nx server?

Answered

Comments

11 comments

  • Avatar
    Norman - Nx Support

    Hi Makoto Ogata,

    The codec for the audio, could be set in the devices' interface if this option is available.

    0
    Comment actions Permalink
  • Avatar
    Makoto Ogata

    Hi Norman Graafsma.

    Thank you for quick reply.

    Audio codec of my IP camera is G.711, and RTSP streaming from IP camera has G.711 audio,

    but when I get RTSP streaming of the IP camera from Nx server has mp2 audio.

    I assume that Nx server converts audio stream.

    Could you correct me if I'm wrong.

    Thank you.

    0
    Comment actions Permalink
  • Avatar
    Makoto Ogata

    Hi Norman Graafsma.

    Is there any updates for above question?

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Hi Makoto Ogata,

    Nx takes the codec as it is offered and Nx doesn't change it.

    0
    Comment actions Permalink
  • Avatar
    Makoto Ogata

    Hi Norman Graafsma.

    Hmm... but I confirmed that the audio codec is different when I get the RTSP stream directly from the IP camera and when I get the RTSP stream through the Nx server as below.

    In my point of view, audio stream is converted from mulaw to mp2 codec.

    Could you re-confirm the audio codec related spec of Nx server?

    RTSP from a IP camera

    develop@pop-os:~$ ffprobe rtsp://admin:xxxx@192.168.0.10/ONVIF/MediaInput?profile=def_profile1
    ffprobe version 4.4.1-3ubuntu5 Copyright (c) 2007-2021 the FFmpeg developers
      built with gcc 11 (Ubuntu 11.2.0-18ubuntu1)
    ...
    Input #0, rtsp, from 'rtsp://admin:xxxx@192.168.0.10/ONVIF/MediaInput?profile=def_profile1':
      Metadata:
        title           : Media Presentation
      Duration: N/A, start: 0.000000, bitrate: N/A
      Stream #0:0: Video: h264 (Baseline), yuv420p(tv, progressive), 1280x720, 30 fps, 30 tbr, 90k tbn, 60 tbc
      Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s

     


    RTSP from Nx server

    develop@pop-os:~$ ffprobe rtsp://admin:xxxx@192.168.0.22:7001/219d661b-ec18-5b84-f8d7-07ac6fa357c7
    ffprobe version 4.4.1-3ubuntu5 Copyright (c) 2007-2021 the FFmpeg developers
      built with gcc 11 (Ubuntu 11.2.0-18ubuntu1)
      ...
    [rtsp @ 0x562409aa9e80] max delay reached. need to consume packet
    [rtsp @ 0x562409aa9e80] RTP: missed 127 packets
    Input #0, rtsp, from 'rtsp://admin:xxxx@192.168.0.22:7001/219d661b-ec18-5b84-f8d7-07ac6fa357c7':
      Metadata:
        title           : Panasonic_WV-S3510
      Duration: N/A, start: 0.200000, bitrate: N/A
      Stream #0:0: Video: h264 (Baseline), yuv420p(tv, progressive), 1280x720, 30 fps, 30 tbr, 90k tbn, 60 tbc
      Stream #0:1: Audio: mp2, 16000 Hz, mono, fltp, 64 kb/s
    0
    Comment actions Permalink
  • Avatar
    Makoto Ogata

    Hi Norman Graafsma

    FYI, let me share the info of the target IP camera as below.

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Thank you for the feedback Makoto Ogata.

    The information I initially provided, was incorrect. My apologies.

    I have verified this myself and internally. Unfortunately, due to a software limitation, the audio is indeed converted to mp2.

    I'll create a request for our developers to offer an option to specify the audio codec when using the RTSP stream.

    That being said, I don't expect that we can deliver such an option soon, if at all.

     

    JIRA-VMS-33801

     

    0
    Comment actions Permalink
  • Avatar
    Makoto Ogata

    Hello Norman Graafsma

    Thank you very much for your reply.

    I understand the situation.

    Let me confirm one thing about audio codec.

    Will Nx server coverts any kind of audio codec to mp2?

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Hi Makoto Ogata,

    Covert or convert?

    I assume the last; yes, currently Nx converts the audio stream to mp2.

    As mentioned above, I have requested our developers to investigate if they can change this in a future release, so you can select the preferred codec.

    0
    Comment actions Permalink
  • Avatar
    Mohd Iqbal Radzuan

    Hi Norman

    Is there any update on this JIRA JIRA-VMS-33801 since past 2 years ago?

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Hi Mohd Iqbal Radzuan,

    The issue was resolved by adding AAC as an option to use for an RTSP stream:

    You can check all options in the API documentation / Media / RTSP streaming.

    0
    Comment actions Permalink

Post is closed for comments.