As pointed out at the beginning I'm using a USB2.0 frame grabber for capturing the live image from my FPV camera.
I'm using 'mplayer' for the start, but target is to have an HUD display as overlay in the video window.
To simplify starting of mplayer I made a shell script (.sh) and a desktop file (.desktop) for calling it.
In the folder with you qgroubndcontrol_aq executable, make a right click and create a new empty file. This will be our script file, holding all commands needed for starting 'mplayer' in the desired mode.
Note: a shell script needs to have the extension .sh
For my example it is 'start_capture.sh'
The contents of the file is quite a simple command:
- Code: Select all
mplayer tv:// -tv device=/dev/video0
This let's mplayer think we want to display tv (video) from our frame grabber. When you connect your frame grabber to your system a device 'video0' will be created.
Save the file when you're done! This is just the starting version; more complex settings to follow!
Don't forget to make this script exectuable
- Code: Select all
sudo chmod +x /[path to script]/start_capture.sh
This will now be called from the desktop. Simply make a new .desktop file 'LiveFeed.desktop'
- Code: Select all
[Desktop Entry]
Name=LiveFeed
Comment=Start image capturing
Icon=/home/pi/QGC_V1_7Beta/shark_logo.png
Exec=/home/pi/QGC_V1_7Beta/start_capture.sh
Type=Application
Terminal=false
Categories=None;
Note: Refer to the one for starting QGC; pretty simple stuff isn't it?
If you want to open a terminal window when you run a shell script (i.e. an input is needed or just to see the output) set Terminal=true
'/home/pi/QGC_V1_7Beta' is the name of the folder were I stored the shell script file and the shark logo. Changed this to fit your needs!

- 2016-04-05-112024_169x357_scrot.png (17.29 KiB) Viewed 3131 times
You can use your custom logo; be sure to use one with transparency for a neat look

(note the name

)