Can I decode an audio stream with the codec I want? GSM

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
dsuarez1
New Cone
New Cone
Posts: 5
Joined: 03 Sep 2009 02:19

Can I decode an audio stream with the codec I want? GSM

Postby dsuarez1 » 03 Sep 2009 02:56

I am receiving from CallCapture software (a telephone recording software) an audio UDP stream that I believe uses GSM, and VLC reports the following:


main debug: processing request item udp://239.1.1.1:1234 node Playlist skip 0
main debug: resyncing on udp://239.1.1.1:1234
main debug: udp://239.1.1.1:1234 is at 1
main debug: starting new item
main debug: creating new input thread
main debug: Creating an input for 'udp://239.1.1.1:1234'
main debug: thread (input) created at priority 1 (../.././src/input/input.c:230)
qt4 debug: IM: Setting an input
main debug: thread started
main debug: using timeshift granularity of 50 MBytes
main debug: using timeshift path 'C:\Users\USUARIO\AppData\Local\Temp'
main debug: `udp://@239.1.1.1:1234' gives access `udp' demux `' path `@239.1.1.1:1234'
main debug: creating demux: access='udp' demux='' path='@239.1.1.1:1234'
main debug: looking for access_demux module: 0 candidates
main debug: no access_demux module matched "udp"
main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: creating access 'udp' path='@239.1.1.1:1234'
main debug: looking for access module: 1 candidate
access_udp debug: opening server=:0 local=239.1.1.1:1234
main debug: net: opening 239.1.1.1 datagram port 1234
main debug: Multicast group join request
main debug: using access module "access_udp"
main debug: TIMER module_need() : 4.000 ms - Total 4.000 ms / 1 intvls (Avg 4.000 ms)
main debug: Using AStream*Block
main debug: pre buffering
qt4 debug: Updating the geometry
qt4 debug: Updating the geometry
main debug: received first data after 192 ms
main debug: prebuffering done 326 bytes in 0s - 1 kbytes/s
main debug: looking for stream_filter module: 2 candidates
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: looking for stream_filter module: 1 candidate
main debug: using stream_filter module "stream_filter_record"
main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: creating demux: access='udp' demux='' path='@239.1.1.1:1234'
main debug: looking for demux module: 50 candidates
lua debug: Trying Lua scripts in C:\Users\USUARIO\AppData\Roaming\vlc\lua\playlist
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\\lua\playlist
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\anevia_streams.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\appletrailers.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\bbc_co_uk.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\break.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\canalplus.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\cue.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\dailymotion.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\france2.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\googlevideo.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\joox.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\koreus.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\lelombrik.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\megavideo.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\metacafe.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\youtube.lua
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\\lua\playlist\youtube_homepage.lua
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\\share\lua\playlist
avformat debug: couldn't guess format
vobsub debug: this doesn't seem to be a vobsub file
ps warning: this does not look like an MPEG PS stream, continuing anyway
main debug: using demux module "ps"
main debug: TIMER module_need() : 9809.000 ms - Total 9809.000 ms / 1 intvls (Avg 9809.000 ms)
main debug: looking for a subtitle file in C:\Program Files\VideoLAN\VLC\
access_udp warning: unimplemented query in control
main debug: `udp://@239.1.1.1:1234' successfully opened
ps warning: garbage at input, trying to resync...

the important line is:

avformat debug: couldn't guess format

Is there a way to instruct VLC to try an specific codec? maybe in the command line?

I am trying Wireshark sniffer. Is there a way to check the UDP packets for the correct codec and encapsulation?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can I decode an audio stream with the codec I want? GSM

Postby Jean-Baptiste Kempf » 03 Sep 2009 13:28

VLC version?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dsuarez1
New Cone
New Cone
Posts: 5
Joined: 03 Sep 2009 02:19

Re: Can I decode an audio stream with the codec I want? GSM

Postby dsuarez1 » 03 Sep 2009 17:24

I am using version 1.0.1
OS: Windows Vista Home

Rémi Denis-Courmont
Developer
Developer
Posts: 15335
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can I decode an audio stream with the codec I want? GSM

Postby Rémi Denis-Courmont » 03 Sep 2009 17:30

udp:// only works for MPEG-TS and MPEG-PS.

If you are streaming GSM over RTP, you need to present a correct SDP file to VLC.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

dsuarez1
New Cone
New Cone
Posts: 5
Joined: 03 Sep 2009 02:19

Re: Can I decode an audio stream with the codec I want? GSM

Postby dsuarez1 » 05 Sep 2009 02:46

Any help is welcome.

Really, what I have been trying to do is to consume with VLC an UDP stream produced by CallCapture Server.

Some updates:

1. I am receiving UDP packets every 200 ms from CallCapture Server.
2. CallCapture Listener uses gsm codec because I checked with Process Monitor from SysInternals, and it opens msgsm610.
3. The payload size of packets is 329 bytes
4. Every payload starts with 0b 00 00 00 and has 325 bytes of varying data.

5. Here is a code snippet I was using to try to redirect the UDP to a multicast address, so that I can consume it with VLC:

Dim ClientRcvAudio As New UdpClient(LocalPort)
Dim ServerMulticastAudio As New UdpClient()
Dim RemoteEndPoint As New IPEndPoint(IPAddress.Parse(IPMulticastAudio), _
MultiCastPort)
Do
Try
' Receive bytes.
Dim DataIn() As Byte = ClientRcvAudio.Receive(Nothing)
ServerMulticastAudio.Send(DataIn, DataIn.Length, RemoteEndPoint)

6. According to Rémi Denis-Courmont (thanks for your answer) I must convert the incoming UDP into RTP and add an SDP file.

Maybe I will try to use this to convert to RTP:

http://www.streamcoders.com/products/rtpnet.html

But first,

Using the windows GUI and for testing purposes, I selected a file produced with the same app to try to produce an RTP stream:

:sout=#rtp{dst=239.1.1.1,port=1234,mux=ts,sdp=file://c:/temp/test.sdp}

I believe that the resulting sdp file is incorrect:

v=0
o=- 14865282835756473122 14865282835756473122 IN IP4 PCDiego
s=Unnamed
i=N/A
c=IN IP4 239.1.1.1/255
t=0 0
a=tool:vlc 1.0.1
a=recvonly
a=type:broadcast
a=charset:UTF-8
m=video 1234 RTP/AVP 33
b=RR:0
a=rtpmap:33 MP2T/90000

Besides, aghh, I receive

mux_ts debug: adding input codec=agsm pid=68
main error: cannot add this stream
stream_out_rtp error: cannot add this stream to the muxer
main error: cannot create packetizer output (agsm)

as detailed here:

qt4 debug: MRL passed to the Sout: C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM
qt4 debug: Adding option: :sout=#rtp{dst=239.1.1.1,port=1234,mux=ts,sdp=file://c:/temp/test.sdp}
main debug: adding item `Streaming' ( C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM )
qt4 debug: Adding a new MRL to recent ones: C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 5 items, index 3
main debug: processing request item Streaming node Playlist skip 0
main debug: resyncing on Streaming
main debug: Streaming is at 4
main debug: starting new item
main debug: creating new input thread
main debug: Creating an input for 'Streaming'
main debug: thread (input) created at priority 1 (../.././src/input/input.c:230)
qt4 debug: IM: Setting an input
main debug: thread started
main debug: stream=`rtp'
main debug: looking for sout stream module: 1 candidate
qt4 debug: Updating the geometry
qt4 debug: Updating the geometry
main debug: set config option: sout-rtp-dst to 239.1.1.1
main debug: set config option: sout-rtp-port to 1234
main debug: set config option: sout-rtp-mux to ts
main debug: set config option: sout-rtp-sdp to file://c:/temp/test.sdp
main debug: looking for sout mux module: 1 candidate
mux_ts debug: shaping=200000 pcr=70000 dts_delay=400000
main debug: using sout mux module "mux_ts"
main debug: TIMER module_need() : 8.000 ms - Total 8.000 ms / 1 intvls (Avg 8.000 ms)
main debug: muxer support adding stream at any time
main debug: muxer prefers to wait for all ES before starting to mux
stream_out_rtp debug: maximum RTP packet size: 1400 bytes
main debug: net: connecting to [239.1.1.1]:1234
main debug: net: connecting to [239.1.1.1]:1235 from [192.168.2.78]:59258
main debug: thread (RTP send thread) created at priority 15 (../../.././modules/stream_out/rtp.c:1279)
stream_out_rtp debug: sdp=
v=0
o=- 14865288123526934429 14865288123526934429 IN IP4 PCDiego
s=Unnamed
i=N/A
c=IN IP4 239.1.1.1/255
t=0 0
a=tool:vlc 1.0.1
a=recvonly
a=type:broadcast
a=charset:UTF-8
m=video 1234 RTP/AVP 33
b=RR:0
a=rtpmap:33 MP2T/90000

main debug: thread started
main debug: using sout stream module "stream_out_rtp"
main debug: TIMER module_need() : 45.000 ms - Total 45.000 ms / 1 intvls (Avg 45.000 ms)
main debug: using timeshift granularity of 50 MBytes
main debug: using timeshift path 'C:\Users\USUARIO\AppData\Local\Temp'
main debug: `C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM' gives access `' demux `' path `C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM'
main debug: creating demux: access='' demux='' path='C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM'
main debug: looking for access_demux module: 3 candidates
main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: creating access '' path='C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM'
main debug: looking for access module: 5 candidates
vcd debug: trying .cue file: C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.cue
vcd debug: could not find .cue file
access_file debug: opening file `C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM'
main debug: using access module "access_file"
main debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
main debug: Using AStream*Stream
main debug: pre buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 1024 bytes in 0s - 1000000 kbytes/s
main debug: looking for stream_filter module: 2 candidates
main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: looking for stream_filter module: 1 candidate
main debug: using stream_filter module "stream_filter_record"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: creating demux: access='' demux='' path='C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM'
main debug: looking for demux module: 50 candidates
wav debug: chunk: fcc=`fmt ` size=20
wav debug: format: 0x0031, fourcc: agsm, channels: 1, freq: 8000 Hz, bitrate: 1Ko/s, blockalign: 65, bits/samples: 0, extra size: 2
wav debug: found Microsoft WAV GSM audio format
wav debug: chunk: fcc=`fact` size=4
wav debug: chunk: fcc=`data` size=33424300
main debug: selecting program id=0
main debug: using demux module "wav"
main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: looking for a subtitle file in C:\Users\USUARIO\Desktop\
main debug: looking for packetizer module: 21 candidates
main debug: using packetizer module "packetizer_copy"
main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: thread (decoder) created at priority 2 (../.././src/input/decoder.c:315)
main debug: thread started
main debug: starting in async mode
main debug: `C:\Users\USUARIO\Desktop\MSG-2009-08-31-132710-1.GSM' successfully opened
main debug: Buffering 0%
main debug: switching to sync mode
main debug: Buffering 13%
main debug: adding a new sout input (sout_input:0x2502b00)
main debug: adding a new input
mux_ts debug: adding input codec=agsm pid=68
main error: cannot add this stream
stream_out_rtp error: cannot add this stream to the muxer
main error: cannot create packetizer output (agsm)
main debug: Buffering 26%
main debug: Buffering 40%
main debug: Buffering 53%
main debug: Buffering 66%
main debug: Buffering 80%
main debug: Buffering 93%
main debug: Stream buffering done (320 ms in 1 ms)
main debug: Decoder buffering done in 0 ms
qt4 debug: New caching: 100
qt4 debug: New caching: 100
qt4 debug: Updating the geometry
qt4 debug: Updating the geometry
qt4 debug: Updating the geometry
qt4 debug: Updating the geometry

Rémi Denis-Courmont
Developer
Developer
Posts: 15335
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can I decode an audio stream with the codec I want? GSM

Postby Rémi Denis-Courmont » 05 Sep 2009 10:29

MPEG-TS does not support GSM.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 62 guests