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

redirect preview #95

Open
joukeHijlkema opened this issue Mar 28, 2020 · 2 comments
Open

redirect preview #95

joukeHijlkema opened this issue Mar 28, 2020 · 2 comments

Comments

@joukeHijlkema
Copy link

Hi,
To monitor experiments in our lab I've several cameras streaming live video to a server. When given the order these streams are recoded on the server. This strains the network to much when the number of cameras grows and it would be preverable to stream low-res preview footage to the server and record hig-res videos on the rpi it self. When finished the server can get the videos one by one.
My question is thus; can I (mis) use the rpicamsrc preview as the low-res source end stream it directly to a server ?
Thanks for your work and your help,
Jouke

@thaytan
Copy link
Owner

thaytan commented Mar 29, 2020

There's a couple of considerations:

  1. At the moment, no - the internal preview port outputs directly to a hardware overlay onto the screen
  2. I've never experiemented with doing anything else with it, and ability to do that depends a lot on the RPi videocore firmware
  3. To get a low-resolution preview, you'd need to rescale and encode, so that's a chunk of extra videocore resources required
  4. There's some GStreamer considerations around getting 2 streams out of rpicamsrc, but that's just extra work.

What one could definitely do would be to encode with say 1 keyframe per second, use tee to duplicate the H.264 stream for recording and for streaming, and then use a pad probe on the streaming branch to drop everything except the keyframes. You'd get a lower-bandwidth 1fps stream consisting only of keyframes.

@joukeHijlkema
Copy link
Author

joukeHijlkema commented Mar 29, 2020 via email

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

2 participants