Replies: 8 comments 2 replies
-
Thank you! I've seen this user somewhat achieved this result, however it doesn't work for hardware encoded h264; |
Beta Was this translation helpful? Give feedback.
-
Hi ZeoWorks, my solution was to use ffmpeg's nut format which behaves nicely with pipes. My ffmpeg command: Reading a frame/sample:
Writing to track:
To keep it short I didn't include error handling. I'm not sure if setting Duration to time.Second is correct, but you know what they say: "The best way to get a correct answer is to post an incorret one" golang nut demuxer: https://github.com/retailnext/gonut |
Beta Was this translation helpful? Give feedback.
-
Hi Chalky, thank you for this! |
Beta Was this translation helpful? Give feedback.
-
I tested it also with h264_qsv, but not extensively. |
Beta Was this translation helpful? Give feedback.
-
Thank you! After piping it, does webrtc re-encode the feed? Or is it just a passthrough of the already encoded feed? |
Beta Was this translation helpful? Give feedback.
-
No re-encoding, CPU had about 3% load. |
Beta Was this translation helpful? Give feedback.
-
Hi @ZeoWorks These all look like good solutions to me :) rtp-to-webrtc also has some good examples of generating RTP from ffmpeg and handling it in Pion. Doing it in memory is also possible, but significantly more work. Happy to help if you have any further questions. |
Beta Was this translation helpful? Give feedback.
-
Hi, is there any examples as how to pipe ffmpeg to webrtc?
Beta Was this translation helpful? Give feedback.
All reactions