Hello forum,
I am currently working on a streaming project to an SIP telephony (which uses a non-vlc media engine) and I am trying to send live streams using VLC on the application side. Anyway, I've managed to send audio and video successfully except every now and then (it can happen in 30 seconds or after 4 minutes, seems like totally random to me) the audio (g711/alaw) starts to distort for like 2-10 seconds, then the sound is recovered for a while (the duration is again random) and then the process repeats itself.
I have no expertise in this subject but it seemed to me that it might be a buffer problem on the SIP telephony side. However, there is really nothing i can do about it, so I was thinking if it is possible to correct this by some tweaking on the vlc code.
I've tried this with couple of different softphones(bria, limphone, mizuphone etc. ) and all of the successfull calls(for alaw) had 214 bytes of data chunks with 160 ms time difference between 2 consequent timestamps. So it is like 160 bytes of (54 bytes for rtp headers) every 160 ms. Now, when I stream with vlc, it takes 743 bytes of audio data(371 bytes in some cases) and depending on the ptime value (default is 20, i know but i had to reduce it to 10 in order to be compitable with my telephone settings), it splits the audio data into smaller chunks. So if ptime is 20 ms, then the audio data is splitted as 4 x 214(160+54) + 1 x 157 (103 +54). I've tried to track how vlc determines this 743 value in vlc code (working on version 1.1.9 currently), tried couple of things such as messing with the block_New's "i_size" value and such but all ended up in the same way.
I have two questions at this point:
1. Is it possible to set/change this value somehow?
2. If so, can you give any hints?
Thanks.