kilko.de/feed/til
- Importing CSV data into SQLite
Creating a table from CSV data is very straightforward.
sqlite3 file.sqlite sqlite> .mode csv sqlite> .import data.csv tablename sqlite> .exitThat's it.
- Youtube RSS Feeds
Any channel can be subscribed to via RSS by using the following URL format:
https://www.youtube.com/feeds/videos.xml?channel_id=CHANNEL_IDThe easiest way to get this is to just let your RSS Reader subscribe to the channel's main URL, it will usually figure out the feed location.
The default feed includes all videos however, this includes live videos and shorts, there's a few different playlist feeds that can be used to filter these out, instead of using the
channel_idparameter, use theplaylist_idparameter like so:https://www.youtube.com/feeds/videos.xml?playlist_id=PLAYLIST_IDThe playlist ID is the same as the channel ID (which includes the
UCprefix), but with a different prefix:- All videos:
UU+ rest of channel ID - Standard videos:
UULF+ rest of channel ID - Shorts:
UUSH+ rest of channel ID - Livestreams:
UULV+ rest of channel ID
For example, the feed URL for stuffmadehere's channel would be transformed like this to get only standard videos:
https://www.youtube.com/feeds/videos.xml?channel_id=UCj1VqrHhDte54oLgPG4xpuQ -> https://www.youtube.com/feeds/videos.xml?playlist_id=UULFj1VqrHhDte54oLgPG4xpuQKudos to github.com/FreshRSS/Extensions/issues/234#issuecomment-2738509387
- All videos:
- Change video container
Quickly change a file's container using magic shell syntax.
ffmpeg -i path/to/file.{webm, mp4} - Concatenate videos
Concating several video files with ffmpeg is very straightforward if they all share the same container and codec. Add all input files to a text file listing their relative or absolute paths.
file 'file1.mp4' file 'file2.mp4' ...Run the following.
$ ffmpeg -f concat -safe 0 -i input.txt -c copy output.mp4-safe 0can be omitted if the filepaths are relative. - Create video from image and audio
Technically something simple along the following lines would work.
ffmpeg -i image.png -i audio.mp3 video.mp4This does however create a file with just a single frame, which doesn't really work on YouTube for example. The following creates a video with repeating frames.
ffmpeg -r 1 -loop 1 -i image.png -i audio.mp3 -acodec copy -shortest -vf scale=1280:720 video.mp4Credits go to superuser.com/a/1041820/236423
- Keep subtitles while transcoding
To keep all existent subtitle tracks when transcoding media with ffmpeg, just pass the flag
-map 0:s -c copy, e.g.$ ffmpeg -i /path/to/media.{mkv,mp4} -map 0:s -c copy - Rotate videos
Rotate videos using ffmpeg by transposing them. The command to do so is:
$ ffmpeg -i input.mp4 -vf "transpose=1" output.mp4The possible rotations are the following.
0 = 90CounterCLockwise and Vertical Flip (default) 1 = 90Clockwise 2 = 90CounterClockwise 3 = 90Clockwise and Vertical FlipUse
-vf "transpose=2,transpose=2"for 180 degrees.Credits go to stackoverflow.com/a/9570992/1843020
- Simulating a scan
Fake a printed, hand-signed and scanned document using imagemagick. Beat the bureucracy.
$ convert input.pdf -colorspace gray \( +clone -blur 0x0.1 \) +swap -compose divide -composite -linear-stretch 5%x0% -rotate 0.5 scan.pdfDocumentation on using
-blurcan be found here.Credits go to tex.stackexchange.com/a/94541