Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| FUCKIN PUSSIES | |
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
13:16 <luite> | hello | |
13:16 <ChongLi> | somebody has a mental illness! | |
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| compelled to write Node.js! | |
13:16 <genisage> | hi | |
13:16 <luite> | you might be pleased to learn that you can compile | |
| haskell to javascript now |
#!/bin/bash | |
# | |
# Created by djazz // Dangershy | |
# Dependencies: feh | |
# | |
FOLDER="~/Pictures/wallpapers" | |
DELAY=10 | |
# to make it loop over lines instead of spaces in filenames |
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
Set the buffer size (-bufsize:v
) equal to the target bitrate (-b:v
). You want to ensure that you're encoding in CBR mode.
Set up the encoders as shown:
(source: https://sites.google.com/site/rsync2u/home/rsync-tutorial/how-rsync-works3)
~/demo1$rsync is efficient. The first time rsync is run, destination is created and the full source is copied to destination. Thereafter, only changes in source are copied to destination. If the --link-dest option is used, unchanged files are hard linked to the previous backup.
A hard link is a pointer to a file. Hard links have the advantage of using very little memory. There is an illustrated explanation of hard links on http://blog.interlinked.org/tutorials/rsync_time_machine.html > scroll down to “Hard-Links”.
Here is how the "rsync --link-dest=DIR" algorithm creates files in destination:
if destination does not exists,
ffmpeg -i in.mkv -f srt -i in.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s srt out.mkv |
# Math | |
<Multi_key> <A> <A> : "∀" | |
<Multi_key> <E> <E> : "∃" | |
<Multi_key> <exclam> <E> <E> : "∄" | |
<Multi_key> <minus> <0> : "−" | |
<Multi_key> <KP_Subtract> <KP_0> : "−" | |
<Multi_key> <asterisk> <1> : "⋅" | |
<Multi_key> <KP_Multiply> <KP_1> : "⋅" |
template <int MAXV, class T = int> struct Dinic { | |
const static bool SCALING = false; // non-scaling = V^2E, Scaling=VElog(U) with higher constant | |
int lim = 1; | |
const T INF = numeric_limits<T>::max(); | |
struct edge { | |
int to, rev; | |
T cap, flow; | |
}; | |
int s = MAXV - 2, t = MAXV - 1; |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;