Author Topic: Is there a way to schedule mp4 files at the same time i run my show?  (Read 2357 times)

Offline smeighan

  • Developer
  • ******
  • Join Date: Mar 2013
  • Location: Highlands Ranch, Colorado
  • Posts: 1,034
  • Kudos: 11
    • Nutcracker123
Well, I'm back causing problems

I am working on the new single strand effects
I am working on my Halloween show.
i am relaxing.

so I have 3 mp4 movies
This is Halloween
Thriller
Your a mean one , mr grinch

Also have the mp3 files from the above that i am using to sequence them in xlights and play on my 20x120 matrix

So this is what i w was looking for. I want to schedule the movie and the sequences from my pi.

i do NOT need any of the fancy scheduler stuff, i would like a shell script that does something like this

I assume there is a command to play a mp4 file and have it come out the hdmi port. Ill call this program mp4play
I also dont know the command line for running a sequence, ill call it piplayer

#/bin/sh
loop
mp4play thisishalloween.mp4 &
piplayer thisishalloween.fseq
sleep 30

mp4play thriller.mp4 &
piplayer thriller.fseq
sleep 30

mp4play grinch.mp4 &
piplayer grinch.fseq
sleep 30
endloop


 I want the movie to launch and run in the background.
next launch the piplayer and let it finish
the sleep 30 would account for any cases where the movie might have run a little long.


so is this possible? If it is i will have scheduled movies and xlight sequences. it would be cool

