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

Video playback/Run Command cues #3

Open
nodiscc opened this issue Aug 30, 2015 · 27 comments
Open

Video playback/Run Command cues #3

nodiscc opened this issue Aug 30, 2015 · 27 comments
Assignees
Labels
enhancement/request Suggestion for new features or improvements

Comments

@nodiscc
Copy link
Contributor

nodiscc commented Aug 30, 2015

Hi, thanks for writing this great tool. Are there any plans to support video cues? I see you are already using GStreamer which is able to do video decoding. Video playback in a separate window (e.g. placed on an external monitor/videoprojector) would be a nice addition.

@FrancescoCeruti FrancescoCeruti added the enhancement/request Suggestion for new features or improvements label Aug 30, 2015
@FrancescoCeruti
Copy link
Owner

Hi, yes, I've plans to support video cues, probably it will take quite a bit because currently I'm working on a better software design and some new functionality for the 0.4 version, but the plan is to add the video support as soon as possible after this release.

@FrancescoCeruti FrancescoCeruti self-assigned this Nov 15, 2015
@gnaag
Copy link

gnaag commented Apr 27, 2016

Looking forward to this. Currently there is no video show manager on linux (vlc and split playlist not counting because it is really clumsy to use during the show). Thanks in advance.

@nodiscc
Copy link
Contributor Author

nodiscc commented Apr 28, 2016

Another way around would be adding cues with the abiity to run arbitrary commands (eg vlc /path/to/scene1.mpg). This would also be useful for interfacing with other programs that don't support MIDI IN/Jack transport, etc.

This way you leave video playback/decoding/filters to a full featured video player.

@nodiscc nodiscc changed the title Video playback Video playback/Run Command cues Apr 28, 2016
@FrancescoCeruti
Copy link
Owner

FrancescoCeruti commented Apr 28, 2016

@nodiscc good idea

FrancescoCeruti added a commit that referenced this issue Apr 28, 2016
 Add: command-cue(s);
 Update: minor UI update.
@gnaag
Copy link

gnaag commented May 4, 2016

That would bring even more possiblities such as displaying webpages in a
browser directly from cues or showing off applications. Nevertheless
built-in videoplayer would be a bit better for end-users.

2016-04-28 22:53 GMT+02:00 Francesco Ceruti [email protected]:

@nodiscc https://github.com/nodiscc good idea

  • Video Playback
  • Run command cues


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#3 (comment)

@FrancescoCeruti FrancescoCeruti added this to the v0.5 milestone May 4, 2016
@nodiscc
Copy link
Contributor Author

nodiscc commented May 4, 2016

@gnaag a need will inevitably arise for users to apply some filters/seek/do whatever an advanced player already does, which is what I suggesting leveraging this, instead of eating development time (do not reinvent the wheel)

@gnaag
Copy link

gnaag commented May 4, 2016

The question is whether it would be responsive enough. During show it is
necessary to click and run.

2016-05-04 21:02 GMT+02:00 nodiscc [email protected]:

@gnaag https://github.com/gnaag a need will inevitably arise for users
to apply some filters/seek/do whatever an advanced player already does,
which is what I suggesting leveraging this, instead of eating development
time (do not reinvent the wheel)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#3 (comment)

@nodiscc
Copy link
Contributor Author

nodiscc commented May 4, 2016

Ah I see what you mean (lag due to time required to launch the player). Regarding VLC specifically, if you set it to "only allow one window" it will start playback in an existing VLC window (very fast):

  • start VLC before the show, full screen it on your videoprojector display with a blank (black) frame
  • run the cue and it will attach to the player and play it on the projector.

Some other players are fast enough (mpv/mplayer) but I have no experience with "use existing window" with those.

@FrancescoCeruti
Copy link
Owner

FrancescoCeruti commented May 5, 2016

Well, since the "command-cues" are just a bunch of lines of code, I've implemented them, so someone che use them to play videos ... and to do other awesome things ;)

Anyway I've received more than one request for proper video-cues, and I think that having all you need in one piece of software, sometimes, is more simple than combining more tools, plus, the big work is to refactor the current code to allow video and audio streams, all the inputs/output and effects are almost only wrappers around GStreamer elements.

@nodiscc
Copy link
Contributor Author

nodiscc commented May 6, 2016

Nice, will test this soon.

having all you need in one piece of software, sometimes, is more simple than combining more tools

Right.

... and to do other awesome things ;)

Looking forward to test this with lighting cues and puredata commands. Thanks!

@macdroid53
Copy link

This feature is definitely desirable.
Might be able to implement it with info-beamer...and it has a raspberry pi version. Multiple video displays could be commanded over the net with OSC or MIDI commands from LISP.
https://info-beamer.com/

@offtools
Copy link
Contributor

offtools commented Dec 2, 2016

Mapmap is also a possibity. Its still under development but under Linux sound works since some weeks and it has OSC support, which gives some more control options then their gui. And it is the only working mapping software under Linux I know so far I know.

Its possible to use command cues and "oscsend" to control mapmap.
Mapmap still has some glitches (videos are only looped at the moment...), but not a big deal.

A native support for mapmap through a module in lisp would be awesome.

@FrancescoCeruti FrancescoCeruti removed this from the v0.5 milestone Jan 28, 2017
@FrancescoCeruti FrancescoCeruti pinned this issue Mar 31, 2019
@fnetX
Copy link
Contributor

fnetX commented May 13, 2019

Hey, I just wanted to refer to this for video cue: #166 (comment)

mpv is only a workaround, but it works really well. The feature set is really good, it supports many formats, is really customizable. I know it's probably not a good idea to depend on third party software, but for everyone who's searching for a workaround: I think it's perfect. You can even disable every OSD stuff in case you accidentally toggle it.

Edit: and I think that mapgen is not exactly suited for simply putting things on screen. There should be something easier (like mpv is).

Edit 2: I'll just share some of my mpv codes I use. Might be someone is looking for an urgent workaround:

run mpv on second screen:
mpv --fs --fs-scren=1 FILE.mp4

run mpv and disable OSD:
mpv --no-osc 1 --osd-font-size=1

run mpv on second screen with subtitles and some options:
mpv --fs --fs-screen=1 --sub-file=FILE.ass FILE.mp4 --sub-scale=1.8 --sub-margin-y=0 --sub-ass-force-margins

run mpv via ssh on remote machine (that'what I usually use because of audio / video machine separation):
ssh MACHINE "DISPLAY=:0 nohup mpv --fs-screen=1 --fs 'file.mp4'"
Note the DISPLAY=:0 to identify the X display to use and the nohup to get independent from the ssh connection (Video might stop on network failure without)

well and that might be useful as well:
--no-osd-bar

Using an awesome window manager (I'm running LMDE3 with Cinnamon (muffin) on my video machine. I enabled fading window effects, so starting and stopping videos, slideshows, presentations has got nice fading. Screen is black, but you can also add a wallpaper fitting to your organization. I sometimes use the clock desklet with custumizable text / format to display something like "Event XY on 13th May 2019, 22:45" when there's nothing else to show.

@Himura2la
Copy link

Video cues wound be an awesome feature. There's absolutely no free alternative to QLab, which forced me to write my own app for live shows. And I don't like it :)

@sonicyouch
Copy link

I totally agree, video cues would make that awesome software perfect.
Hope that feature will come soon :)

@fnetX
Copy link
Contributor

fnetX commented Nov 28, 2021

A quick workaround might be to still depend on mpv, but allow some launcher wrappers for convenience. MPV is an awesome project and will work reliably and play kinda all your video files, you can even use it to create image slide shows etc (so whenever we need to launch a pic from within LiSP, we'll use mpv, too).

@bgoldstone
Copy link

bgoldstone commented Mar 22, 2024

I would be interested in helping this, but I am not familiar with the code base. @FrancescoCeruti

@FrancescoCeruti
Copy link
Owner

I would be interested in helping this, but I am not familiar with the code base. @FrancescoCeruti

The way I've envisioned this task will require a non-trivial rework of the media backend, but I believe it can be approached in two main iterations:

  1. Implement video elements (wrapping GStreamer) to allow the creation of video-only cue
  2. Rework the elements composition logic and UI to support cues that can handle both audio and video

The area of interest is the gst_backend plugin, the entry point it's here: gst_backend.py

In there you should be able to register a custom "factory" to create a video cue, which should simply be a MediaCue but initialized with elements (pipeline) that handle the video stream instead of the audio.

The "pipeline" definition is a list of the elements class names.

Elements are located in the lisp.plugins.gst_backend.elements module, they are imported dynamically.

Most elements are simple wrappers, you can start with that, but you need to know what gstreamer-elements you need to use. To start experiment you can simply use videotestsrc (generates a test video stream) and autovideosink (display the video in a window), you can search the gstreamer documentation for details.

Just a quickstart, if you have any question we can chat via matrix @francesco.ceruti:matrix.org or open a discussion here on GitHub.

@DMJC
Copy link

DMJC commented Jul 1, 2024

I have two workarounds for this depending on what's needed. One is to control OBS and use OBS to playback video files using the media player plugin. I use Linux Show Player to switch scenes in OBS to the video file using the command queue and the OBS CLI Interface. The other way (more complex) is to have Linux Show Player trigger a video player on a screen and have OBS capture the window as a scene and have Linux Show Player trigger a transition to the screen capture screen in OBS.

@fnetX
Copy link
Contributor

fnetX commented Jul 1, 2024

@DMJC this sounds rather complex, tbh. Launching mpv, even via remote SSH connection was always the way to go.

You can also make it open a socket and send IPC commands to it. There are some examples in the docs: https://linux-show-player-users.readthedocs.io/en/latest/cues/misc_cues.html#mpv-player

I've successfully run many shows with launching mpv directly or via SSH, and recently started to use the IPC to do things like automated fade down, or enabling / disabling looping of intro trailers.

@DMJC
Copy link

DMJC commented Jul 1, 2024

We were cross mixing multiple cameras shots/slide shows etc in our feed using one computer with a Decklink 8K card + 4 SDI cameras to handle all vision (Anime/Video Games Convention was the use case). It worked extremely well once we added Linux-Show-Player to control it all... We only ever touch OBS for switching between cameras on live crosses, everything else is in LSP. Cosplay controls became z-x to control the slideshow and spacebar to trigger music/slideshow/camera transition cues.

@griuzly
Copy link

griuzly commented Jul 3, 2024

You can also make it open a socket and send IPC commands to it. There are some examples in the docs: https://linux-show-player-users.readthedocs.io/en/latest/cues/misc_cues.html#mpv-player

I've successfully run many shows with launching mpv directly or via SSH, and recently started to use the IPC to do things like automated fade down, or enabling / disabling looping of intro trailers.

I use LSP for my theatrical shows with Command Cues for video and mpv is the first choice.
I read docs about IPC commands and was successfull in sending simple commands to mpv by this way but I have no idea how to automate a video fade down... can you post an example?

@fnetX
Copy link
Contributor

fnetX commented Jul 9, 2024

@griuzly this is a little hacky. I created a shell script which I run as a "command cue" which adjusts brightness in a loop. Will share it later, it's unfortunately not on my machine at home.

@griuzly
Copy link

griuzly commented Aug 6, 2024

@griuzly this is a little hacky. I created a shell script which I run as a "command cue" which adjusts brightness in a loop. Will share it later, it's unfortunately not on my machine at home.

I wrote some shell scripts too using xrandr that acts on the brightness to get fade in and out. But it can't obviously crossfade the video in this way.
To explain better: I can get video fade-in with this command:
mpv -fs-screen=1 -fs '--vf=fade:t=in:st=0:d=20' --input-ipc-server=./testsocket --keep-open=always --osc=no videofile
But I can't command a fade-out with:
echo no-osd vf set fade=t=out:st=0:d=20 | socat - ./testsocket
because of the st parameter that represents the frame number and I can't know the exact frame number when I will press GO during a show.
Furthermore a second instance of mpv always overlaps the others.
Has anyone ever successfully managed to create a video crossfade?

@FrancescoCeruti
Copy link
Owner

I've never used it, but you could give a try at this: https://github.com/brunoherbelin/vimix? It supports OSC (https://github.com/brunoherbelin/vimix/wiki/Open-Sound-Control-API) so you should be able to control it from LiSP

@fnetX
Copy link
Contributor

fnetX commented Aug 13, 2024

@griuzly I created a script (still didn't manage to grab a copy from the machine, sorry) that sends brightness commands in a loop to fade out. It is triggered by LiSP and then uses the mpv socket to reduce brightness.

Regarding crossfade .. what I often do to workaround is to rely on my window manager and effects. I'd probably let mpv open on the secondary (non-presenting) screen and use a hotkey to move it over + assign a fade-in effect for window moving. Hacky but could do the trick.

@griuzly
Copy link

griuzly commented Aug 15, 2024

I've never used it, but you could give a try at this: https://github.com/brunoherbelin/vimix? It supports OSC (https://github.com/brunoherbelin/vimix/wiki/Open-Sound-Control-API) so you should be able to control it from LiSP

Interesting project. I can crossfade video with OSC commands like this:
/vimix/video01/transparency ff 1.0 1000 && /vimix/video02/alpha ff 1.0 1000

The problem is that vimix has no audio support.

It seems more promising the gstreamer approach usig ges-launch. With this command is possible to play video setting their opacity/transparency:
ges-launch-1.0 +clip video01.mpg layer=1 set-alpha 0.5 +clip video02.mpg layer=0 set-alpha 0.5

but I didn't find something like ff parameter in vimix osc commands that assigns variable opacity/transparency from a value to another value in a certain time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement/request Suggestion for new features or improvements
Projects
None yet
Development

No branches or pull requests