Comments (15)
After a weekend and week evenings of banging my head against a wall, trying to get low-latency video from a Pi to OBS, this issue made my month! Here's a resulting quick project that attempts to break it down for more experience levels and alleviate the pain next time I do this (memory not the best). Thanks for this project and post @fzwoch, @Dregu and @crossan007!
https://github.com/hotsparklab/raspberry-pi-udp-camera
I put a note of special thanks in there referencing this "issue". Thanks for being awesome! :D
from obs-gstreamer.
I would say whatever works best for you. If matroska works - thats just fine. You are basically packaging H.264 into a MKV container. gdppay and gdpdepay are essentially wrappers for GstBuffers (they also transfer timestamps etc.). So you would package H.264 into this format. Not too much difference - there just seems no real need for MKV in this case - unless you would like to try to receive if with some other players as the Gst format is a GStreamer format typically not understood by other players.
See https://github.com/fzwoch/obs-gnome-screencast for use cases with gdppay and gdpdepay.
But if your question is whether you can send the raw bitstream instead of raw images to the OBS pipeline - I don't think so. But I haven't checked in detail. I can image there may be differences with what decoder can be used internally pf OBS..
from obs-gstreamer.
I guess I should. These examples are great so I left this issue open. I just never did before so I need to check what to do so people can contribute to. Hopefully I can check this in the next couple of days.
from obs-gstreamer.
Looks good to me :-)
One note: is there a reason to use Matroska muxing for streaming over IP? Maybe using gdppay
and gdpdepay
encapsulating the H.264 data is the weapon of choice for such use cases. But I guess as long as it works..
And another: videoscale
on the GStreamer side is done in software and may be slow. Perhaps just consider receiving the unscaled image and scale the canvas on the OBS scene. Then it will be scaled at the GPU layer of OBS.
from obs-gstreamer.
So, before obs, I was hacking on "voctomix". They have a Python ui which manipulates gstreamer pipelines to provide a video mixer.
Their transport of choice was always matroska - something about how it preservers timestamps differently/better.
Looking at docs for gdppay, it may do the job just as well.
from obs-gstreamer.
Good catch with the video scale
from obs-gstreamer.
Hey, do you think we could (or should) pass h264 directly into OBS?
from obs-gstreamer.
interesting. I just tried both matroskamux
/ matroskademux
and gdppay
/ gdpdepay
, and gdp
* doesn't seem to work at all, while matroska seems to work like a charm.
Now I'm curious.
from obs-gstreamer.
Been fiddling with raspi streaming quite a lot, and all the muxing and converting just seems useless if you have a good network. I also posted this on the forums, but
raspivid -n -t 0 -w 1280 -h 720 -g 60 -fps 30 -b 2500000 -mm average -ex fixedfps -ih -pf high -o udp://10.0.0.176:5000
udpsrc port=5000 ! h264parse ! avdec_h264 ! video.
works just fine over my wifi.
from obs-gstreamer.
@Dregu I think you bring up a valid point here - "good network"
I'm noticing that my PiZero reports a great wifi connection until I start streaming video - then it drops to 5.5 mbps.
Additionally, I'm noticing some weird sync issues (I believe unrelated to network, but rather ISO).
If I request above a certain ISO, then the resultant H264 frames are late (compared to frames being generated by a separate camera, on a separate pi on a separate network connection.)
below ISO 400, then the H264 frames from the zero are only about 100 ms behind frames from a Logitec C920; however if i request ISO600 from the Pi camera, then the frames are a few seconds late. Again - this could be a network issue (as higher ISO = more video data in a dim lit area = more network throughput).
sorry for the ramble - it's late and I'm wrapping up for the evening.
I think I've posted about this on a different GH issue: thaytan/gst-rpicamsrc#71
from obs-gstreamer.
I'm planning on porting https://github.com/crossan007/PiCamFleetMapper into an OBS plugin with a UI for managing "remote cameras" within OBS.
from obs-gstreamer.
Another example:
Allen and Heath QU32 Mixing console USB out -> GStreamer/OBS. Select the first 2 of the 32 channels on the source, and trim to stereo
videotestsrc pattern=18 ! video. alsasrc name=audiosrc device=hw:1 ! audio/x-raw,channels=32,layout=interleaved,rate=48000 ! queue ! deinterleave name=d interleave name=i d.src_0 ! queue ! audioconvert ! i.sink_0 d.src_1 ! queue ! audioconvert ! i.sink_1 i. ! audio.
from obs-gstreamer.
Closing this, as it's not actually an issue.
from obs-gstreamer.
@fzwoch would you consider opening the wiki on this repo? I'd gladly contribute some documentation and examples.
from obs-gstreamer.
I have set the option for the wiki to be world writable I think. If it works you can start adding some stuff there as you like. I'm a bad documentation person myself..
from obs-gstreamer.
Related Issues (20)
- Use openh264enc if x264enc is unavailable (Flatpak gstreamer only has the former) for software encoding HOT 3
- GStreamer Source: Cannot start pipeline: no property "uri" in element "srtsrc" HOT 1
- No Element "airplaysrc" HOT 2
- How to cross-compile for Windows? HOT 1
- OBS gstreamer output HOT 9
- nixos with gstreamer not working HOT 2
- gstreamer plugin is not available in OBS ver29.1.3 HOT 2
- Gstreamer pipeline HOT 9
- Effect filter HOT 4
- Constant QP rate control option in the GStreamer Encoder doesn't work. HOT 5
- Can't output Audio to device HOT 6
- Latency High when OBS is started, Latency Low when GStreamer Effect is updated / edited HOT 7
- How to use intel igpu HOT 4
- Creeping latency issue HOT 5
- RX 6000 not working with GStreamer H265 Flatpak HOT 9
- No encoder type OBS 29 Beta HOT 5
- MSVC Support for Windows HOT 2
- Add VP8, VP9, and AV1 support HOT 3
- Compilation failed on aarch64 HOT 2
- 0.4.0 system-wide install from source is broken HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obs-gstreamer.