User Tools

Site Tools


linux:scribble

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:scribble [2021/07/01 07:42] – add Move LVM on LUKS to new HDD styblalinux:scribble [2022/07/06 17:27] (current) – setfont stybla
Line 111: Line 111:
 </code> </code>
  
-===== Exercises ======+==== Exercises =====
  
 [[https://www.codingunit.com/category/programming-algorithms|Programming algorithms at CodingUnit]]. [[https://www.codingunit.com/category/programming-algorithms|Programming algorithms at CodingUnit]].
  
 +===== Change keyboard layout in console =====
 +
 +''loadkeys /usr/share/keymaps/i386/qwerty/us.kmap.gz''
 +
 +Don't forget about ''setfont''
  
 ===== Cisco IOS notes ===== ===== Cisco IOS notes =====
Line 156: Line 161:
 <code> <code>
 # gdb <program> <core-dump> ; # gdb <program> <core-dump> ;
 +</code>
 +
 +===== ffmpeg =====
 +
 +Note that these were scraped from various sites and forums and I take no credit.
 +
 +==== Fix colour profile/convert to BT709 ====
 +
 +BT709(and nothing else) is supported by some TVs. Therefore one has to reencode video with BT709 colour profile. Note that this command can be used to extract(unpack) MKV(Matroska video file), although just I/O without reencoding is faster, and re-encodes audio to ACC 44.1kHz 128kbit bit rate!
 +
 +<code>
 +ffmpeg \
 +    -i input_file.suffix \
 +    -color_primaries 1 \
 +    -color_trc 1 \
 +    -colorspace 1 \
 +    -vf scale=out_color_matrix=bt709 \
 +    -color_primaries bt709 \
 +    -color_trc bt709 \
 +    -colorspace bt709 \
 +    # RE-ENCODE AUDIO TO AAC - unnecessary, can be removed
 +    -acodec aac \
 +    -strict -2 \
 +    -ab 128K \
 +    -ar 44100 \
 +    # Remove metadata - unnecessary, can be removed
 +    -map_metadata -1 \
 +    output_file.suffix
 +</code>
 +
 +==== Convert BT601 to BT709 ====
 +
 +Just in case ...
 +
 +<code>
 +ffmpeg -i input.mp4 -vf "scale=in_color_matrix=bt601:out_color_matrix=bt709" output.mp4
 </code> </code>
  
Line 295: Line 336:
  
 ===== loop-AES ===== ===== loop-AES =====
 +
 +==== Decrypt loopAES encrypted partition =====
 +
 +<code>
 +gpg --decrypt private.gpg | \
 +  cryptsetup loopaesOpen \
 +  /dev/mapper/xxx \
 +  newvolumename \
 +  --key-file=- \
 +  --key-size 128 \
 +  --hash sha256
 +</code>
 +
 +Note that this isn't for ''/etc/fstab''.
  
 ==== Resize encrypted LVM backed partition ===== ==== Resize encrypted LVM backed partition =====
linux/scribble.1625143325.txt.gz · Last modified: 2021/07/01 07:42 by stybla