Giter Site home page Giter Site logo

Comments (12)

signalogic avatar signalogic commented on July 28, 2024

Hi Syed, can you try this command line:

mediaMin -cx86 -i../pcaps/EVS_16khz_13200bps_CH_PT127_IPv4.pcap -L -d0xc11 -r20

this should produce both a pcap and wav file (about 4.7MB) in the mediaMin subfolder (located under the mediaTest folder).

I ran that test and audio quality is perfect - Wireshark shows 20.27 msec average packet delta and max jitter of 0.04 msec.

In the meantime, I will look at the mediaTest command line and see why it didn't generate a wav file. Also if you have any other trouble with example command lines on the Github page, let me know ASAP

Thanks, Jeff

from sigsrf_sdk.

signalogic avatar signalogic commented on July 28, 2024

Also, you can run:

mediaMin -cx86 -i../pcaps/EVS_16khz_13200bps_CH_PT127_IPv4.pcap -L -d0xc11 -r0.5

to reduce processing time from 5 min (real-time) to about 7 sec

from sigsrf_sdk.

syed-ahmad-maaz avatar syed-ahmad-maaz commented on July 28, 2024

I ran the command
mediaMin -cx86 -i../pcaps/EVS_16khz_13200bps_CH_PT127_IPv4.pcap -L -d0xc11 -r0.5

and it ran successfully, wav file is also generated and it is perfectly clear.
I also tested my pcaps of EVS AMRWB IO 23850 but the wav file generated contained some noise.
I also encountered some errors during the execution of EVS AMRWB IO pcap.
The command i used for the execution of EVS AMRWB IO pcap is:

mediaMin -cx86 -i/home/Codecs/EVS23/2024-03-04_10-23-53__971566857734__971542457837__ID14379613286.pcap -L -d0xc11 -r0.5

The errors i encountered are:

00:00:00.444.315 WARNING: DSCodecDecode() says failed to correctly parse ToC byte in EVS payload, first byte of input = 0xf0, ToC[1] = 0x2a, payloadSize[1] = -1, fAMRWB_IOMode = 1 
00:00:00.444.358 ERROR: pkt/media thread 0 says DSCodecDecode() returned error condition, hSession = 1, chnum = 2, pyld_len = 60, hCodec = 4 
Pushed pkts 1608, pulled pkts 2024j 2023x 981s  Pkts recv 1791 buf 1791 jb 2216 xc 2215 sg 1103 sent 2215 mnp 159 175 -1 pd 20.00 20.08 -1.007 -1.00
SigSRF EVS decoder says error in EVS(AMRWBIO) FT ToC header 0xb3, num_bits = 285, pyld_len = 37, payload[0] = 0xb3 
Pushed pkts 2003, pulled pkts 2426j 2425x 1182s	Pkts recv 1950 buf 1950 jb 2375 xc 2374 sg 1187 sent 2374 mnp 159 175 -1 pd 20.00 19.56 -1.00
SigSRF EVS decoder says error in EVS(AMRWBIO) FT ToC header 0xbf, num_bits = 0, pyld_len = 1, payload[0] = 0xbf 

I also tried to generate wav file of EVS AMRWB IO by following the instructions on this link: 3GPP Reference Code Notes

But when i ran the EVS Decoder using the following command:

./EVS_dec -mime -no_delay_cmp 16 sample.cod sample.raw

I enountered the error:
Error in EVS(AMRWBIO) FT ToC header(ff)

Also tried to generate the wav file of pcap you have provided in the pcaps folder: AMRWB-23.85kbps-20ms_bw.pcap Using the command

mediaMin -cx86 -i../pcaps/AMRWB-23.85kbps-20ms_bw.pcap -L -d0xc11 -r0.5

But the error encountered are:

DSGetPacketInfo() returns error value for new session packet, no codec estimation performed, malformed UDP/RTP packet, IP hdr len = 20, rtp pyld len = 61, rtp padding size = 0, pkt len = 105, rtp pyld type = 101. Possibly try ALLOW_OUTOFSPEC_RTP_PADDING flag in cmd line -dN argument 
DSGetPacketInfo() returns error value for new session packet, no codec estimation performed, malformed UDP/RTP packet, IP hdr len = 20, rtp pyld len = 61, rtp padding size = 0, pkt len = 105, rtp pyld type = 101. Possibly try ALLOW_OUTOFSPEC_RTP_PADDING flag in cmd line -dN argument 
DSGetPacketInfo() returns error value for new session packet, no codec estimation performed, malformed UDP/RTP packet, IP hdr len = 20, rtp pyld len = 61, rtp padding size = 0, pkt len = 105, rtp pyld type = 101. Possibly try ALLOW_OUTOFSPEC_RTP_PADDING flag in cmd line -dN argument 
DSGetPacketInfo() returns error value for new session packet, no codec estimation performed, malformed UDP/RTP packet, IP hdr len = 20, rtp pyld len = 61, rtp padding size = 0, pkt len = 105, rtp pyld type = 101. Possibly try ALLOW_OUTOFSPEC_RTP_PADDING flag in cmd line -dN argument 

Note: No wav file is generated (In case of AMRWB-23.85kbps-20ms_bw.pcap)

If you have a sample of EVS AMRWB IO 23850 pcap, kindly share it for testing purposes.

Log file for the EVS AMRWB IO pcap and AMRWB-23.85kbps-20ms_bw.pcap is attached:

EVS AMRWB IO pcap log file:
2024-03-04_10-23-53__971566857734__971542457837__ID14379613286_event_log.txt

AMRWB-23.85kbps-20ms_bw.pcap log file:
AMRWB-23.85kbps-20ms_bw_event_log.txt

from sigsrf_sdk.

signalogic avatar signalogic commented on July 28, 2024

Hi Syed yes we have several EVS AMR-WB IO mode pcaps, but they came from customers. What I can do is anonymize one of those, and replace the audio with some noise or silence, then I think we can share it. Let me check on that

Regarding the error message above:

00:00:00.444.315 WARNING: DSCodecDecode() says failed to correctly parse ToC byte in EVS payload, first byte of input = 0xf0, ToC[1] = 0x2a, payloadSize[1] = -1, fAMRWB_IOMode = 1

Can you try this form of mediaMin command:

mediaMin -cx86 -ifilename.pcap -L -d0xc11 -r20 -C../session_config/EVS_AMR-WB_IO_mode_payload_shift

and let me know ? We have seen some EVS AMR-WB IO mode RTP streams "in the wild" that need a 2-bit payload shift (i.e. they are not correct per the EVS spec); the above command line addresses that. If that doesn't work, then can you send an example pcap to us via e-mail (info at signalogic dot com) ? We can figure out what's needed for mediaMin to decode it

from sigsrf_sdk.

signalogic avatar signalogic commented on July 28, 2024

Hi Syed, regarding your test on the AMRWB-23.85kbps-20ms_bw.pcap file, first that is an AMR-WB pcap, not EVS AMR-WB compatibility mode. Second please use this mediaMin command:

mediaMin -cx86 -i../pcaps/AMRWB-23.85kbps-20ms_bw.pcap -r20 -L -d0x20000000000c11

this sets the ALLOW_NONSTANDARD_RTP_PADDING flag, because that particular .pcap has padding in its RTP payloads that is not specified in its RTP headers (you can see the problem in Wireshark, which shows the payloads as DTMF events)

from sigsrf_sdk.

syed-ahmad-maaz avatar syed-ahmad-maaz commented on July 28, 2024

I tested the EVS AMRWB IO packet captures using the command that you provided, and the generated WAV file is clear without any noise.

Can you kindly elaborate on the issue of why we need a 2-bit payload shift? How are these RTP streams different from standard RTP streams? Is there any other way of handling these RTP streams?

from sigsrf_sdk.

signalogic avatar signalogic commented on July 28, 2024

Hi Syed, thanks for letting us know your test results. It seems an endpoint or SBC-type entity out there has incorrectly implemented EVS AMR-WB IO payload encoding. We're not sure who yet, but counting your example we've now seen it half a dozen times or so. Maybe they are translating AMR-WB payloads into EVS compatibility mode and somehow misinterpreted the EVS spec, which is admittedly complicated when it comes to AMR-WB IO payload formatting. My guess is that in their internal testing they missed this bug because it's in their EVS common library so it's shared by both their encoder and decoder, but when in the wild other decoders can "see" it

