1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

Merge pull request #3 from iroh-eh/installer

added installation script; modified service files
This commit is contained in:
avinash-iroh 2023-09-22 13:12:46 +05:30 committed by GitHub
commit cc8e53d75e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 70 additions and 7 deletions

View file

@ -11,6 +11,16 @@ The Display-Source side allows you to connect external displays to your system a
On the other hand, the Display-Sink side allows you to create wifi-capable external displays yourself. You can use it on your embedded devices or even on full desktops to allow other systems to use your device as external display. On the other hand, the Display-Sink side allows you to create wifi-capable external displays yourself. You can use it on your embedded devices or even on full desktops to allow other systems to use your device as external display.
## Steps to Setup MiracleCast on Ving NUC
In the root of the project directory, run `sudo ./install.sh`
Steps to run:
1. Run `sudo miracle-wifid --log-level trace --log-date-time` in a terminal.
2. Run `sudo miracle-sinkctl -e run-vlc.sh --log-level trace --log-journal-level trace --log-date-time -- set-friendly-name VingMiracle` in a separate terminal.
Now you should be able to cast your Windows 10/11 devices on Ving NUC.
## Requirements ## Requirements
The MiracleCast projects requires the following software to be installed: The MiracleCast projects requires the following software to be installed:

25
install.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
apt install cmake libglib2.0-dev libudev-dev libsystemd-dev libreadline-dev check libtool -y
apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-tools -y
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
make install
cd ..
echo "-- Installing: /root/.miraclecast"
cp res/.miraclecast /root/
echo "-- Installing: /usr/bin/run-vlc.sh"
cp res/run-vlc.sh /usr/bin/
echo "-- Installing: /etc/systemd/system/miracle-wifid.service"
cp systemd/system/miracle-wifid.service /etc/systemd/system/
echo "-- Installing: /etc/systemd/system/miracle-sink.service"
cp systemd/system/miracle-sink.service /etc/systemd/system/

17
res/.miraclecast Normal file
View file

@ -0,0 +1,17 @@
[sinkctl]
external-player=1
#extends.wfd_video_formats=40 00 01 10 0001bdeb 051557ff 00000fff 10 0000 001f 11 0780 0438, 02 10 0001bdeb 155557ff 00000fff 10 0000 001f 11 0780 0438
extends.wfd_audio_codecs=AAC 0000000f 00, AC3 00000007 00
#extends.wfd_display_edid=0001 00ffffffffffff0051f38f50010000000e100104a51d10ff2f0000a057499b2610484f000000010101010101010101010101010101011a36809c70381f403020350025a510000018000000fc00496e7465726e616c204c43440a000000fd003c3c9a9a0e00000000000000000000000000000000000000000000000000000030
extends.wfd_connector_type=05
extends.microsoft_cursor=none
extends.microsoft_rtcp_capability=none
extends.wfd_idr_request_capability=0
extends.microsoft_latency_management_capability=none
extends.microsoft_format_change_capability=none
extends.microsoft_diagnostics_capability=none
extends.intel_friendly_name=miraclecast
extends.intel_sink_manufacturer_name=GNU Linux
extends.intel_sink_model_name=Arch linux
extends.intel_sink_device_URL=http://github.com/albfan/miraclecast
extends.wfd_uibc_capability=none

View file

@ -1,2 +1,4 @@
export DISPLAY=:0 && su -c "cvlc --no-osd --no-video-title-show --network-caching=200 rtp://@:7236" letsving #!/bin/bash
export DISPLAY=:0 && su -c "cvlc --no-osd --no-video-title-show --network-caching=300 rtp://@:7236" letsving
#export DISPLAY=:0 && su -c "cvlc --no-osd --no-video-title-show --network-caching=200 --no-ts-trust-pcr --h264-fps=23 rtp://@:7236" letsving #export DISPLAY=:0 && su -c "cvlc --no-osd --no-video-title-show --network-caching=200 --no-ts-trust-pcr --h264-fps=23 rtp://@:7236" letsving

View file

@ -1,12 +1,12 @@
[Unit] [Unit]
Description=Miraclecast sink on default link Description=Miraclecast sink on default link
Before=network.target Before=network.target
After=miracle-wifid.service Requires=miracle-wifid.service
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/bin/miracle-sinkctl ExecStart=/usr/bin/miracle-sinkctl --log-level debug --log-journal-level debug -- set-friendly-name VingMiracle
Restart=always ExecStopPost=-/usr/bin/systemctl stop miracle-wifid.service
User=root User=root
[Install] [Install]

View file

@ -1,12 +1,21 @@
[Unit] [Unit]
Description=wpa_supplicant with Miracast support Description=wpa_supplicant with Miracast support
Before=network.target Before=network.target
After=dbus.service After=dbus.socket
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/bin/miracle-wifid
Restart=always ExecStartPre=-/usr/bin/systemctl stop ap.service
ExecStartPre=-/usr/bin/systemctl stop NetworkManager.service
ExecStartPre=-/usr/bin/systemctl stop wpa_supplicant.service
ExecStart=/usr/bin/miracle-wifid --log-level debug
ExecStopPost=-/usr/bin/systemctl start wpa_supplicant.service
ExecStopPost=-/usr/bin/systemctl start NetworkManager.service
ExecStopPost=-/usr/bin/systemctl start ap.service
User=root User=root
[Install] [Install]