Tweak: add ability to disable audio recording
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
parent
fac77631c0
commit
b3decb8cc5
2 changed files with 6 additions and 3 deletions
|
@ -10,7 +10,8 @@ Mostly made for PostmarketOS phones
|
|||
- `DOWNSCALE_VIDEO` = `640` - Int, maximum image dimension in video mode (0 to disable downscale)
|
||||
- `DOWNSCALE_PHOTO` = `0` - Int, maximum image dimension in photo mode (0 to disable downscale)
|
||||
- `VIDEO_ENCODE` = `x264enc tune=zerolatency speed-preset=ultrafast bitrate=8192` - String, video encode pipeline
|
||||
|
||||
- `AUDIO_ENABLED` = `true` - Bool, is audio record enabled (`false` to disable)
|
||||
- `AUDIO_PROFILE` = `audio/x-ac3` - String - audio encoding
|
||||
## Project TODO:
|
||||
- [ ] Fix cam/mode switching? (I can't reproduce errors)
|
||||
- [ ] Simplify customization
|
||||
|
|
|
@ -141,9 +141,11 @@ public class EyeNeko.Gstreamer : Object {
|
|||
private void add_enc_profile () {
|
||||
var cp = new Gst.PbUtils.EncodingContainerProfile (null, null, Gst.Caps.from_string ("video/quicktime"), null);
|
||||
var vp = new Gst.PbUtils.EncodingVideoProfile (Gst.Caps.from_string ("video/x-h264"), null, null, 0);
|
||||
var ap = new Gst.PbUtils.EncodingAudioProfile (Gst.Caps.from_string ("audio/x-ac3"), null, null, 0);
|
||||
if (bool.parse (Env.get_variable_or ("AUDIO_ENABLED", "true"))) {
|
||||
var ap = new Gst.PbUtils.EncodingAudioProfile (Gst.Caps.from_string (Env.get_variable_or ("AUDIO_PROFILE", "audio/x-ac3")), null, null, 0);
|
||||
cp.add_profile (ap);
|
||||
}
|
||||
cp.add_profile (vp);
|
||||
cp.add_profile (ap);
|
||||
camerabin.set_property ("video-profile", cp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue