(Topic ID: 227706)

New creature (holo) mod for CFTBL

By steve45

5 years ago


Topic Heartbeat

Topic Stats

  • 290 posts
  • 49 Pinsiders participating
  • Latest reply 1 year ago by jlppin
  • Topic is favorited by 61 Pinsiders

You

Linked Games

Topic Gallery

View topic image gallery

serial log (resized).png
serial (resized).png
rightone (resized).png
chmod (resized).png
Sem título (resized).png
permission (resized).png
permissiondenied (resized).png
tail (resized).png
grep serial (resized).png
underdata (resized).png
correctone (resized).png
WhatsApp Image 2022-02-24 at 16.39.17 (resized).jpeg
lsrta (resized).png
baspath (resized).png
web ui (resized).png
serial-media-ini place (resized).png

You're currently viewing posts by Pinsider Zigzagzag.
Click here to go back to viewing the entire thread.

#125 3 years ago

steve45 does the CFTBL serial media server package on your website also contain the necessary files/configs for the sound board ?

#126 3 years ago

For anyone interested : you can run the serial media server on the same Pi as the sound runs on.
This saves you buying 2 Pis, cabling etc.

The following assumes a basic knowledge of Linux and that you are able to SSH into the TiltAudio card, use SCP to transfer files to it and use nano to edit config files there.

This is the recipe :

1) Install TiltAudio card as normal with appropriate sound pack featuring the right serial.txt command files

2) Set up TiltAudio with serial server address 127.0.0.1 and port 19999

3) Install serial media server into the directory /home/pi/serial-media-srv on the TiltAudio Pi as described here : https://github.com/sker65/serial-media-srv
The easiest way is to download the master zip (https://github.com/sker65/serial-media-srv/archive/master.zip) and unzip in the /home/pi directory.
Afterwards, rename /home/pi/serial-media-srv-master to /home/pi/serial-media-srv
Copy /home/pi/serial-media-srv/serial-media.service to /etc/systemd/system

4) Make a directory "smsdata" under /boot on TiltAudio SD card.
Make a directory "data" under "smsdata".
Put your mediafiles there

5) In /home/pi/serial-media-srv/start.sh, edit the BASEPATH :

BASEPATH=/boot/smsdata

6) Create /boot/smsdata/data/serial-media-srv.ini using the content as shown in the readme on the site above but enable the socketport :

socketport=19999

7) In /boot/config.txt on the SD-card for the Pi, comment out the line DISABLE_HDMI :

# for pi4 disable status at startup
#DISABLE_HDMI=1

Enable the serial media server : systemctl enable serial-media

9) Reboot

Tested and working on a Pi3b.

3 months later
#128 2 years ago
Quoted from Ashram56:

On step 6, I'm little bit unsure, as the test file provided by Steve on his github seems to be using VLC player installed on his macbook. What should be a proper ini file for a RPI ?
Thanks

Yes, the ini file in the repo itself is wrong/too old - but in the readme there's a newer/better example which I used : https://github.com/sker65/serial-media-srv#config-file

1 week later
#131 2 years ago
Quoted from TazDevl:

Zigzagzag: thanks for this excellent description!
I set my System up as per Zigzagags excellent instructions, but no videos are playing. I'm a bit stumped at the moment... After starting, the monitor shows TiltAudio logo (/home/pi/tiltaudio3-fullhd-gray-bg-landscape.png)... TA is running on a Pi3b. This is what I did:
- in TA Config, configured sms_address to localhost (127.0.0.1) and sms_port to 19999
- master.zip downloaded from github and extracted to /home/pi/serial-media-srv (renamed as instructed)
- copied /home/pi/serial-media-srv/serial-media.service to /etc/systemd/system
- created /boot/smsdata/data
- MP4 files placed in /boot/smsdata/data
[quoted image]
- basepath set
[quoted image]
- /boot/smsdata/data/serial-media-srv.ini created
[quoted image]
- /boot/config.txt changed
[quoted image]
- enabled the media server
- rebooted
The service is up and running:
[quoted image]
The Serial.log seems to indicate that no media files are found:
[quoted image]
If it doesn't find any videos, I would have expected to see default.jpg, telling me to install a media pack. However, the TA logo keeps being displayed. I also tested to set enable_serial to TRUE in the TA config, but no change in behavior whatsoever.
I should add that initially I saw an error re. missing module 'serial' so I installed it manually with "apt-get install python3-pip" and "python3 -m pip install pyserial" (as described in the github link above)
Any tipps what I should do now to narrow this down?

Have you bought and installed the CFTBL media pack from here : https://go-dmd.de/produkt/serial-media-server-image/ ?

#133 2 years ago
Quoted from TazDevl:

No, the TA Board is in a Data East Jurassic Park and I simply placed some sample videos into /boot/smsdata/data.
But again, if the Media Pack would be the culprit, I would expect to see Default.jpg telling me to install the Media Pack...?

True that. I don't have the CFTBL here, but I will try to get to it and check the setup.

What happens if you run the command manually - "fim -a -q /boot/smsdata/data/default.jpg" ?
Does the Pi complain about missing file ?
Or could it perhaps be that the program "fim" itself that is missing ?

#134 2 years ago

I see there's a bug in steve45 's code.
The img-mov-serial.py doesn't actually collect anything for the "movies found" variable.
So that explains why you don't see anything in the startup there.

#136 2 years ago
Quoted from TazDevl:

Thanks! Will give that a try tomorrow. After I got the missing module error I ran the apt-get commands for all packages listed on the github site, fim was amongst them. The default.jpg was initially missing, I copied it from the SMS server image I previously downloaded (can be seen in my first screenprint above). But of course there could still be someting wrong. Will report back on that.
I saw that for the sound where I added a video in the TA "Sound" config, a "serial.txt" has been created in this sounds directory, however this file is empty. I think there should be the play command for the video in there, e.g. "PLAY Map.mp4"...? I entered that manually into the file but this also didn't change anything.
Forgot to mention that I am on v1.37

Videos are triggered by sounds playing.
In the web ui you will (for each sound) find a "serial" field where you can enter commands like "PLAY Map.mp4"

If you grab the pull request I (as LinTicket) have made in the repo, you will get the ability to play a default file on startup - and the command "LOOP" is added which repeats a file until another is played.

steve45 have you had the time to look over the pull request ?

#138 2 years ago
Quoted from TazDevl:

Sorry, that is what I did and meant with "where I added a video in the TA "Sound" config". I will be able to do work on the machine later in the afternoon / early evening again and report back.
You lost me with "If you grab the pull request I (as LinTicket) have made in the repo, you will get the ability to play a default file on startup - and the command "LOOP" is added which repeats a file until another is played.". Where can I find and should do what?

TazDevl it's not needed for getting this going, so just leave it for now

#141 2 years ago

TazDevl not sure, but try to place the "BASEPATH=/boot/smsdata" after the "BASEPATH=/dev/sda fi" sequence perhaps ?

Edit : nah, your log shows it's right.

What is the output on console when you trigger the sound that should play for example "sample.mp4" ?
If it can't find the file it should say something like "media not found XXX".

#147 2 years ago
Quoted from TazDevl:

Nice, thanks Steve!
@Zigzagtag: btw, what Firmware version are you running on / have you implemented the procedure you described above?

