02-23-2020, 09:47 PM
(This post was last modified: 03-11-2020, 07:11 AM by mpnordland.
Edit Reason: Fixed wrong v4l-utils package name
)
Up for a crude, barely functional method for taking photos with your PinePhone?
Of course you are. You wouldn't have one otherwise.
It's not too hard either. Credit to the postmarketOS wiki as it had the hard part.
You will need to install the mpv and v4l-utils packages.
Press 's' at any time to take a photo. Press 'q' to exit.
I recommend making this into a script and copying it to your SD card so you can avoid typing it in by hand.
Troubleshooting
The pmOS wiki states that the entity name is "ov5640 2-003c". I found that not to work.
If you get a message stating "Invalid argument (22)" then you may have the wrong entity name. Fortunately, you can get it like this:
There should be two entities listed, one a source and the other a sink. You want the entity name for the sink. It will look like the ones mentioned above.
Of course you are. You wouldn't have one otherwise.
It's not too hard either. Credit to the postmarketOS wiki as it had the hard part.
You will need to install the mpv and v4l-utils packages.
Code:
media-ctl -d /dev/media1 --set-v4l2 '"ov5640 3-004c":0[fmt:UYVY8_2X8/1280x720]'
mpv av://v4l2:/dev/video1
Press 's' at any time to take a photo. Press 'q' to exit.
I recommend making this into a script and copying it to your SD card so you can avoid typing it in by hand.
Troubleshooting
The pmOS wiki states that the entity name is "ov5640 2-003c". I found that not to work.
If you get a message stating "Invalid argument (22)" then you may have the wrong entity name. Fortunately, you can get it like this:
Code:
media-ctl -d /dev/media1 -p
There should be two entities listed, one a source and the other a sink. You want the entity name for the sink. It will look like the ones mentioned above.