[Freeswitch-users] Convert pcap file to wav file

amani mansour amani.mansour2 at gmail.com
Thu Mar 31 01:26:24 MSD 2016


good night sir ,
i replaced  R by Y
i have  this problem
[image: Images intégrées 1]

the file contains rtp named g711.pcap ,you will find it attached

and the script to execute to convert this pcap to wav is :
ssrc=$(tshark -n -r /home/amani/projet/PFE/g711.pcap -Y rtp -T fields -e
rtp.ssrc -Eseparator=, | sort -u | awk 'FNR ==1 {print}')
sudo tshark -n -r /home/amani/projet/PFE/g711.pcap -Y rtp -Y "rtp.ssrc ==
$ssrc" -T fields -e rtp.payload | tee payloads
for payload in `cat payloads`; do IFS=:; for byte in $payload; do printf
"\\x$byte" >>  /home/amani/projet/PFE/g711.raw; done; done
sox -t raw -r 8000 -v 4 -c 1 -e mu-law  /home/amani/projet/PFE/g711.raw
 /home/amani/projet/PFE/g711.wav


can you please sir execute it ? and tell me where is the problem ?
thank you
best regards


2016-03-30 22:16 GMT+01:00 amani mansour <amani.mansour2 at gmail.com>:

> good night sir ,
> i replaced  R by Y
> i have  this problem
> [image: Images intégrées 1]
>
> the file contains rtp named g711.pcap ,you will find it attached
>
> and the script to execute to convert this pcap to wav is :
> ssrc=$(tshark -n -r /home/amani/projet/PFE/g711.pcap -Y rtp -T fields -e
> rtp.ssrc -Eseparator=, | sort -u | awk 'FNR ==1 {print}')
> sudo tshark -n -r /home/amani/projet/PFE/g711.pcap -Y rtp -Y "rtp.ssrc ==
> $ssrc" -T fields -e rtp.payload | tee payloads
> for payload in `cat payloads`; do IFS=:; for byte in $payload; do printf
> "\\x$byte" >>  /home/amani/projet/PFE/g711.raw; done; done
> sox -t raw -r 8000 -v 4 -c 1 -e mu-law  /home/amani/projet/PFE/g711.raw
>  /home/amani/projet/PFE/g711.wav
>
>
> can you please sir execute it ? and tell me where is the problem ?
> thank you
> best regards
> amani
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160330/0c5afbee/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 35102 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160330/0c5afbee/attachment-0001.png 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list