To demonstrate this further, you can run the following mediaTest command:

mediaTest -cx86 -itest_files/stv16c.INP -otest_files/stv16c_16kHz_23850_full_header.pcap -Csession_config/evs_16kHz_23850bps_amrwb_io_full_header_config

which generates an EVS AMR-WB IO mode pcap from one of the standard 3GPP test vector (raw audio) files, exactly per 3GPP spec, making no changes between encoder output and decoder input. Then run the following mediaMin command:

mediaMin -cx86 -i../test_files/stv16c_16kHz_23850_full_header.pcap -L -d0x08000c11 -r0.5

which processes the pcap into wav and G711 pcap files, with no additional payload shift

from sigsrf_sdk.

syed-ahmad-maaz avatar syed-ahmad-maaz commented on July 28, 2024

I generated the pcap file using the commands that you provided and the commands executed successfully.
According to the specification of EVS AMRWB IO, the payload size of EVS AMRWB IO with bitrate of 23.85kbps is 60 bytes. After adding the 12 bytes of RTP payload, the total size is 72 bytes.
In the pcap that you provided, the total size is 74 bytes. How is it 74 bytes? Shouldn't it be 72 bytes?
Can you kindly tell us how can we integrate the support of these non standard pcaps in our project. Can you recommend us any resource that we can follow to deal with these non standard pcaps as we did not find anything in the official specification.

The link to the official specification is attached here.

from sigsrf_sdk.

signalogic avatar signalogic commented on July 28, 2024

Hi Syed, for EVS AMR-IO mode 23850 bps RTP payload size, calculate as follows:

60 (payload size in the spec, as you noted)
If using full header format
+1 ToC header byte
+1 padding byte appended for collision avoidance with 24400 bps compact format

collision avoidance is discussed in spec section A.2.2.1.4.2, Zero padding for size collision avoidance

Note that Wireshark, when displaying stv16c_16kHz_23850_full_header.pcap generated by mediaTest, correctly interprets all packets, including SID and NO_DATA, implying that it "knows" about EVS collision avoidance

Re. your application support questions, one option is to use the demo versions of voplib and EVS .so's, for example you can look at the "hello_codec" reference app included in the .rar packages and Docker containers. Other options include licensed versions of the libs, or help in some form to modify your app at source code level. For those, is it possible to discuss privately ? Thanks

from sigsrf_sdk.

syed-ahmad-maaz avatar syed-ahmad-maaz commented on July 28, 2024

Hello, I have tried to run the hello_codec reference app using the following command: The pcap given as input is of EVS AMRWB IO.

./hello_codec -cx86 -i/home/EVS_AMRWB_IO.pcap -L -d0xc11 -r20 -C../session_config/EVS_AMR-WB_IO_mode_payload_shift

The error encountered is:

ERROR: DSCodecEncode(), hCodec[0] param <= 0, voplib.c:615 
Processing frame 1...ERROR: DSCodecEncode(), hCodec[0] param <= 0, voplib.c:615 
Processing frame 2...ERROR: DSCodecEncode(), hCodec[0] param <= 0, voplib.c:615 
Processing frame 3...ERROR: DSCodecEncode(), hCodec[0] param <= 0, voplib.c:615 

from sigsrf_sdk.

signalogic avatar signalogic commented on July 28, 2024

Hi Syed,

The hello_codec reference app doesn't handle command line file I/O. In hello_codec.c the comments show the following command line usage:

./hello_codec -cx86 -C../session_config/evs_16kHz_13200bps_config

so hopefully that runs without errors. The code creates some codec instances then does frame-by-frame encoding and decoding on an example waveform (from an array, not from a file).

The code is simple and can be integrated into your application that is already handling file or network I/O. Look for the set_codec_params() function to see how to set the CODEC_ENC_PARAMS and CODEC_DEC_PARAMS structs, which are then used when calling DSCodecCreate(). These APIs and structs are defined in voplib.h

from sigsrf_sdk.

syed-ahmad-maaz avatar syed-ahmad-maaz commented on July 28, 2024

Hi Jeff,

Thank you for cooperating with us. I am closing this issue as resolved.

from sigsrf_sdk.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.