GNOME Bugzilla – Bug 744508
camerabin: Add one property to set video sink element for video recording pipeline
Last modified: 2018-11-03 13:30:40 UTC
Camerabin use filesink for video recording sink. I want add one property to set sink element for video recording pipeline. So application can changed to multifilesink or udpsink. multifilesink can save recorded video to fragment video files. udpsink or other network sink can streaming captured video to other server. The default sink of video pipeline can be set to filesink or fakesink? What's your option? Do Gstreamer community accepted the patch?
Not the first person to request this and I think it makes sense. Could you prepare a patch, please? A demo application showcasing the feature would also be great to have in our examples directory.
Ok, I will prepare the patch. I am developing the camera application. The use cases are below: 1. start preview after run the application. 2. capture one image after received one command. 3. recording video after received one command. 4. display media time when recording videos. 5. monitor storage free space when video recording. stop video recording is storage free space less then one threshold (currently 50M). 6. list native camera caps. 7. set camera output caps. 8. store recorded videos to fragment videos. 9. streaming recorded video to network. 10. add time stamp (date, media time) onto video. 11. add all kinds of video effect based on Open GL onto video. 12. using Open CV to do face detect (planing). 13. capture one image while video recording (planing. need Gstreamer support it). I am grad to upstream the application if community accept it.
I have finished most features for camera application. One issure I must fix is 744191.
Created attachment 299294 [details] [review] Add one property to set sink element for video recording pipeline Test it with our camera application which based on camerabin.
Ping... wait for patch review.
(In reply to kevin from comment #5) > Ping... wait for patch review. It looks good from a first glance but I'll only be able to do a proper review and test it next week if not one does it first.
Thanks. I test it with multifilesink. It is ok when muxer is mpegtsmux. qtmux can't use multifilesink as multifilesink can't seek. qtmux works with default video file sink.
Ping...
multifilesink is not really a universal solution for fragmenting files. splitmuxsink in -good can do that, so I think we should consider how to get that integrated with camerabin.
I really need splitmuxsink. So encodebin shouldn't include muxer? For camerabin, we have below requirments: 1. Fragment files. splitmuxsink can do that. 2. Streaming encoded audio/video. video sink will be network sink. Is splitmuxsink ok? Or splitmuxsink only works when use mpegtsmux?
Created attachment 300728 [details] [review] Add one property to set sink element for video recording pipeline Update patch for shouldn't set location for video sink if the video sink is set by user.
As splitmuxsink integrate into camerabin should need some time. mpegtsmux with multifilesink or updsink can meet our requirements. Is it possible use current design? And than change to splitmuxsink after splitmuxsink integrated into camerabin.
Created attachment 300875 [details] [review] Add one property to set sink element for video recording pipeline Update for shouldn't set location to user video sink. The video sink should be "rtpmp2tpay ! udpsink async=false sync=false", so can't set any property to it.
I don't think there is an easy way of supporting those cases without reworking camerabin internals: 1) encodebin ! filesink 2) encodebin ! <user-selected-sink> 3) encoders (encodebin doesn't fit here) ! splitmuxsink It should also be possible to have it integrated with RTP scenarios where multiple sinks would be used. So you would have encoder ! rtppayloader ! udpsink, for example. This adds: 4) encoders ! rtppayloader ! udpsink There is not much in common for those scenarios other than they should have sink pads leading to encoders. My first ideas is to wrap all of those inside a 'video-recording-bin' that hides its internals from camerabin. From the camerabin side it will just link the video and audio input this bin's pads. It is also possible to remove encodebin so the encoders part is the same for all scenarios.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/209.