vlc streaming and stats

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
DonMcL
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Apr 2017 16:59

vlc streaming and stats

Postby DonMcL » 21 Apr 2017 17:18

Hi,

We are trying to use vlc in a test and we are trying to gather stats.

using the following 2 commands we are able to get vlc stats with the stats command after running:
vlc -vvv hobbit2-trailer.mp4 --sout udp:[dest-ip]
vlc -vvv udp://[src-ip] --vout dummy

We are hoping to get latency and PDV (or at least min/max latency) stats. Using wireshark I saw some PES "headers?' with timestamps and what looked like a 4-bit "order" (seq #?). But it looked like decoding these packets with libpcap would be a non-trivial task. I wondered whether it might be easier to decode the seq # and timestamp from RTP / RTCP. I naively just changed the commands to:

vlc -vvv hobbit2-trailer.mp4 --sout rtp:[dest-ip]
vlc -vvv rtp:// --vout dummy

This sort of worked, but the receiving instance of vlc reported:

"A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96)."

I'm a networker and a programmer, not video experienced, so I am out of my depth here. But is it just telling me my input video file needs to be in a different format?
If so, what format (mpeg-2?) and where can I get a suitable short input file to test vlc=RTP with?

Thanks,
Don

DonMcL
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Apr 2017 16:59

Re: vlc streaming and stats

Postby DonMcL » 21 Apr 2017 21:27

Made some progress. Now using the following 2 commands to send data between the two hosts (VMs):

vlc -vvv hobbit2-trailer.mp4 --sout '#rtp{mux=ts,dst=unicast-dest-ip}'
vlc -vvv rtp:// --vout dummy

The receiving instance of vlc will still provides video frame and audio frame stats (but the sender does not?).

I`m wanting to see the RTP sequence numbers and timestamps in the packets, but neither tcpdump nor wireshark will decode the contents of these UDP datagrams.

How does one decode the contents of these packets?
Is TS inside RTP or vise-versa? (I guess the latter.)
I can read the RFCs for RTP, but how does one decode decode TS mux headers?

Thanks,
Don

DonMcL
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Apr 2017 16:59

Re: vlc streaming and stats

Postby DonMcL » 01 May 2017 18:07

1) Is there a better forum I should post questions like the following to?

2) Wireshark does not seem to know how to decode the mpeg1 .ts container format generated by the command: vlc -vvv *.ts --sout rtp:<DEST_IP_ADDR>
Does anyone know of a plugin for wireshark that can decode these?
I ask because I am lead to believe that RTP timestamps are tied to the wallclock time - which would be idea for our needs.

Because wireshark cannot decode the .ts container I reverted to dissecting the data stream generated by the command: vlc -vvv hobbit2-trailer.mp4 --sout udp:<DEST_IP_ADDR>
I can find and decode the Program Clock Reference, Presentation Time Stamps and the Decode Time Stamps.

2) Does VLC tie these clocks to a synchronised time (e.g. the system time) or do they start from a random (or fixed meaningless value)?

Ref:
for the first packet of the stream wireshark shows the first packet was caputred at:
1 1493653336.012047 DTS 7220.917177777 PTS 7221.083977777 MPEG PES 1358 video-stream

And inside the packet it shows "Program Clock Reference: base(649848110) * 300 + ext(0) = 194954433000"

Is there any predictable correlation between these 2 timestamps?

Thanks,
Don


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 51 guests