Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCVideoSource? #342

Open
LeviPesin opened this issue Oct 2, 2023 · 8 comments
Open

RTCVideoSource? #342

LeviPesin opened this issue Oct 2, 2023 · 8 comments

Comments

@LeviPesin
Copy link

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

@shinyoshiaki
Copy link
Owner

unexist

@sunpeng222
Copy link

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

@koush
Copy link
Collaborator

koush commented Nov 15, 2023

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

@sunpeng222
Copy link

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

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

@koush
Copy link
Collaborator

koush commented Nov 15, 2023

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

@sunpeng222
Copy link

它是实时的,具有适当的参数(分析持续时间 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
Copy link

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

@LeviPesin
Copy link
Author

unexist

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants