homeworkc / lazycast

A Simple Wireless Display Receiver
GNU General Public License v3.0
689 stars 89 forks source link

how to use without desktop / directFB #6

Closed kiai72 closed 5 years ago

kiai72 commented 5 years ago

can we mod the script somehow to make it work on raspbian without desktop ? it should work on a console-only OS. For example it could call omxplayer.

homeworkc commented 5 years ago

It should be possible. Player 1 and player 2 directly control the GPU and should be able to work on a console-only OS. What part does not work on a console-only environment?

kiai72 commented 5 years ago

i just don't see anything! player1 throws a lot of error messages. player2 does not show any error - but both do not show anything (i always see the text console).

player0: i changed "vlc" to "cvlc -Idummy" -> this at least works a bit. But looks like vlc has some permissions problems and that why it only shows "console graphics" instead of real graphics. i'm not sure, but this might be a common problem with vlc.

i'd like to switch to omxplayer - but it does not work. OMX just says "have a nice day" - as if if could not read the stream.

tested on retropie 4.4 stretch - what's based on raspbian stretch 4.4,.

homeworkc commented 5 years ago

The reason that omxplayer shows that message is that it does not recognize (or rather, detect) the audio stream. To solve this, select player 1 in d2.py and try to play any sound to the miracast sink while launch the omxplayer with omxplayer -b rtp://0.0.0.0:1028/wfd1.0/streamid=0 --live. Alternatively, it is possible to tell omxplayer to just ignore the audio stream but I cannot remember the command off the top of my head.

homeworkc commented 5 years ago

Stream without audio stream: omxplayer -b rtp://0.0.0.0:1028/wfd1.0/streamid=0 -n -1 --live

kiai72 commented 5 years ago

hello, this works! i use player1. as soon the player1 starts (printing a lot of messages) i start omxplayer on tty2. so sound comes from player1 - and graphics from omxplayer right ?.

It's a start, thank you very much! but can we improve this ? using 2 players isn't good for perfmance and syncronisation between audio and graphics, right ? (by the way: running that omxplayer manually isn't to comfortable either)

kiai72 commented 5 years ago

i noticed something funny: i don't even need omxplayer! just use player1 - wait until it starts writing all these messages. Then switch to another tty for example by CTRL+ALT+F2 - wait a few seconds -> video starts (with sound). can we do this programmatically somehow ? (chvt does not work)

homeworkc commented 5 years ago

I tried the minimal Raspbian this week and I had these findings: The reason that the players don't work is that they need an additional package called libavformat-dev. After installing this package the players should work. Note that the keyboard/mouse remote inputs do not work on Direct FB systems since the current implementation uses x window.