Author Topic: Commercial / videos on mGALAXY (RETROCUBE)  (Read 7976 times)

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #10 on: February 09, 2015, 11:34:47 AM »
A script that random play video. To put in vlc folder.

You NEED to add the option ----one-instance in the command line or you will have a new window for next video

This script work for all file, so avoid to have a *.txt in the folder

You need to change the sleep values according to your temporisation.

Code: (autoit) [Select]
#include <Array.au3>
#include<file.au3>

;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0

;Special parsing
$count = StringInStr($command, '"', 0 , -2)
local $folder = StringTrimLeft( $command, $count )
$command = StringLeft( $command, $count - 2)
$count = StringInStr($folder, '\', 0 , -1)
$folder = StringTrimright( $folder, $count )


HotKeySet("{ESC}", "Terminate")

Local $avi_folder = _FileListToArray($folder, "*.*", 1)

If IsArray($avi_folder) Then
    ;_ArrayDisplay($avi_folder) ; View contents of $avi_folder
Else
    MsgBox(0, "Error", "Files not found in directory")
EndIf
   
local $avinumber = UBound($avi_folder) - 1
local $Randomfile =''
local $PID

   $Randomfile = $avi_folder[Random(1, $avinumber )]
   $PID = Run ('"' & $app & '" ' & $command & ' "' & $folder & $Randomfile & '"')

While 1
   sleep(10000)
   
   $Randomfile = $avi_folder[Random(1, $avinumber )]
   Run ('"' & $app & '" ' & $command & ' "' & $folder & $Randomfile & '"')
WEnd



exit 0

;****************************************************

;Functions
Func Terminate()
    While ProcessExists ( $PID )
          ProcessClose ( $PID )
    WEnd
    Exit 0
EndFunc


This script isn't finished and I will don't finish it, but it's a good base to start your own script.

N13770.U2

  • Newbie
  • *
  • Posts: 43
  • N13770.U2
    • N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #9 on: February 08, 2015, 02:39:22 PM »
Yo!!

It worked !!!
It was fun to watch the commercial of each console!
Very thanks for the help!
Marcelo Nietto
N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
https://www.youtube.com/user/N13770

dashingw

  • Full Member
  • ***
  • Posts: 100
    • Email
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #8 on: February 08, 2015, 11:49:47 AM »
Hey, this was sort of what I was looking for when I mentioned a Mame Screen saver. Now are there lines we can add into this script so that once we select a video from the mGalaxy screen and it plays to the end then it will just randomly select another video in that folder and keep playing random vieos until we want to go back to the main menu??

P.S - Sorry Marcelo if it seems I hijacked your thread, but this is also something in the lines of what I was aking for almost, not quite but good enough  :D
« Last Edit: February 08, 2015, 12:15:41 PM by dashingw »

mgalaxy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1165
    • Email
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #7 on: February 08, 2015, 09:31:32 AM »
Using mGalaxy (and VLC) to play video files:

Create a new system in systems.xml file:

Code: (xml) [Select]
<System Type="Computer">
<Name>Video Player</Name>
<AppPath/>
<RomPath/>
<SnapPath/>
<VidPath/>
<Emu selected="0">
<Cmd id="0" hidden="false" name="VLC" value="--fullscreen --global-key-quit=&quot;Esc&quot; &quot;%path\%file%ext&quot;"/>
</Emu>
<Extensions>.avi,.mp4,.mpg,.mpeg,.mkv</Extensions>
<Active>False</Active>
<Script>True</Script>
<Database>False</Database>
</System>

I've set some extensions inside the <Extensions> tags, you can of course add as many a you want.

Create a new folder inside the "mGalaxy 'Data' folder. Name it 'Video Player' and place the icon I've attached to this post inside.

« Last Edit: February 08, 2015, 09:36:08 AM by mgalaxy »

N13770.U2

  • Newbie
  • *
  • Posts: 43
  • N13770.U2
    • N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #6 on: February 07, 2015, 05:21:18 PM »
Yo!!

I did some more tests and it did not work ... I give up.

Marcelo Nietto
N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
https://www.youtube.com/user/N13770

N13770.U2

  • Newbie
  • *
  • Posts: 43
  • N13770.U2
    • N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #5 on: January 26, 2015, 11:31:57 AM »
Yo!!

It may work, but I could not make it work.
Marcelo Nietto
N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
https://www.youtube.com/user/N13770

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #4 on: January 26, 2015, 11:15:34 AM »
VLC don't work ?

N13770.U2

  • Newbie
  • *
  • Posts: 43
  • N13770.U2
    • N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #3 on: January 26, 2015, 03:22:23 AM »
Yo!!

I used smplayer PORTABLE and could run the videos.
It was not 100%, but it is working!
Marcelo Nietto
N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
https://www.youtube.com/user/N13770

N13770.U2

  • Newbie
  • *
  • Posts: 43
  • N13770.U2
    • N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
Re: Commercial / videos on mGALAXY (RETROCUBE)
« Reply #2 on: January 16, 2015, 12:56:33 PM »
Yo!!

I will try to use some portable player to run the videos ... I think in VLC or KMPlayer.
Let's see ...

I post if progress or not.

N13770.U2
Marcelo Nietto
N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
https://www.youtube.com/user/N13770

N13770.U2

  • Newbie
  • *
  • Posts: 43
  • N13770.U2
    • N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
Commercial / videos on mGALAXY (RETROCUBE)
« Reply #1 on: January 08, 2015, 09:02:12 AM »
Yo!!

I would like put a commercial about video games to watch in mGalaxy. Is it possible? How do?

N13770.U2
Marcelo Nietto
N13770 TV - Carros, Games, Cinema, Brinquedos, Rock'n'Roll e Diversos
https://www.youtube.com/user/N13770