pcapparse: ts-offset does not work
Submitted by Daniel F
Link to original bug (#796529)
Description
I have pcap file with multiple RTP audio streams. One of them starts about 2 secs after beginning of packet capture, 2nd one about 3 secs. I wanted to extract them and save to one wav file, and have them synchronized in the same way as in pcap file. To do this, I have tried to use following pipeline:
gst-launch-1.0 audiointerleave name=int start-time-selection=first \
filesrc location=file.pcap do-timestamp=true ! tee name=tee \
tee. ! pcapparse src-ip=192.168.100.20 src-port=5002 ts-offset=-1 caps="application/x-rtp,media=(string)audio,encoding-name=(string)PCMA,payload=(int)8,clock-rate=(int)8000,encoding-params=(string)1" ! queue ! rtpjitterbuffer ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x1,rate=(int)8000" ! queue ! int.sink_0 \
tee. ! pcapparse dst-ip=192.168.100.20 dst-port=5004 ts-offset=-1 caps="application/x-rtp,media=(string)audio,encoding-name=(string)PCMA,payload=(int)8,clock-rate=(int)8000,encoding-params=(string)1" ! queue ! rtpjitterbuffer ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! capsfilter caps="audio/x-raw,channels=(int)1,channel-mask=(bitmask)0x2,rate=(int)8000" ! queue ! int.sink_1 \
int.src ! audioconvert ! audioresample ! wavenc ! filesink location=file.wav
However it turned out that original stream synchronization is lost - both streams starts at timestamp 0 in output wav file. I also tried to set ts-offset to 0 for 1st pcapparse, and to 1000000000 (1sec) for 2nd but this had no effect - audio in both channels also started at timestamp 0 as previously.
Version: 1.14.1