-
Notifications
You must be signed in to change notification settings - Fork 131
Description
Good afternoon!
I took some time to check the examples in your repo and I was able to replicate them locally using the scripts available in /dev/pub, /dev/relay and the subscriber available in the moq-js repo.
For my use case, I wanted to stream camera from a raspberry pi and stream it in my local web-browser. As a minimum viable example, I tried to do this in my linux pc following both the ffmpeg route as the gstreamer one. I found problems in both scenarios.
Attempts with ffmpeg
- It is not listed which encoders / decoders are supported anywhere in your repo. It seems to me only files that start with a ftyp+moov header?
let _ftyp = mp4_atom::Ftyp::read_from(input).await?;
let moov = Moov::read_from(input).await?;I didn't try with different mp4 files, but different encoding flags of the camera stream without luck. As a user without a lot of knowledge of encodings/decoders, it was difficult for me to add a quick fix/patch for this.
- I also tried encoding the output of ffmpeg as flv, but this one fails silently.
ffmpeg -hide_banner -v quiet \
-f v4l2 -i /dev/video0 \
-f flv \
- | cargo run --bin moq-karp -- --server "${SERVER}" --room "${ROOM}" --tls-disable-verify -v --broadcast "${BROADCAST}" "$@" publishMy closest attempt (I think?) was using this setup:
ffmpeg -hide_banner \
-f v4l2 -i /dev/video0 -v quiet -g 50 \
-f mp4 -c:v libx264 -preset fast -crf 23 -movflags +faststart+frag_keyframe+empty_moov \
- | cargo run --bin moq-karp -- --server "${SERVER}" --room "${ROOM}" --tls-disable-verify -v --broadcast "${BROADCAST}" "$@" publishAttempts with gstreamer
-
I don't know why, but in my local version of gstreamer I didn't have the
isofmp4muxplugin. It's listed as part of thegoodplugins, but I didn't have it and didn't spend much too on it. I might take a closer look later if that helps. -
I took some time to update
moq-gstAdd support newer transfork api gstreamer#12 to work with latest version of this repo, and maybe after it works it should be easier to get it done via this way? Hopefully yes.
I'd be happy help you with some dev time if you give me some tips about what has to be done, about the classes organizations and if you think it makes sense to stream camera feeds using moq.
PS: thanks a lot for the --tls-disable-verify flag in your scripts 😄