This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Xserver and Pulseaudio * Add temp folder * Add warp-client to ´temp´ folder * Add warp binary * Add xserver and pulseaudio * Fix xserver installation * add sysbox installation script * Added dbus xvfb and pulseaudio services * Fix symlinking * Fix dbus, xserver and pulseudio startup errors * Run as user * Fix build errors for user 'admin' * test ffmpeg * Add ffmpeg v6 manually * Fix ffmpeg version * Fix ffmpeg * Fix pulseaudio * Fix default.pa * Add non-root user * Add user-group docker * Start everything in its own service * fix xvfb.service * Fix ffmpeg.sh not running, stuck on Xserver socket * Fix No.2 for ffmpeg * Add `ExecStartPre`, might work * debug * debug 2 * debug 3 * debug 3 * ffmpeg fix * Added a fix to sudo * debug 5 * Remove the dbus service * Add a FIXME for future me
- Loading branch information
1 parent
d1e54ab
commit ac49d09
Showing
10 changed files
with
265 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- [x] Xserver, pulseaudio and ffmpeg in base container | ||
- [ ] Add warp client and hook it up to ffmpeg | ||
- [ ] Steam container as a sidecar | ||
- [ ] Input inside base container | ||
- [ ] Launch a test run on AWS: | ||
- [x] Test ffmpeg, xserver and pulseaudio | ||
- [ ] Test warp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=Dbus server | ||
StartLimitIntervalSec=0 | ||
|
||
[Service] | ||
ExecStart=/etc/init.d/dbus start | ||
Restart=always | ||
RestartSec=10 | ||
StandardOutput=syslog | ||
StandardError=syslog | ||
SyslogIdentifier=dbus-server | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# | ||
#FIXME: Remove this file (it is here for refence) then fix this ffmpeg error ``Sep 27 05:27:13 2f07ec1815e1 arc3dia-server[1140]: [mp4 @ 0x56057dc86140] Application provided duration: -1 / timestamp: 2744278 is out of range for mov/mp4 format`` | ||
# i think it is the ``streaming 1`` option. | ||
# | ||
|
||
CMD=( | ||
ffmpeg | ||
-hide_banner | ||
-loglevel error | ||
#screen image size | ||
-s 1920x1080 | ||
#video fps | ||
-r 30 | ||
#grab x11 display | ||
-f x11grab | ||
-i ${DISPLAY} | ||
#capture pulse audio | ||
-f pulse | ||
-re | ||
-i default | ||
-c:v libx264 | ||
-preset veryfast | ||
-tune zerolatency | ||
-profile main | ||
-pix_fmt yuv420p #let us use 4:2:0 for now | ||
#FIXME: add full color 4:4:4 | ||
-c:a aac | ||
-b:a 128k | ||
-ar 44100 | ||
-ac 2 | ||
-map v:0 -s:v:0 1280x720 -b:v:0 3M | ||
#FIXME: add this later | ||
#-map v:0 -s:v:1 854x480 -b:v:1 1.1M | ||
#-map v:0 -s:v:2 640x360 -b:v:2 365k | ||
-map 1:a | ||
-streaming 1 | ||
-movflags empty_moov+frag_every_frame+separate_moof+omit_tfhd_offset | ||
|
||
./playlist.mpd | ||
#Then send this to our remote/local warp-relay server | ||
#- | RUST_LOG=warp=info /usr/bin/warp -i - -u $WARP_SERVER_FULL_URL | ||
) | ||
|
||
exec "${CMD[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Pulseaudio server | ||
After=xserver.service | ||
StartLimitIntervalSec=0 | ||
|
||
[Service] | ||
ExecStart=/usr/bin/pulseaudio --disallow-exit --disallow-module-loading --exit-idle-time=-1 | ||
Restart=always | ||
RestartSec=10 | ||
StandardOutput=syslog | ||
StandardError=syslog | ||
SyslogIdentifier=pulse-server | ||
User=admin | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=X server | ||
StartLimitIntervalSec=0 | ||
|
||
[Service] | ||
ExecStart=/usr/bin/Xvfb :0 -screen 0 8192x4096x24 -dpi 96 | ||
Restart=always | ||
RestartSec=10 | ||
StandardOutput=syslog | ||
StandardError=syslog | ||
SyslogIdentifier=x-server | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
#Make the amd gpu available inside the container | ||
#chmod -R 777 /dev/dri | ||
|
||
# | ||
#This script is for anyone who has trouble installing sybox on their system | ||
# | ||
|
||
#This works with AWS-linux | ||
sudo yum install jq git -y | ||
|
||
#Install docker | ||
sudo amazon-linux-extras install docker -y | ||
sudo service docker start | ||
sudo usermod -a -G docker ec2-user | ||
|
||
#make docker autostart | ||
sudo chkconfig docker on | ||
|
||
#reboot if necessary | ||
sudo reboot | ||
|
||
#clone the sybox repo | ||
git clone --recursive https://github.com/nestybox/sysbox.git | ||
|
||
#run make | ||
cd sysbox && sudo make sysbox-static | ||
|
||
#then install the built packages | ||
sudo make install | ||
|
||
#start the sysbox systemd service | ||
sudo ./scr/sysbox | ||
|
||
#configure docker to use sysbox as a runtime !jq must be installed for this to work | ||
sudo ./scr/docker-cfg --sysbox-runtime=enable | ||
|
||
sudo cat /etc/docker/daemon.json | ||
|
||
# if everything was correcctly installed you should see, otherwise this will be empty | ||
#{ | ||
# "runtimes": { | ||
# "sysbox-runc": { | ||
# "path": "/usr/bin/sysbox-runc" | ||
# } | ||
# } | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is a temporary folder for Warp ubuntu binary... | ||
|
||
It will stay here until [warp](https://github.com/wanjohiryan/warp) gets a release... probably v1 release |