Håvard Ose Nordstrand 3 years ago
parent
commit
24c2df060c

+ 33 - 0
config/media/video-processing.md

@@ -0,0 +1,33 @@
+---
+title: Video Processing
+breadcrumbs:
+- title: Configuration
+- title: Media
+---
+{% include header.md %}
+
+## FFmpeg
+
+For general notes and streaming video notes, see the [Video Streaming](../video-streaming/) page.
+
+### Tasks
+
+#### Concatenate Video Files
+
+Useful e.g. to recombine video files for recorders which automatically splits the recording.
+
+1. `ffmpeg -f concat -safe 0 -i <(for f in ./*.MP4; do echo "file '$PWD/$f'"; done) -c copy output.MP4`
+    - For lexicographically sorted files ending in `.MP4`.
+
+#### Speed Up/Slow Down Video, but Keep All Frames
+
+Useful e.g. to change the framerate of a video-only timelapse video.
+
+See: [Speeding up/slowing down video (FFmpeg)](https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video)
+
+1. Convert to raw bitstream:
+    - H.264: `ffmpeg -i input.mp4 -map 0:v -c:v copy -bsf:v h264_mp4toannexb raw.h264`
+    - H.265: `ffmpeg -i input.mp4 -map 0:v -c:v copy -bsf:v hevc_mp4toannexb raw.h265`
+1. Generate new video: `ffmpeg -fflags +genpts -r <fps> -i raw.h264 -c:v copy output.mp4` (for desired frame rate `fps`)
+
+{% include footer.md %}

+ 1 - 1
config/media/ripping.md → config/media/video-ripping.md

@@ -1,5 +1,5 @@
 ---
-title: Media Ripping
+title: Video Ripping
 breadcrumbs:
 - title: Configuration
 - title: Media

+ 1 - 1
config/media/streaming.md → config/media/video-streaming.md

@@ -122,7 +122,7 @@ breadcrumbs:
 - [steven2358's FFmpeg cheat sheet](https://gist.github.com/steven2358/ba153c642fe2bb1e47485962df07c730)
 - **TODO** Find my other FFmpeg notes.
 - Record stream to file, automatically split every X seconds, restart if the stream is unavailable:
-    - Script: `while true; do ffmpeg -hide_banner -loglevel error -i http://localhost:5555/ -c copy -map 0 -f segment -segment_time $((5*60)) -segment_format mp4 -strftime 1 "%Y-%m-%d_%H-%M-%S.mp4"; sleep 5; done`
+    - Script: `while true; do ffmpeg -hide_banner -loglevel error -i http://localhost:5555/ -c copy -map 0 -f segment -segment_time $((5*60)) -segment_format mp4 -strftime 1 "%Y-%m-%d_%H-%M-%S.mp4"; sleep 1; done`
 - Record time lapse at 10x speed without audio:
     - Command: `ffmpeg -i http://localhost:5555/ -filter:v "setpts=0.1*PTS" -an out.mkv`
 

+ 8 - 2
config/network/juniper-junos-switches.md

@@ -131,17 +131,22 @@ breadcrumbs:
 
 ## Virtual Chassis
 
+(Although other series also support some form of virtual chassis, this section is targetet at EX switches.)
+
+### Info
+
 - Virtual Chassis (VC) is a simple way of connecting multiple close or distant switches into a ring topology and managing them as a single logical device. It simplifies loop prevention (otherwise using STP) and improves fault tolerance.
 - Roles: A VC has one switch as master routing engine, one switch as backup routing engine and the remaining switches as linecards.
-- Mastership election: The master is elected based on (in order) highest mastership priority, which member was master last time, which switch has been a member the longest, and which member has the lowest MAC address. When using a preprovisioned config, the mastership priority is automatically assigned based on the selected role.
+- Primary-role election: The master is elected based on (in order) highest mastership priority, which member was master last time, which switch has been a member the longest, and which member has the lowest MAC address. When using a preprovisioned config, the mastership priority is automatically assigned based on the selected role.
 - LEDs: The "MST" LED will be solid green on the master, blinking green on the backup and off on the linecards.
 - Alarms: Alarms for a specific device will only show on the master and the actual device.
 - FPCs: Each switch will show as separate FPCs (Flexible PIC (Physical Interface Cards) Concentrators).
+- Split-and-merge: In case the VC gets partitioned, having all partitions elect a new master while running the same configuration would cause logical resource conflicts and inconsistencies in the network. The split and merge is a quorum-like mechanism where only the "largest" (according to certain specific rules) partition continues to function and the other partitions become inactive (all their switches aquire the line-card role). A VC partition becomes active if it contains both the stable (pre-split) primary and backup; if it contains the stable backup and at least half the VC size; or if it contains the stable primary and more than half the VC size. This "merge" part of the feature allows the partitions to merge back together when the partitioning is resolved (if the configurations adhere to certain specific rules). For VCs of size two where both switches would become inactive if a partition were to happen (since none of the rules are satisfied), use `no-split-detection` to disable split-and-merge such that both switches may become primaries (although, one would likely be dead and avoid causing inconsistencies).
 
 ### Best Practices
 
 - Always zeroize before merging.
-- Use no-split-detection if using exactly two devices.
+- Use `no-split-detection` if using exactly two devices.
 - When removing a device, recycle its old ID in the VC.
 - If not preprovisioning the VC, explicitly set the mastership priority to 255 for the devices which should be routing engines.
 - Enable synchronized commit to ensure commits are always applied to all members.
@@ -158,6 +163,7 @@ breadcrumbs:
     - Show: `show virtual-chassis vc-port`
     - Remove: `request virtual-chassis vc-port delete pic-slot <pic-slot> port <port-number>`
 - Change assigned member ID: `request virtual-chassis renumber`
+- Recycle an old member ID: `request virtual-chassis recycle`
 
 ### Setup
 

+ 1 - 0
config/pc/applications.md

@@ -119,6 +119,7 @@ Note: Since Steam requires 32-bit (i386) variants of certain NVIDIA packages, an
 
 - See [Steam (Flatpak)](https://flathub.org/apps/details/com.valvesoftware.Steam).
 - This doesn't require the dumb i386 NVIDIA driver packages.
+- As long as [ValveSoftware/steam-for-linux #7847](https://github.com/ValveSoftware/steam-for-linux/issues/7847) isn't fixed, make sure to _not_ enable "remember my password". If you do and it crashes on the next start, run `flatpak run com.valvesoftware.Steam --reset` (if using Flatpak) to reset the user config and then lanuch it normally afterward.
 
 ### Miscellanea
 

+ 3 - 2
index.md

@@ -59,8 +59,9 @@ Random collection of config notes and miscellaneous stuff. _Technically not a wi
 
 ### Media
 
-- [Media Ripping](/config/media/ripping/)
-- [Video Streaming](/config/media/streaming/)
+- [Video Processing](/config/media/video-processing/)
+- [Video Ripping](/config/media/video-ripping/)
+- [Video Streaming](/config/media/video-streaming/)
 
 ### Network