Whether it can transfer the raw stream to the Web side
Canees opened this issue · comments
Caner commented
Get the original stream through ffmpeg and add it to the channel for Web-based presentation
I saw the ffmpeg example, which specifies the encoding format, but I need the browser to negotiate the encoding format with it
exp:
const video= ffmpeg('/dev/video0')
.size(`480x240`)
.outputOptions(['-pix_fmt yuv420p'])
const audio = ffmpeg("plughw:1,0")
.inputFormat("alsa")
.audioChannels(1)
.audioFrequency(48000)
.audioCodec("pcm_s16le")
.outputFormat("s16le")
.format("rawvideo")
Shin Yoshiaki commented
There is a sample code to send the video generated by ffmpeg to the browser for your reference.
- https://github.com/shinyoshiaki/werift-webrtc/blob/develop/examples/mediachannel/sendonly/ffmpeg.ts
- https://github.com/shinyoshiaki/werift-webrtc/blob/develop/examples/mediachannel/sendonly/answer.html
command
npx ts-node-dev examples/mediachannel/sendonly/ffmpeg.ts
Caner commented
There is a sample code to send the video generated by ffmpeg to the browser for your reference.
- https://github.com/shinyoshiaki/werift-webrtc/blob/develop/examples/mediachannel/sendonly/ffmpeg.ts
- https://github.com/shinyoshiaki/werift-webrtc/blob/develop/examples/mediachannel/sendonly/answer.html
command
npx ts-node-dev examples/mediachannel/sendonly/ffmpeg.ts
Thanks, I'll try