I *think* it is 1.33 looking at the dates in the changelog (https://tiltaudio.com/changelog/) and the date on a (probably borked) backup I have on this computer.

#149 2 years ago
Quoted from TazDevl:

Zigzagzag
steve45
Interestingly, there is a failed service everytime after reboot:
[quoted image]
The TA log throws a lua syntax error trying to play the video with the sound:
[quoted image]
However, the error message in the log seems truncated. This is the output of the "play map.mp4" command in the TA "Test" menu:
[quoted image]
The error is the same if I write "map" with a small or capital "m". The file itself is written "Map.mp4" in the file system:
[quoted image]
I now remember that a little while ago when I started working on this I already received the exact same error in the Test menu before I followed your procedure above. At that time I simply thought that the Test menu was not supposed to be used for video play commands...
The SMS serial.log still is unchanged to before (what do the "ioctl" errors mean?):
[quoted image]

The lua test menu has nothing to do with the serial media server as far as I know.

If you want to test from the web ui, I believe you can play a sound with the appropriate serial command associated from the soundset tab.

But - have you entered "PLAY Map.mp4" in the serial field, or only "Map.mp4" ?

#151 2 years ago

I'm not sure we're looking at the serial media server log.
If you ssh in, is there a log file in the serial media folder ?

#153 2 years ago

Right you are. This log doesn't show that the serial media server has received any commands.
So maybe playing a sound from the web ui doesn't trigger the serial command ?

The live log only shows what's happening in the sound part, not the serial media server.

#157 2 years ago
Quoted from TazDevl:

I have configured video "Map.mp4" for sound "welcome_jurassic_park", which is the first sound being played when starting a game:
[quoted image]
Once the TA has booted, the monitor shows default.jpg ("Please install your Media pack"). When I start a game, the monitor continues to show default.jpg (i.e. no video is playing), no additional entries into Serial.log:
[quoted image]
The following is configured under "Config":
[quoted image]

This looks right to me, but obviously the serial media server is not receiving any commands from the sound card event though it is connected.

So it might look as if the sound card is not doing what it should.
Does the debug log/live log for the sound card say anything about sending a serial command ?

#159 2 years ago
Quoted from TazDevl:

Not as much as I can see... The syntax error which I already mentioned (and which also shows up in the logs below) does not have anything to do with it? Or could it actually prevent the serial command from being issued?
This is the live log when I played the sound from the "Sounds" menu (please note that the smiley icon is actually a colon, directly followed by the number 1):
2021-07-04 18:18:20.771 DEBUG MHD-sing [requestHandler] [httpservice.c:2008] url: /duckByType/5, method: GET, version: HTTP/1.1, connCtx: 0x0000
2021-07-04 18:18:26.008 DEBUG MHD-sing [requestHandler] [httpservice.c:2008] url: /sounds/7, method: GET, version: HTTP/1.1, connCtx: 0x0000
2021-07-04 18:18:27.752 DEBUG MHD-sing [requestHandler] [httpservice.c:2008] url: /sounds/7, method: GET, version: HTTP/1.1, connCtx: 0x0000
2021-07-04 18:18:31.634 DEBUG MHD-sing [requestHandler] [httpservice.c:2008] url: /sounds/play/7/0, method: GET, version: HTTP/1.1, connCtx: 0x0000
2021-07-04 18:18:31.634 DEBUG MHD-sing [playCommand] [sdl_sound.c:1362] playCommand: 'PLAY Map.mp4'
2021-07-04 18:18:31.634 DEBUG MHD-sing [processCmd] [sdl_sound.c:1334] processing cmd PLAY Map.mp4
2021-07-04 18:18:31.635 ERROR MHD-sing [lua_run] [lua_binding.c:670] lua error: [string "PLAY Map.mp4"]: syntax error near 'Map'
2021-07-04 18:18:31.639 DEBUG MHD-sing [playMusicWithFadeInAndPos] [sdl_sound.c:1426] loaded music from '/boot/data/sound/Final/music/1977341863-welcome_jurassic_park/Welcome To Jurassic Park.wav' loop=1
2021-07-04 18:18:31.640 DEBUG MHD-sing [playMusicWithFadeInAndPos] [sdl_sound.c:1449] Playing Music id=7(0x0007), 'welcome_jurassic_park:0' gain:40, from /boot/data/sound/Final/music/1977341863-welcome_jurassic_park/Welcome To Jurassic Park.wav
2021-07-04 18:18:31.640 DEBUG MHD-sing [getVolumeForSample] [sdl_sound.c:1042] getVolumeForSample: sample->gain: 40, gainByType: 30, res: 34
2021-07-04 18:18:31.640 DEBUG MHD-sing [setMusicVolume] [sdl_sound.c:518] setMusicVolume to 34 (musicVol=34, ducking=100)
2021-07-04 18:18:43.874 DEBUG MHD-sing [requestHandler] [httpservice.c:2008] url: /sounds/play/stop, method: GET, version: HTTP/1.1, connCtx: 0x0000
2021-07-04 18:18:43.874 DEBUG MHD-sing [fadeMusic] [sdl_sound.c:1247] fading out music: 7
2021-07-04 18:18:43.874 DEBUG MHD-sing [resetFadedMusic] [sdl_sound.c:1252] reset faded music 7, start new 0
2021-07-04 18:19:31.635 INFO RasPiSnd [updateSound] [sdl_sound.c:1887] 139664 - 79663 > 60000 -> fading background music id=0
And this is the Live Log from when I started a game:
2021-07-04 18:20:05.065 DEBUG isr de [stbInterrupt] [pincom.c:157] stb int. address 6 0x06
2021-07-04 18:20:05.070 DEBUG SndServi [playMusicWithFadeInAndPos] [sdl_sound.c:1426] loaded music from '/boot/data/sound/Final/music/2958987715-shooter_theme/Welcome To Jurassic Park.wav' loop=1
2021-07-04 18:20:05.070 DEBUG SndServi [playMusicWithFadeInAndPos] [sdl_sound.c:1449] Playing Music id=6(0x0006), 'shooter_theme:0' gain:36, from /boot/data/sound/Final/music/2958987715-shooter_theme/Welcome To Jurassic Park.wav
2021-07-04 18:20:05.070 DEBUG SndServi [getVolumeForSample] [sdl_sound.c:1042] getVolumeForSample: sample->gain: 36, gainByType: 30, res: 30
2021-07-04 18:20:05.070 DEBUG SndServi [setMusicVolume] [sdl_sound.c:518] setMusicVolume to 30 (musicVol=30, ducking=100)
2021-07-04 18:20:05.085 DEBUG isr de [stbInterrupt] [pincom.c:157] stb int. address 7 0x07
2021-07-04 18:20:05.085 DEBUG SndServi [playCommand] [sdl_sound.c:1362] playCommand: 'PLAY Map.mp4'
2021-07-04 18:20:05.085 DEBUG SndServi [processCmd] [sdl_sound.c:1334] processing cmd PLAY Map.mp4
2021-07-04 18:20:05.085 ERROR SndServi [lua_run] [lua_binding.c:670] lua error: [string "PLAY Map.mp4"]: syntax error near 'Map'
2021-07-04 18:20:05.085 DEBUG SndServi [playMusicWithFadeInAndPos] [sdl_sound.c:1426] loaded music from '/boot/data/sound/Final/music/1977341863-welcome_jurassic_park/Welcome To Jurassic Park.wav' loop=1
2021-07-04 18:20:05.086 DEBUG SndServi [playMusicWithFadeInAndPos] [sdl_sound.c:1449] Playing Music id=7(0x0007), 'welcome_jurassic_park:0' gain:40, from /boot/data/sound/Final/music/1977341863-welcome_jurassic_park/Welcome To Jurassic Park.wav
2021-07-04 18:20:05.086 DEBUG SndServi [getVolumeForSample] [sdl_sound.c:1042] getVolumeForSample: sample->gain: 40, gainByType: 30, res: 34
2021-07-04 18:20:05.086 DEBUG SndServi [setMusicVolume] [sdl_sound.c:518] setMusicVolume to 34 (musicVol=34, ducking=100)
2021-07-04 18:20:07.818 DEBUG isr de [stbInterrupt] [pincom.c:157] stb int. address 167 0xa7
2021-07-04 18:20:07.818 DEBUG SndServi [getVolumeForSample] [sdl_sound.c:1042] getVolumeForSample: sample->gain: 26, gainByType: 40, res: 30
2021-07-04 18:20:07.818 DEBUG SndServi [playSample] [sdl_sound.c:1597] playing sample 167(0x00a7):0 vol: 26->30 'sfx' 'helicopter_flyby' on channel 0

I can't understand why lua is involved in this, I don't know enough about the inner workings of the sound firmware.
Let's hope steve45 can help here.

#162 2 years ago
Quoted from TazDevl:

Thanks, steve45 and Zigzagzag
I just quickly tested this during lunch break. Switched off LUA and the video is now playing when I start a game. Very happy, thanks a lot!!! I will need to play around with the stuff to better understand it. One more quick question, please:
I saw where in start.sh I can comment out the display of default.jpg or change it to another picture. But is there also the possibility of having the SMS play video(s) upon start (i.e. during attract mode) instead of displaying a picture? And is there an option to loop a video?
Would this thread also be the right place to ask further SMS questions which do not have to do with installing it?

For playing startup video and looping : yes, with the pull requests I have sent to Steve you can do this.

#164 2 years ago
Quoted from TazDevl:

You mean you have sent some SMS extensions to Steve which he may integrate in one of the next releases? Would it be possible for me to manually integrate these in my system (if of course you would be willing to share them). Or did I misunderstood your last statement completely?
Another question that crossed my mind: is it on the roadmap for SMS to support multiple Monitors with individual videos each?

I think you can download "my" version of the file here : https://github.com/sker65/serial-media-srv/raw/7ccc4b7d983202f21530aa6d732583c631fb504a/img-mov-serial.py

1 week later
#171 2 years ago
Quoted from TazDevl:

Zigzagzag: I have not yet had time to do anything with your script except from downloading it. I've got some holiday coming up in 2 weeks and would like to start playing around with it then. I quickly looked into the script but could not figure out the following:
- where do I place the startupmovies or how do I flag movies as startupmovies?
- in order to loop videos, I presume the serial command is "loop" instead of "play"?
- are there any parameters with the "loop" feature (e.g. number of loops)?
- can I specify more than one video with the "loop" feature?
@all:
- what is supposed to be entered in the field "StopCmd" / what do I use it for?
Thanks a lot in advance!

Startupmovies should be placed the same place as other media and have names starting with "startup" - for example startup1.mp4, startuptwo.avi etc.

Loop command only has one parameter - the movie to be looped. It will loop this one movie until another movie is started or a picture is shown.

StopCmd is best left default, when this command is received from the MPU it will stop sounds/music.

#173 2 years ago
Quoted from TazDevl:

Nice, thanks again! Sorry, I am not at the pin at the moment so I hope you don't mind if I ask another question (instead of first trying out for myself):
Is there a way to show a specific video during a game when there are no video events that are being triggered by sounds? I found that Default.jpg is being displayed in that case. I prepared a video clip of Isla Nublar which I really would like to be displayed instead. Or is the only option to use this specific clip as (the only) startup sound?
Sorry, another question just came to mind: what is the Media Server checking (and failing to detect) in order to display Default.jpg ("Install a Media Pack")?

I guess any video with a name starting with "default" (i.e. default1.avi, defaulttwo.mpg) will be played when nothing else goes on.

The "Install a media pack" is just shown when you have nothing else installed/playing.
You can put a black image file called default.jpg for example in the media directory if you want to get rid of it.

You can of course copy the media file and have one file called "default.avi", one called "startup.avi" and one called "islanubar.avi" which are all the same.

1 week later
#176 2 years ago
Quoted from TazDevl:

Zigzagzag
I downloaded your python script, placed it in serial-media-srv. I put videos "Default.mp4" and "Startup.mp4" into /boot/smsdata/data and rebooted. However, no video is playing upon startup.
[quoted image]
[quoted image]
omxplayer plays the videos just fine manually. Would you have any idea what I need to look for?

Can you try with filenames all lowercase -- i.e. default.mp4 etc. ?

#178 2 years ago
Quoted from TazDevl:

Good catch, thanks a lot! I should have remembered that Linux is a little stricter about upper- and lowercase characters. Will keep that in mind next time!

Cool, make sure to post a video of how it looks when you are finished !

1 month later
#182 2 years ago
Quoted from TazDevl:

I now put all the cables inside the pin. I found a flat ribbon HDMI cable on Amazon which is perfect for my needs. I will still need to modify the display power connection (either a USB cable with an angled plug or solder directly to display controller pcb). This is how the mod looks in the pin (protective foil still on display and I still need to come up with a final fixture for the display. Also, I created the videos for a display with another resolution and still need to transcode):
[quoted image]

Cool !

#187 2 years ago
Quoted from TazDevl:

Zigzagzag: my screen has a resolution of 800x480. I created my videos in that format but no matter what I do, I have black bars at the top and bottom of my screen (even if I set the same resolution in dietpi-config. Tried Overscan on and off). What I now found is, that the videos play in the correct size if I give omxplayer the resolution via cmdline:
omxplayer --win 0,0,800,480 /boot/smsdata/data/jp_end_2.mp4
Is it correct that I have to change the following 2 lines in your python script from
config['player']['exec'] = 'omxplayer -b --no-osd'
config['player']['loop'] = 'omxplayer -b --no-osd --loop'
to
config['player']['exec'] = 'omxplayer -win 0,0,800,480 -b --no-osd'
config['player']['loop'] = 'omxplayer -win 0,0,800,480 -b --no-osd --loop'
?
Or is there another, more flexible option?

Sorry, I'm not really familiar with omxplayer regarding resolutions - but I believe your suggestion adding "--loop" should work fine.

#190 2 years ago
Quoted from TazDevl:

Zigzagzag: Apart from the fact that I forgot one "-" in front of the "win" argument in the 2 lines of code above, it does not work when I change above 2 lines in the script (it does work manually).
I looked a little bit further in the script and it seems that the changes you made (I assume it was you?) are the lines that are commented out and the new one I marked with an arrow (-> in this section below? I think that all the parameters are in the "args" variable? But I am not good enough at python coding to understand how that is filled and how I would add "--win 0,0,800,480" as the first argument. Would you be able and willing to help out once more?
def play_movie(name, loop):
global movie_playing, config, log, current_connection
media = Path(name).absolute()
movie_playing = name
if (loop == 0): args = config['player']['exec'].split()
else: args = config['player']['loop'].split()
args.append( media.as_posix() )
log.debug("running: {}".format(args))
-> player = popenAndCall(onProcessExit, 1, name, args, stdin=PIPE, stdout=PIPE, shell=False )
#player = Popen(['omxplayer', '-b', Path(m[id]).absolute().as_posix() ], stdin=PIPE, stdout=PIPE, shell=False )
log.debug( "playing movie {} in process {}".format(name,player.pid))
#player.set_aspect_mode(config['player'].get('aspectMode','stretch'))
#player.stopEvent += lambda : movie_ended()
if current_connection:
current_connection.send("# playing {}\r\n".format(name).encode(charset))

Yeah, I guess these lines will make it go wrong :

if (loop == 0): args = config['player']['exec'].split()
else: args = config['player']['loop'].split()

She "split" command will split (!) the command line using space as a separator.
Since "--win 0,0,800,480" has a space in it it will be split into two : "--win" and "0,0,800,480".
I guess that will create trouble later in the script.

Not sure what would be the best way to solve this, though.

Maybe remove "--win 0,0,800,480" from the variables "loop" and "exec" and use :
args.append("--win 0,0,800,480") after "args.append(media.as_posix())" ?

The best way would be to figure out why you need the "--win 0,0,800,480" in the first place of course.

#195 2 years ago
Quoted from TazDevl:

Zigzagzag: miraculously got some time now...
Long story short: it doesn't work. The log says that the "--win" parameter is an unrecognized option. I had removed it from the variables "loop" and "exec" and changed the script as suggested:
...
args.append(media.as_posix())
args.append("--win 0,0,800,480")
...
No video showing, log says:
2021-09-02 18:26:38,390 INFO player process 631 playing !IGNORE_startup_800x480_4_to_3.mp4Â exited movie_playing
!IGNORE_startup_800x480_4_to_3.mp4
2021-09-02 18:26:38,391 DEBUG running: ['omxplayer', '-b', '--no-osd', '/boot/smsdata/data/default_map_glitched_4_1024x600.mp4', '--win
0,0,800,480']
2021-09-02 18:26:38,400 DEBUG playing movie default_map_glitched_4_1024x600.mp4 in process 645
/usr/bin/omxplayer.bin: unrecognized option '--win 0,0,800,480'
If I use the exact same syntax in the console, it plays fine (proving that the position of the "win" parameter can be ignored):
root@tiltaudio3:/home/pi# omxplayer -b --no-osd /boot/smsdata/data/default_map_glitched_4_1024x600.mp4 --win 0,0,800,480
Video codec omx-h264 width 1024 height 600 profile 100 fps 50.000000
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: [email protected] interlace:0 deinterlace:0 anaglyph:0 par.04 display:0 layer:0 alpha:255 aspectMode:0
have a nice day
root@tiltaudio3:/home/pi#

Weird ... not sure what is going on. What does "which omxplayer" say on the command line ?

#198 2 years ago
Quoted from TazDevl:

Sorry, again..
when logged on with sudo su it says
/usr/bin/omxplayer
When logged on as pi it says
/home/pi/bin/omxplayer

Aha ... so there are 2 versions of omxplayer.
Guess one of them supports the "win" parameter, probably the "/home/pi/bin/omxplayer" one.

Try changing this and see if it helps :

config['player']['exec'] = '/home/pi/bin/omxplayer -b --no-osd'
config['player']['loop'] = '/home/pi/bin/omxplayer -b --no-osd --loop'

#200 2 years ago

Stranger ... maybe you could try compiling omxplayer from source ?

https://github.com/popcornmix/omxplayer

#203 2 years ago
Quoted from TazDevl:

Zigzagzag: I'm afraid I already have a problem at the very first step (I'm logged on as "su")...
root@tiltaudio3:/boot/smsdata/omx# git clone https://github.com/popcornmix/omxplayer.git
bash: git: command not found

Try "sudo apt-get install git" if you want to go this way.
But I'm not really convinced that will do the trick .. since one of your omxplayer binaries obviously can parse the "win" parameter it should be possible to make it work as it is.
Perhaps if you change the order of the parameters in the SMS script ?
Have you tried with a direct path - for both binaries - in the SMS script ?

#205 2 years ago
Quoted from TazDevl:

Slowly but inevitably I am getting very, very confused... both versions are running at the same time??? At least this tells me that the /usr/bin version of omxplayer is the one that has been started from your script, because it has the "--win" parameter...
root@tiltaudio3:/boot/smsdata/omx# ps ax |grep -i omxplayer
636 ? S 0:00 /bin/bash /usr/bin/omxplayer -b --no-osd --loop /boot/smsdata/data/startup_map_glitched_3.1_1024x600.mp4 win 0,0,800,480
649 ? SLl 0:39 /usr/bin/omxplayer.bin -b --no-osd --loop /boot/smsdata/data/startup_map_glitched_3.1_1024x600.mp4 win 0,0,800,480
1092 pts/0 S+ 0:00 grep -i omxplayer

Yes, you can have 2 binaries/programs installed at the same time - at different locations.
But look closely at what you have pasted :

usr/bin/omxplayer.bin -b --no-osd --loop /boot/smsdata/data/startup_map_glitched_3.1_1024x600.mp4 win 0,0,800,480

I believe the 2 dashes ("--") before the "win" parameter are missing here ?

#207 2 years ago
Quoted from TazDevl:

I have to correct myself and just edited my last post accordingly: both versions have the "win" parameter (and are running from the same path)
Indeed, you are correct. Sorry for my very, very stupid oversight. I just corrected that and rebooted the Pi.
root@tiltaudio3:/home/pi# ps ax |grep -i omxplayer
4672 ? S 0:00 /bin/bash /usr/bin/omxplayer -b --no-osd /boot/smsdata/data/default_map_glitched_4_1024x600.mp4 --win 0,0,800,480
4684 ? RL 0:00 /usr/bin/omxplayer.bin -b --no-osd /boot/smsdata/data/default_map_glitched_4_1024x600.mp4 --win 0,0,800,480
4686 pts/0 S+ 0:00 grep -i omxplayer
Although both processes are running again, no videos are being displayed. I added both paths in img-serial-move.py, no difference. I get the same output when I remove the absolute path in the script:
root@tiltaudio3:/home/pi# ps ax |grep -i omxplayer
2040 ? S 0:00 /bin/bash /usr/bin/omxplayer -b --no-osd /boot/smsdata/data/default_logos_2_1024x600.mp4 --win 0,0,800,480
2052 ? R 0:00 /usr/bin/omxplayer.bin -b --no-osd /boot/smsdata/data/default_logos_2_1024x600.mp4 --win 0,0,800,480
Interestingly, the above output with the /usr/bin path is from when I had changed the path for omxplayer in the script to /home/pi/bin (and rebooted the Pi).
By "change the order of the parameter", did you mean change the order of the 2 "args" lines here?
def play_movie(name, loop):
global movie_playing, config, log, current_connection
media = Path(name).absolute()
movie_playing = name
if (loop == 0): args = config['player']['exec'].split()
else: args = config['player']['loop'].split()
-> args.append( media.as_posix() )
-> args.append("--win 0,0,800,480")
log.debug("running: {}".format(args))
player = popenAndCall(onProcessExit, 1, name, args, stdin=PIPE, stdout=PIPE, shell=False )
#player = Popen(['omxplayer', '-b', Path(m[id]).absolute().as_posix() ], stdin=PIPE, stdout=PIPE, shell=False )
log.debug( "playing movie {} in process {}".format(name,player.pid))
#player.set_aspect_mode(config['player'].get('aspectMode','stretch'))
#player.stopEvent += lambda : movie_ended()
if current_connection:
current_connection.send("# playing {}\r\n".format(name).encode(charset))

Yes, that is what I meant - place the "win" args.append before the "media as posix" one.

I must admit it is hard to tell what is going on.
I would expect that it should be possible to use the binary in /home/pi - but then again, if I understand the git page correctly - omxplayer is just a shell script that calls omxplayer.bin.
So it might be that the shell script in /home/pi doesn't reference the omxplayer.bin that (I suppose) is in /home/pi and therefore uses the one in /usr/bin (which presumably is in path).
Hard to say from here ... and I have sold my CFTBL so I can't check how mine behaves/behaved ... :/

1 week later
#212 2 years ago
Quoted from TazDevl:

Zigzagzag: it's running... Out of sheer desperation, I added the "--win" parameter at the beginning of the script. I now see my test video in full screen. However, what I do not understand, the parameter is not listed in the log, can you shed some light on the reason for this?[quoted image][quoted image][quoted image]

No idea, but hey .. if it works, don't worry about it

1 week later
#216 2 years ago
Quoted from hawknole:

I got the single Pi working with help from this thread, Zig & Taz, thanks all.
Taz asked me if I loaded the updated python script from Zig and I thought I did but I looked at the file closer and I did not use the modified python file, however, my video is playing when I expect it. So I am a little unsure what the python modification is intended to do?
Thanks again.

It adds support for :

- playing movies starting with "startup" in the filename on boot, so you don't have a black screen on first attract mode
- "loop" command so attract movies don't stop after single play

2 weeks later
#220 2 years ago
Quoted from hawknole:

Having problems with the video not playing. Oddly, it is working fine when there is no license and not working with the full license applied. I tried two different Pi's and two different TiltAudio boards, all with the same results. In discussions with Steve but looking for a possible solution to force the socket call.
In looking at the logs when the socket call for the playCommand equals 60 then the video plays fine, per below:
2021-10-07 01:35:39.671 DEBUG SndServi [serialSend] [serial.c:119] Sending serial cmd 'PLAY car2.mp4'
2021-10-07 01:35:39.674 DEBUG SndServi [sendSocketCmd] [socketIo.c:60] send cmd via socket: PLAY car2.mp4
However, with the license applied it tries to send to another socket and errors and does not play the video, per below:
2021-10-07 01:06:40.045 DEBUG MHD-sing [serialSend] [serial.c:119] Sending serial cmd 'PLAY snack1.mp4'
2021-10-07 01:06:40.054 ERROR MHD-sing [sendSocketCmd] [socketIo.c:57] send via socket failed
Looking for a way to force the socket call to 60. Any ideas on how I could do this? Any help is greatly appreciated.

Could it be the lua bug biting you ?

https://pinside.com/pinball/forum/topic/new-creature-holo-mod-for-cftbl/page/4#post-6368411

4 months later
#235 2 years ago
Quoted from thiagomax:

i upload a print for raspin.log when i got a line "g [sendSocketCmd] [socketIo.c:57] send via socket failed"
and a print from my directory with the missing serial.log
[quoted image][quoted image]

It seems the serial media server is not running ?

I see you wrote :
sudo start serial-media service

This is the wrong syntax.
Can you try :
service serial-media start

#238 2 years ago
Quoted from thiagomax:

ignore the print of putty, i wrote serial instead Serial
[quoted image]

For the serial media server - did you make the config file : /boot/smsdata/data/serial-media-srv.ini using the config shown here : https://github.com/sker65/serial-media-srv#config-file

Afterwards, did you do this :

6) Create /boot/smsdata/data/serial-media-srv.ini using the content as shown in the readme on the site above but enable the socketport :

socketport=19999

#241 2 years ago

It might be that the serial media server does not read the correct configuration file.

Did you do this part ?

5) In /home/pi/serial-media-srv/start.sh, edit the BASEPATH :

BASEPATH=/boot/smsdata

#243 2 years ago
Quoted from thiagomax:

i did this part too. [quoted image]

And no USB stick in the Pi ?
If you have a USB stick in the Pi it will change basepath and this will not work.

#245 2 years ago
Quoted from thiagomax:

i dont have a usb stick on the pi. my media is under boot/smsdata/data on the sd card.

Ok, then I don't know. I believe the serial media server is not reading the config file.

Could you do :

cd /boot/smsdata
ls -rtaFl

... and post the output here ?
Might be some file permissions.

#247 2 years ago
Quoted from thiagomax:

this is normal ? i got nothing to response the command
[quoted image]

It should be a lowercase L at the end of the command, not the pipe symbol.
Do ctrl-c and try again.

#250 2 years ago

Ok, that looks right. Can you run the same command in the smsdata directory ?

#252 2 years ago
Quoted from thiagomax:

you mean the data directory ? this command is not under smsdata already ? sorry if i'm wrong, i'm a noob on this

Sorry, yes, the /boot/smsdata/data directory

#254 2 years ago

Ok, looks right. Can you do :

ps aux | grep serial

Here the character after "aux" and before "grep" is the vertical pipe character you used last time

#256 2 years ago

Ok, the serial media server is not running it seems.

Try :

