Confusion on video compositor timestamp offset

Hi 🙂 I'm working on a POC app and evaluating membrane for a project at work and I have some questions about how the timestamp offset for the video compositor plugin is supposed to work. First the goal of the POC app is to take an arbitrary list of videos and time offsets and dynamically stitch them together into one continuous video (and then stream the result somewhere but I haven't gotten that far yet). Some other members of my team chatted with some of the membrane contributors and they suggested we take a look at the video compositor plugin and provided us some skeleton code, however, I'm struggling to understand how the timestamp offset option that the compositor takes can be used to seek through the input. No matter what input I give for the timestamp offset (except a negative number which raises as expected) the video starts playing from the first frame. Does the timestamp offset not do what I am expecting it to do? My approach for the POC is to dynamically spawn (and remove previous children) at each cue point and attempt to provide the compositor timestamp offset to seek the new video to the correct offset. Is this the right approach? Thanks! Sorry for the long post 🙂
5 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
nickdichev_fw
nickdichev_fw•2y ago
@.wol That does make a lot more sense thanks for clarifying that. I started playing around with the video merger plugin and made some progress there but I am experiencing some strange behavior that I can't really reason about with my limited knowledge of how membrane works. I uploaded some code snippets from the POC in a gist: https://gist.github.com/nickdichev-firework/fb41d5d789b13b056fe536a4c9a27aa5 There's two versions of the application in the gist: 1. merger_to_compositor.ex pipes the VideoCutAndMerge bin into the video compositor. This one displays strange behavior of: paused playback between the cue points, playback not starting for the second clip, and no clips/cue points after the third displaying. 2. merger_to_player.ex pipes the VideoCutAndMerge directly to the SDL player. This one behaves a bit closer to what I expect to happen, however, there is a strange black screen between the second and third clips. Additionally, a new window is opened for every clip -- unlike the version with the compositor. Could you take a look and let me know if the application makes sense at all for what I'm trying to accomplish? After re-reading your comment I think maybe I misinterpreted and should be directly feeding the RawVideo from just a VideoCutter into the compositor? Thanks so much, appreciate the help 🙂
mat_hek
mat_hek•2y ago
hi @nick-firework, it seems like the new window being created each time seems like a bug in the player, please check if this fix helps: https://github.com/membraneframework/membrane_sdl_plugin/tree/fix-window
GitHub
GitHub - membraneframework/membrane_sdl_plugin at fix-window
Membrane video player based on SDL. Contribute to membraneframework/membrane_sdl_plugin development by creating an account on GitHub.
mat_hek
mat_hek•2y ago
I'm not sure what causes the black screen though, possibly the previous video finishes before the next one starts to play? If you can provide a repo reproducing that, including the videos you use, it would be easier for us to help 😉
nickdichev_fw
nickdichev_fw•2y ago
Hi @mat_hek that change does work for the issue with the player! I pulled your changed down into my local deps and had to update it for core 0.11 though!
Want results from more Discord servers?
Add your server