Raspberry Pi: Wireless Display/Screen Mirroring

Lars Kiesow
Lars Kiesow
154.6 هزار بار بازدید - 10 سال پیش - Fore a detailed guide on
Fore a detailed guide on what I did, have a look at:
https://weblog.lkiesow.de/20160215-ra...

This video shows how to use a Raspberry Pi as wireless display adapter. It's something like AirPlay or Miracast, just a bit more flexible. Additional, it is easy to directly capture the display to create screen recordings.

Update:
I played with it a bit more and if its only about screen mirrowing and you don't also want to capture the screen I would now use the following commands:

 ffmpeg -re -f x11grab -s 1352x1080 -i :0.0+0,0 \
   -c:v mpeg4 -b:v 800k -g 4 -f mpegts -bf 0 \
   udp://192.168.172.183:8888

…which grabs my X desktop environment and sends it to the Raspberry Pi. On the Pi I would then run:

 omxplayer -g -b --live 'udp://0.0.0.0:8888'


If you also want to capture the screen you can still run something like

PC:

 ffmpeg -f x11grab -s 1920x1080 -r 25 -i :0.0+0,0 \
   -c:v mpeg4 -g 4 -f mpegts -bf 0 \
   tcp://192.168.172.183:8888

RPi:

 ffmpeg -loglevel quiet -i 'tcp://0.0.0.0:8888?listen' \
   -c copy -f mpegts out.ts \
   -c copy -f mpegts 'udp://localhost:8888'

 omxplayer -g -b --live 'udp://0.0.0.0:8888'

That is what I used in this video. The difference is that I send the video stream of my desktop via TCP, accept it using FFmpeg and dump the stream to a file as well as resending it locally to the omxplayer for presentation.

I also recommend to limit the maximub bandwith (e.g. -b:v 800k) and prevent the encoder from using B frames (-bf 0) to get less delay.
10 سال پیش در تاریخ 1393/01/19 منتشر شده است.
154,622 بـار بازدید شده
... بیشتر