service serial-media start

... wait 5 seconds ... then check the output of :

tail /var/log/messages

#259 2 years ago

Maybe this will give some output after "service serial-media start" :

journalctl -u serial-media

#261 2 years ago

Ok, the file /home/pi/serial-media-srv/start.sh cannot be started.
Can you to :

cd /home/pi/serial-media-srv
ls -rtaFl

... and show the output ?

#264 2 years ago

Did you do "chmod 755 start.sh" so it is executable ?
What happens if you type "./start.sh" ?
(Both commands should be run in the /home/pi/serial-media-srv directory)

#266 2 years ago

Check if it is running :

ps aux |grep serial

If it is listed once, that is good - then it is running.
If it is listed more than once, then try rebooting the Pi.
If it is not listed .. show me what this says :

cat start.sh

.. again in the /home/pi/serial-media-srv directory.

#268 2 years ago

The character between "aux" and "grep" should be the pipe sign, not lowercase L.

Does the file "/boot/smsdata/data/serial.log" exist now ?

#272 2 years ago

What have you pasted into your serial-media-srv.ini ?
The sentence it complains about is at the top of the README on https://github.com/sker65/serial-media-srv

In serial-media-srv.ini there should *only* be what you find in the grey box here : https://github.com/sker65/serial-media-srv#config-file
Then you remove the "#" in front of the word "socketport".
It should look like this :

