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

#277 Move video rendering fully to ffmpeg and html #279

Merged
merged 42 commits into from
Dec 24, 2023

Conversation

vicwomg
Copy link
Owner

@vicwomg vicwomg commented Nov 24, 2023

No description provided.

@vicwomg vicwomg added the wip Work in progress label Nov 24, 2023
…raoke.sh launch script, deprecate unused args
…r, handle anonymous singers, add screensaver! No more iphone zoom on inputs
…30. Configurable screensaver timeout with -t
@Deastrom
Copy link

Deastrom commented Dec 3, 2023

doing great work! Got this up and running in wsl2!

The big ah ha moment was firewall related on windows, and port forwarding.

You'll need to open an incoming rule in windows firewall (i went with 8080 for no particular reason)

Then for port forwarding I needed to run a command like this.

netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 connectport=8080 connectaddress=<ip of wsl2 instance>

https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-interface-portproxy

If you get remote video streaming working. This will replace my current setup for home karaoke. 😄

@vicwomg
Copy link
Owner Author

vicwomg commented Dec 4, 2023 via email

@Deastrom
Copy link

Deastrom commented Dec 4, 2023

Gave it a shot, no luck.

I edited my netsh to forward both 5555 and 5556 to my wsl2. Then modified the windows firewall to allow 5555 tcp inbound and 5556 udp inbound.

[2023-12-03 19:27:32] INFO: Song starting: Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]
[2023-12-03 19:27:32] DEBUG: Stream is playing
[2023-12-03 19:27:33] INFO: Song ending: Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]
[2023-12-03 19:27:33] DEBUG: Killing ffmpeg process

logs don't say much. i'm pretty happy to run it from a browser in wsl2 (since it supports gui on windows now). I'm having other ffmpeg errors too. I imagine it's the python and ffmpeg version i'm running

python 3.12.0
ffmpeg version n6.1

here's my pip freeze ouput. if you have a specific version of python you're deving on, let me know. I just wanted to let you know this is great work

annotated-types==0.6.0
attrs==23.1.0
autocommand==2.2.2
Babel==2.9.1
Brotli==1.1.0
certifi==2023.11.17
charset-normalizer==3.3.2
cheroot==10.0.0
CherryPy==18.8.0
click==8.1.7
ffmpeg-python==0.2.0
Flask==2.2.5
Flask-Babel==2.0.0
flask-paginate==2021.10.29
future==0.18.3
h11==0.14.0
idna==3.6
inflect==7.0.0
itsdangerous==2.1.2
jaraco.collections==4.3.0
jaraco.context==4.3.0
jaraco.functools==4.0.0
jaraco.text==3.12.0
Jinja2==3.0.3
MarkupSafe==2.1.3
more-itertools==10.1.0
mutagen==1.47.0
outcome==1.3.0.post0
portend==3.2.0
psutil==5.9.6
pycryptodomex==3.19.0
pydantic==2.5.2
pydantic_core==2.14.5
pypng==0.20220715.0
PySocks==1.7.1
pytz==2023.3.post1
qrcode==7.4.2
requests==2.31.0
selenium==4.15.2
setuptools==69.0.2
sniffio==1.3.0
sortedcontainers==2.4.0
tempora==5.5.0
trio==0.23.1
trio-websocket==0.11.1
typing_extensions==4.8.0
Unidecode==1.3.7
urllib3==2.1.0
websockets==12.0
Werkzeug==3.0.1
wsproto==1.2.0
yt-dlp==2023.11.16
zc.lockfile==3.0.post1

I can create an issue if you like, but since this specific to this branch, i think the PR is an appropriate place

---edit----
console logs on client side are a bit more interesting

(index):134 Object
splash:173 Object
splash:173 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', next_user: 'Ben', …}
(index):134 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', next_user: 'Ben', …}
splash:173 {now_playing: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', now_playing_user: 'Ben', now_playing_command: null, up_next: null, next_user: null, …}
(index):134 {now_playing: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', now_playing_user: 'Ben', now_playing_command: null, up_next: null, next_user: null, …}
gone-rog.:5556/1701653952:1 
        
        
        GET http://gone-rog.:5556/1701653952 net::ERR_CONNECTION_RESET
splash:307 Error while playing video.
splash:308 Event {isTrusted: true, type: 'error', target: source#video-source, currentTarget: source#video-source, eventPhase: 2, …}isTrusted: truebubbles: falsecancelBubble: falsecancelable: truecomposed: falsecurrentTarget: nulldefaultPrevented: falseeventPhase: 0returnValue: truesrcElement: source#video-sourcetarget: source#video-sourcetimeStamp: 51499.60000000149type: "error"[[Prototype]]: Event
(index):134 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: null, next_user: null, …}
splash:173 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: null, next_user: null, …}
splash:173 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', next_user: 'Ben', …}
(index):134 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', next_user: 'Ben', …}
splash:173 {now_playing: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', now_playing_user: 'Ben', now_playing_command: null, up_next: null, next_user: null, …}
splash:200  Uncaught (in promise) DOMException: The play() request was interrupted by a new load request.
(anonymous) @ splash:200
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
k @ jquery-3.3.1.min.js:2
(anonymous) @ jquery-3.3.1.min.js:2
load (async)
send @ jquery-3.3.1.min.js:2
ajax @ jquery-3.3.1.min.js:2
w.<computed> @ jquery-3.3.1.min.js:2
getNowPlaying @ splash:168
(index):134 {now_playing: 'Blink-182 • All The Small Things (CC) 🎤 [Karaoke] [Instrumental Lyrics]', now_playing_user: 'Ben', now_playing_command: null, up_next: null, next_user: null, …}
gone-rog.:5556/1701654041:1 
        
        
        GET http://gone-rog.:5556/1701654041 net::ERR_CONNECTION_RESET
splash:307 Error while playing video.
splash:308 Event {isTrusted: true, type: 'error', target: source#video-source, currentTarget: source#video-source, eventPhase: 2, …}
(index):134 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: null, next_user: null, …}
splash:173 {now_playing: null, now_playing_user: null, now_playing_command: null, up_next: null, next_user: null, …}

@vicwomg
Copy link
Owner Author

vicwomg commented Dec 4, 2023 via email

@Deastrom
Copy link

Deastrom commented Dec 4, 2023

wsl2 is windows subsystem for linux. it's basically a baked in vm for linux things so i don't have to do weird conda things on windows 😛
i'll keep trying previous versions of python see if that helps at all

@vicwomg
Copy link
Owner Author

vicwomg commented Dec 4, 2023 via email

@Deastrom
Copy link

Deastrom commented Dec 4, 2023

That would have been the firewall. Now the linux os i'm using in wsl2 is arch. I wonder if it'd get along better with ubuntu?

Anyway, I could give just native windows a shot.

@vicwomg vicwomg merged commit 5cf0a11 into master Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants