werift-webrtc icon indicating copy to clipboard operation
werift-webrtc copied to clipboard

RTCVideoSource?

Open LeviPesin opened this issue 2 years ago • 8 comments

Is there an equivalent or a similar thing to wrtc's RTCVideoSource? My use-case is creating a MediaStreamTrack from per-frame images.

LeviPesin avatar Oct 02 '23 14:10 LeviPesin

unexist

shinyoshiaki avatar Oct 16 '23 09:10 shinyoshiaki

Is there any other way to obtain data for each frame? The data length of the RTP obtained by onReceiveRtp is inconsistent

sunpeng222 avatar Nov 13 '23 08:11 sunpeng222

You need to pipe it into ffmpeg or some other decoder. That's what I do.

koush avatar Nov 15 '23 04:11 koush

您需要将其通过管道传输到 ffmpeg 或其他解码器中。我就是做这个的。

May I ask how real-time it is? Is the delay significant?

sunpeng222 avatar Nov 15 '23 09:11 sunpeng222

It is realtime with the proper args (analyzeduration 0 and small probesize )

koush avatar Nov 15 '23 16:11 koush

它是实时的,具有适当的参数(分析持续时间 0 和小探测大小)

Is it necessary to use H264RtpPayload to process the received rtp data?I'm not sure what this does Can you explain how your code works?I have received the RTP data, but I don't know how to process it into individual frames. The lengths of the received RTP data are all different. e.track.onReceiveRtp.subscribe(async (rtp) => { const h264 = H264RtpPayload.deSerialize(rtp.payload); console.log(h264) })

sunpeng222 avatar Nov 17 '23 09:11 sunpeng222

It is realtime with the proper args (analyzeduration 0 and small probesize )

I used ffmpeg to decode the H264 rtp data and save it locally, but the still images in the video file appear gray, and only when the objects in the image move do they appear partially colored.How can I solve this problem? I don't know if the parameters of ffmpeg are set correctly image image

sunpeng222 avatar Nov 21 '23 08:11 sunpeng222

unexist

So... is there some workaround? I'm not sure how exactly to use ffmpeg to get a MediaStreamTrack from images.

LeviPesin avatar Jan 14 '24 08:01 LeviPesin