[general]
# just for testing: read comamnds from a test file
# readFrom=input.txt
# uncomment to activate a simple text based socket interface, that accepts the same commands as over serial line
socketport=19999
# change the http port for web ui
httpport=31009
# the serial device
device=/dev/ttyS0
# the baud rate
baud=57600
# timeout in sec for reading the serial port
timeout=10

[player]
# command to use when playing videos
exec=omxplayer -b --no-osd

[viewer]
# command to use when showing images
exec=fim -a -q

#275 2 years ago

Good, it is working, have fun.

#277 2 years ago
Quoted from thiagomax:

I must be missing something, because I have a tiltaudio! image again, test in web UI to send a sound but no video is triggering

I don't know where the TiltAudio image comes from, I never had it on my CFTBL - but then again, there have been new TiltAudio versions released since then.
Perhaps steve45 can chime in here ?

#280 2 years ago
Quoted from thiagomax:

hi man, after several attempts it worked as it should and I'm very happy, but it doesn't work the first time I turn on the machine, after I have to access the web ui, go to the settings tab and just press the restart button, from there it works usually.
I would like to know if there is any way to change this, so that every time I turn on the machine it works, without having to restart every time I want to use it

Great that you got it working !
I have no idea why it doesn't work first time, sorry - never had that problem.
I added some functions for playing an attract movie on boot, but I don't think steve45 has pulled this into the main branch.

8 months later
#283 1 year ago

Maybe it's part of fffmpeg ?
Is that installed ?

#285 1 year ago
Quoted from jlppin:

Thanks ZigZag
ffmpeg is already installed - no joy
Thanks
John

How about libavutil-dev ?

1 week later
#288 1 year ago

Connection to 127.0.0.1:19999 failed : this means that TiltAudio cannot connect to the serial media server.
The serial media server should be listening on port 19999

Have you enabled HDMI as described here : https://pinside.com/pinball/forum/topic/new-creature-holo-mod-for-cftbl/page/3#post-6170514

7) In /boot/config.txt on the SD-card for the Pi, comment out the line DISABLE_HDMI :

# for pi4 disable status at startup
#DISABLE_HDMI=1

Promoted items from Pinside Marketplace and Pinside Shops!
€ 24.50
Playfield - Decals
Pin-Decals
 
$ 259.99
Cabinet - Toppers
Lighted Pinball Mods
 
€ 25.00
Playfield - Toys/Add-ons
PPmods
 
$ 79.99
Cabinet - Armor And Blades
PinGraffix Pinside Shop
 
$ 1,059.00
Flipper Parts
Mircoplayfields
 
$ 109.95
Electronics
PinSound
 
8,000
Machine - For Sale
Portland, ME
$ 49.99
Cabinet - Toppers
Lighted Pinball Mods
 
$ 10.00
Playfield - Toys/Add-ons
UpKick Pinball
 
7,500
Machine - For Sale
Matthews, NC
From: $ 33.00
Gameroom - Decorations
Rocket City Pinball
 
7,800
Machine - For Sale
Anaheim, CA
$ 27.95
$ 549.00
Playfield - Other
Juz PINBALL Mods
 
€ 24.00
Trade
Machine - For Trade
East Rutherford, NJ
$ 12.00
Tools
Nezzy's Pinball Prints
 
$ 69.99
Playfield - Toys/Add-ons
Lighted Pinball Mods
 
$ 15.00
Playfield - Decals
Metal-Mods
 
From: $ 9.99
Eproms
Matt's Basement Arcade
 
€ 99.00
Lighting - Under Cabinet
Watssapen shop
 
$ 5.00
Playfield - Toys/Add-ons
UpKick Pinball
 
$ 69.99
Playfield - Toys/Add-ons
Lighted Pinball Mods
 
$ 45.95
Lighting - Led
Mitchell Lighting
 
From: $ 17.99
Eproms
Matt's Basement Arcade
 
$ 49.99
Playfield - Toys/Add-ons
Lighted Pinball Mods
 
$ 250.00
Lighting - Interactive
Professor Pinball
 
Hey modders!
Your shop name here

You're currently viewing posts by Pinsider Zigzagzag.
Click here to go back to viewing the entire thread.

Reply

Wanna join the discussion? Please sign in to reply to this topic.

Hey there! Welcome to Pinside!

Donate to Pinside

Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


This page was printed from https://pinside.com/pinball/forum/topic/new-creature-holo-mod-for-cftbl?tu=Zigzagzag and we tried optimising it for printing. Some page elements may have been deliberately hidden.

Scan the QR code on the left to jump to the URL this document was printed from.