thanks
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Facebook [url=https://www.facebook.com/groups

Online CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 8,799
  • Kudos: 175
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #1 on: October 06, 2013, 12:51:46 AM »
You should be able to do this using current FPP v0.1.0 by making 3 playlists with only one sequence in them: (call them ThisIsHalloween, Thriller, and Grinch for this example).

Then run the following script:

#!/bin/sh

while /bin/true
do
        fpp -P ThisIsHalloween
        omxplayer thisishalloween.mp4
        sleep 5

        fpp -P Thriller
        omxplayer thriller.mp4
        sleep 5

        fpp -P Grinch
        omxplayer grinch.mp4
        sleep 5
done


That will tell fppd to play the ThisIsHalloween playlist and then use omxplayer to play the thisishalloween video.  In case the sequence doesn't finish before the video finishes, we sleep for just a few seconds before starting the next one.

You don't need to background omxplayer since "fpp -P" returns immediately after sending the command to fppd.

Eventually you'll also be able to do this two other ways.  One would be using the event subsystem which I have created and which will go into master in the near future after we've given it a good burn-in.  The second method will be another playlist feature that is in the design phase which will allow you to play videos and trigger events in a playlist.  Once that feature is complete, you'll be able to simply create a playlist like the following with repeat turned on.

Video - thisishalloween.mp4
Sequence - thisishalloween.fseq
Pause - 5
Video - thriller.mp4
Sequence - thriller.fseq
Pause 5
Video - grinch.mp4
Sequence - grinch.fseq
Pause 5

The videos would be set to play in the background.
-
Chris

Offline smeighan

  • Developer
  • ******
  • Join Date: Mar 2013
  • Location: Highlands Ranch, Colorado
  • Posts: 1,034
  • Kudos: 11
    • Nutcracker123
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #2 on: October 06, 2013, 06:54:04 AM »
great chris!

Now one more question,
fpp will have the mp3 playing audio and the omxplayer will have aduio coming from the video.

Between these two sources of audio, i want the one that is connected to the mp4. The mp4 file has animated singing pumpkins that are perfectly synced to the music.

it wont be as noticeable if the fpp sequence is slightly off to the music from the mp4.

so how do i manage the two audio streams coming out of the one audio port? i want the mp4 to be the sole audio stream.
Thanks
sean

Offline Materdaddy

  • Moderator
  • *****
  • Join Date: Jul 2013
  • Location: Oceanside, CA
  • Posts: 2,050
  • Kudos: 9
    • Christmas On Quiet Hills
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #3 on: October 06, 2013, 09:36:19 AM »
Sean,

I would disable the audio from the one FPP plays.  You can have it play only sequence data without audio.  When setting up a playlist you can use the "Sequence Only" type.

Offline David Pitts

  • Administrator
  • *****
  • Join Date: Mar 2013
  • Location: Falcon, CO
  • Posts: 3,773
  • Kudos: 64
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #4 on: October 06, 2013, 01:54:59 PM »
Also in order for the omxplayer to output to audio jack you need to use "-o" parameter.

example:
omxplayer -o local thriller.mp4
PixelController, LLC
PixelController.com

Online CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 8,799
  • Kudos: 175
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #5 on: October 06, 2013, 03:36:24 PM »
Also in order for the omxplayer to output to audio jack you need to use "-o" parameter.

example:
omxplayer -o local thriller.mp4

Does this only apply if you have the HDMI connection attached as well?  I didn't need to do this to get
audio out the 1/8" stereo jack on my Pi last night running the 0.1.0 SD card image.  I ran a test before
replying to Sean's post.  I'm just using composite to a secondary input on one of my main computer
monitors and the 1/8" jack outputting to a pair of speakers.  I also found out that software mixing seems
to be working out of the box.  I can play another ogg stream using ogg123 from the command line while
a sequence and accompanying ogg file is playing via fppd/ogg123.  I can also play a .mp4 with audio
while a sequence and ogg are playing via fppd/ogg123.

Offline smeighan

  • Developer
  • ******
  • Join Date: Mar 2013
  • Location: Highlands Ranch, Colorado
  • Posts: 1,034
  • Kudos: 11
    • Nutcracker123
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #6 on: September 03, 2014, 11:16:47 AM »
I am bumping this post from Chris from a year ago.

I used this script on my pi player last year for halloween. i had a video projector and lights that just looped for the 6 hours on halloween.

others may need something similar.

this year i am going to have three projectos

fpp1 master, video for singing pumpkins and all the e1.31 lights
fpp2 slave, video synced to master. no lights. projector is for my garage and windows.
fpp3 standalone. this will project a face on a jack skellington full size manikin, it will also have audio to a local speaker under the manikin.

Offline Frankr

  • Supporting Member
  • ******
  • Join Date: Jul 2013
  • Location: Rocklin, CA
  • Posts: 259
  • Kudos: 0
    • Rocklin Lights
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #7 on: September 03, 2014, 11:40:11 AM »
Sean,

So did you just make the Jack skellington with a purely round face so that the projection will give the eyes nose and mouth? Or did you do some sort of mix of fixed features and projections?

This setup sounds awesome and its making me jealous that I don't live in your neighborhood!

Frank

Offline smeighan

  • Developer
  • ******
  • Join Date: Mar 2013
  • Location: Highlands Ranch, Colorado
  • Posts: 1,034
  • Kudos: 11
    • Nutcracker123
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #8 on: September 03, 2014, 11:54:06 AM »
here is video
https://www.youtube.com/watch?v=Y50lfyRWGqM

it is from here
http://www.themightymicroscope.com/windowcreeps/

I got ball from walmart and painted it white.

here is their jack


Offline rjchu

  • Newbie
  • *
  • Join Date: Nov 2013
  • Location:
  • Posts: 35
  • Kudos: 0
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #9 on: September 03, 2014, 05:55:22 PM »
Does the master/slave feature support video sync now?

Also, I'd thought that video support was "native" in fpp now and that you didn't need to use she'll scripts anymore?

Can you tell I'm gearing up for this years show and been somewhat out of touch recently? ;)

Thanks,

-joni-

I am bumping this post from Chris from a year ago.

I used this script on my pi player last year for halloween. i had a video projector and lights that just looped for the 6 hours on halloween.

others may need something similar.

this year i am going to have three projectos

fpp1 master, video for singing pumpkins and all the e1.31 lights
fpp2 slave, video synced to master. no lights. projector is for my garage and windows.
fpp3 standalone. this will project a face on a jack skellington full size manikin, it will also have audio to a local speaker under the manikin.

Offline smeighan

  • Developer
  • ******
  • Join Date: Mar 2013
  • Location: Highlands Ranch, Colorado
  • Posts: 1,034
  • Kudos: 11
    • Nutcracker123
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #10 on: September 03, 2014, 06:54:13 PM »
i am not using the real video synch, i just will get scripts that start near the same time. one second accuracy will be fine for my application.

video and lights will be synced on master, that is the most important. video on whole house has some cool halloween effects from http://atmosfx.com/products/details/bone-chillers
http://www.hallowindow.com/

Offline drlucas

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Barrie, Ontario - Canada
  • Posts: 1,418
  • Kudos: 3
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #11 on: September 03, 2014, 07:13:13 PM »
Cool...the hallowindow guy is from Canada so the pricing for the videos must be even cheaper for you guys :-)

Ryan

Offline drlucas

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Barrie, Ontario - Canada
  • Posts: 1,418
  • Kudos: 3
Re: Is there a way to schedule mp4 files at the same time i run my show?
« Reply #12 on: September 03, 2014, 07:29:35 PM »
...and I like the paypal option he has.

Now....this video is very cool --> http://atmosfx.com/products/detail/bone-chillers  <-- to do something like that in the doorway would be absolutely wild!!

 

Back to top