Script non-preview movie recording of any length
Manuel Ullmann <[email protected]>
| Newsgroups | gmane.comp.multimedia.gphoto.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have a Nikon D5100 DSLR and a few questions.
1. Is the CLI of gphoto2 currently capable of recording arbitrary length
movies?
2. Are boolean config options like movie persistent, after gphoto2 has
closed the connection or is gphoto2 not in control of that?
3. What is expected as values for the matchstring in wait-event like
options?
i. I’m attempting to start internal i.e. non-liveview movie recording
remotely using an external USB mic that is handled by ffmpeg from the
PC. Both recordings should be stopped by a key press on the PC. I’m
currently writing a script for that, but hitting several issues. The
main issue is, that the example on the Wiki just shows fixed length
movie recording, which is useless in my case. I couldn’t grasp a
method for doing this from the manual, so I think, it is
unimplemented.
ii. My very first attempt was to split the example up, doing the example
in two lines:
gphoto2 --set-config movie=1
read -n1 -p 'Press any key to stop recording.'
gphoto2 --set-config movie=0 --capture-event=2s
This yielded no success. The assumption was, that gphoto2 just sets
that action and leaves the camera in there, until another invocation
stops it and triggers the download, but the firmware or gphoto2
reset when the connection is closed. However I have noted, that in
the case of liveview capturing the mirror stays in liveview mode
after gphoto2 dies with its piped command. This might be actually a
bug, since gphoto2 should always retract the mirror, when exiting
capture-movie. Otherwise the firmware is forced to do so for
prevention of sensor damage.
I use the following command for capture-movie, which uses gphoto2
piping to ffmpeg using hardware encoding piping to mpv. Sorry it’s a
bit long…
gphoto2 --capture-movie --stdout | \
ffmpeg \
-vaapi_device /dev/dri/renderD128 \
-i pipe:0 \
-vf 'format=nv12|vaapi,hwupload' \
-c:v h264_vaapi -f matroska - 2>/dev/null | \
mpv -
This gives me live preview with unfortunately still about 6 seconds
latency. When I close mpv, I’ll hear mirror retraction after about a
minute. So I’m not sure, whether this is intended, or whether I
could use something similar for movie recording.
iii. Just out of curiosity, because I couldn’t find anything about them
in the man page. They most likely won’t help in my use case either.
Any help is appreciated,
Manuel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gphoto-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gphoto-user