Vp8 Streaming - Chrome does not play video packet

765 views
Skip to first unread message

austin...@gmail.com

unread,
Oct 31, 2017, 3:38:29 AM10/31/17
to discuss-webrtc
Hi All
I am developing an application in C, where I need to read audio (opus) / video (vp8) frames from mkv file, and send to Chrome, and in Chrome we should be able to see video, hear audio.

I am able to get audio part working (webrtc call, http as signalling). Chrome receives audio and plays it.
But video I send does not show in Chrome. Chrome receives video packets, sends back video packets but does not showing it.

Do I need to take care anything extra to get Chrome show the video packets received.
How do I debug the nail out the issue?

Best Regards
Austin

Philipp Hancke

unread,
Oct 31, 2017, 4:06:06 AM10/31/17
to WebRTC-discuss
if you have a rtpdump file of what you send the video_replay tool might be useful. See https://webrtchacks.com/video_replay/

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/23137649-78eb-4353-9c6e-40970428962d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sergio Garcia Murillo

unread,
Oct 31, 2017, 4:06:39 AM10/31/17
to discuss...@googlegroups.com
There are so many possible causes (wrong rtp packetization, missing iframes, problems on rtp/rtcp) that it is impossible to tell without further info.

Enable chrome logs and check webrtc internals to get more info.

Best regards
Sergio

--

Austin Einter

unread,
Oct 31, 2017, 10:39:30 AM10/31/17
to discuss...@googlegroups.com
Hi Sergio, Philipp
Thanks for your kind response.

I repeated the scenario and captured the chrome log, attached in this mail.
I am not able to nail out what is the root cause.

I see for video below kind of logs (complete log file is attached), not sure what is going wrong. Can you please give me some pointer what might be wrong.



[1:27:1031/193813.805400:VERBOSE1:stream_synchronization.cc(168)] Sync video delay 0 for video stream 1802572009 and audio delay 15 for audio stream 1122592776
[1:27:1031/193815.810713:VERBOSE1:stream_synchronization.cc(168)] Sync video delay 0 for video stream 1802572009 and audio delay 30 for audio stream 1122592776
[1:20:1031/193818.060025:INFO:webrtcvideoengine2.cc(2446)] VideoReceiveStream stats: 30231247, {ssrc: 1802572009, total_bps: 41896, width: 768, height: 448, key: 2, delta: 499, network_fps: 30, decode_fps: 31, render_fps: 31, decode_ms: 1, max_decode_ms: 5, cur_delay_ms: 164, targ_delay_ms: 164, jb_delay_ms: 149, min_playout_delay_ms: 0, discarded: 0, sync_offset_ms: 42, cum_loss: 3, max_ext_seq: 21964, nack: 6, fir: 0, pli: 0}
[1:27:1031/193818.811017:VERBOSE1:stream_synchronization.cc(168)] Sync video delay 0 for video stream 1802572009 and audio delay 50 for audio stream 1122592776


Best Regards
Austin

chrome_debug.log.tar.gz

Sergio Garcia Murillo

unread,
Oct 31, 2017, 11:26:14 AM10/31/17
to discuss...@googlegroups.com
decode_fps: 31, render_fps: 31 seems it is being received correctly, are you sure you are setting the src to the video element correctly and it has autoplay attribute?

BR
Sergio
--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CANXt1k9sx6%2BK%2BRe1rKZ0Pre8%3Dg8cE%3DOkzXuYCPqxrkeTx%2BQf6Q%40mail.gmail.com.

Austin Einter

unread,
Oct 31, 2017, 9:43:18 PM10/31/17
to discuss...@googlegroups.com
Dear Philipp
I was going through video_replay, it is mentioned as

"we must also find the PT for RED which WebRTC uses to encapsulate the video packets"

Is it mandatory I need to encapsulate VP8 in RED, and the resultant data I should send in RTP as payload.
OR I can directly send VP8 frame as RTP payload.

Best Regards
Austin
 





--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/nPjVWwx679M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CADxkKi%2Bux_aPunewY92-BNS_HUkpEcDFBhRUagVLTi5om9b73w%40mail.gmail.com.

Philipp Hancke

unread,
Nov 1, 2017, 2:51:14 AM11/1/17
to WebRTC-discuss
RED is not mandatory, Firefox doesn't implement/use it.

Austin Einter

unread,
Nov 9, 2017, 2:07:38 AM11/9/17
to discuss...@googlegroups.com
Dear Philipp, and Serigo
I took few days to do below stuff, so that I can debug this issue.

1. I made a small webrtc server (nodejs) and webrtc client. I followed https://shanetully.com/2014/09/a-dead-simple-webrtc-example/ link to achieve it. Now I can chare webrtc server / client code.

2. I supported audio video bundle, so that I can match with chrome SDP.

Right now I do not send RTCP packets, will it affect webrtc call media exchange ????

Now if I run the server in a machine and access it from browsers, I can have audio / video exchange between browsers.
Then I tried to have call between my C/C++ application and browser. Though signalling, stun/ice, dtls handshake passed, still I see audio / video is not proper. Audio / video packets are exchanged, but chrome does not play my audio / video packets.

I have collected chrome log. Attaching it.
I also checked webrtc-internals. I do not see any error there.

In log file I see like errors like
rtp_frame_reference_finder.cc(186)] Generic frame with packet range [13, 13] has no GoP, dropping frame

Please help me guiding how can I debug further and fix this issue.

If required I can modify / share webrtc client / server code.
If required I can modify c/c++ code.

Regards
Austin

--
chrome_debug.log.tar.gz

Sergio Garcia Murillo

unread,
Nov 9, 2017, 2:27:08 AM11/9/17
to discuss...@googlegroups.com
Two things:

1-if you don't implement RTCP properly, spooky things may happen
2-the log from  find reference generic means that you are not using pict ids. Better to use them and double check you are doing your rtp packetization of the vp8 stream correctly.

Sergio

You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CANXt1k-G2%2B%3D5%3DgiO3%3DoyBtOni8jfJW6hj8mu6qx%2BLHf_BMPXiQ%40mail.gmail.com.

Austin Einter

unread,
Nov 9, 2017, 2:46:00 AM11/9/17
to discuss...@googlegroups.com
Dear Sergio,
RTCP I will support, may take some more time.

The VP8 Frames, I read a mkv file, take out all EBML / header data. Read only payload data (present in simpleblocks of mkv file) I send it to chrome. Say one simpleblock, may have 2000+ bytes VP8 encoded data. I send around 1200 bytes in each packet, and for last packet I set marker bit to 1 in rtp packet.

Some simple blocks may contain 400 or 500 bytes of data, I send that data in one rtp packet.
And timestamp, I collect from mkv file (cluster and simple blocks), and send same timestamp in rtp packet.

I am attaching corresponding wireshark file (please use filter udp to see stun / media packets).

Kindly guide me if above approach is correct. Or I am doing something wrong.
Also, please see wireshark, and guide whats wrong with VP8 packets.

Best Regards
Austin



webrtc.call.pcapng.tar.gz

Sergio Garcia Murillo

unread,
Nov 9, 2017, 6:38:39 AM11/9/17
to discuss...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages