2023-12-15 00:50:58 +00:00
|
|
|
# TROUBLESHOOTING:
|
|
|
|
# - turn the tv off and on again (no, really...)
|
|
|
|
#
|
2023-12-15 03:22:03 +00:00
|
|
|
# SANITY CHECKS:
|
2023-12-15 00:50:58 +00:00
|
|
|
# - `go2tv -u 'https://uninsane.org/share/AmenBreak.mp4'`
|
2024-01-04 16:22:33 +00:00
|
|
|
# - LGTV: works, but not seekable
|
2023-12-15 00:50:58 +00:00
|
|
|
# - `go2tv -u 'https://youtu.be/p3G5IXn0K7A'`
|
|
|
|
# - LGTV: FAILS ("this file cannot be recognized")
|
|
|
|
# - no fix via transcoding, altering the URI, etc.
|
2024-01-04 16:26:25 +00:00
|
|
|
# - workable if you use an invidious frontend, but you lose seeking.
|
|
|
|
# - e.g. `go2tv -u 'https://inv.us.projectsegfau.lt/latest_version?id=qBzjHU_zEwM&itag=18'`
|
|
|
|
# - e.g. `go2tv -tc -u 'https://yt.artemislena.eu/latest_version?id=qBzjHU_zEwM&itag=22'`
|
|
|
|
# - sometimes transcoding is needed, sometimes not...
|
2024-02-06 05:48:11 +00:00
|
|
|
# - `go2tv -v /mnt/servo/media/Videos/Shows/bebop/session1.mkv`
|
2023-12-15 03:22:03 +00:00
|
|
|
# - LGTV: works
|
2024-02-06 05:48:11 +00:00
|
|
|
# - `go2tv -tc -v /mnt/servo/media/Videos/Shows/bebop/session1.mkv`
|
2023-12-15 03:22:03 +00:00
|
|
|
# - LGTV: works
|
|
|
|
#
|
|
|
|
# WHEN TO TRANSCODE:
|
|
|
|
# - mkv container + mpeg-2 video + AC-3/48k stereo audio:
|
|
|
|
# - LGTV: no transcoding needed
|
|
|
|
# - mkv container + H.264 video + AAC/48k 5.1 audio:
|
|
|
|
# - LGTV: no transcoding needed
|
|
|
|
# - mp4 container + H.264 video + MP3/48k stereo audio:
|
|
|
|
# - LGTV: no transcoding needed
|
|
|
|
# - mp4 container + H.264 video + AAC/44k1 stereo audio:
|
|
|
|
# - LGTV: no transcoding needed
|
|
|
|
# - mkv container + H.265 video + E-AC-3/48k stereo audio:
|
|
|
|
# - LGTV: no transcoding needed
|
2023-12-15 00:50:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.sane.programs.go2tv;
|
|
|
|
in
|
|
|
|
{
|
2024-01-27 15:31:08 +00:00
|
|
|
sane.programs.go2tv = {
|
|
|
|
sandbox.method = "bwrap";
|
2024-02-08 21:51:32 +00:00
|
|
|
sandbox.net = "clearnet";
|
2024-01-27 17:19:48 +00:00
|
|
|
sandbox.autodetectCliPaths = true;
|
2024-01-27 15:31:08 +00:00
|
|
|
# for GUI invocation, allow the common media directories
|
|
|
|
sandbox.extraHomePaths = [
|
|
|
|
"Music"
|
2024-02-27 21:36:18 +00:00
|
|
|
"Videos/local"
|
2024-02-12 12:54:16 +00:00
|
|
|
"Videos/servo"
|
2024-01-27 15:31:08 +00:00
|
|
|
];
|
|
|
|
sandbox.extraPaths = [
|
2024-02-06 05:48:11 +00:00
|
|
|
"/mnt/servo/media/Music"
|
2024-01-27 15:31:08 +00:00
|
|
|
];
|
|
|
|
};
|
2023-12-15 00:50:58 +00:00
|
|
|
# for serving local files
|
|
|
|
# see: go2tv/soapcalls/utils/iptools.go
|
2024-01-22 03:50:04 +00:00
|
|
|
# go2tv tries port 3500, and then walks up from there port-by-port until it finds a free one.
|
|
|
|
# it tries 1000 ports, but hopefully we won't need so many.
|
|
|
|
networking.firewall.allowedTCPPorts = lib.mkIf cfg.enabled (lib.range 3500 3519);
|
2023-12-15 00:50:58 +00:00
|
|
|
}
|