mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 05:32:13 +01:00
ffmpeg combine, add sqlite3
This commit is contained in:
parent
32802c2907
commit
9a23458a2d
2 changed files with 25 additions and 2 deletions
|
@ -4,13 +4,16 @@ ffmpeg -i path/to/file.ext
|
|||
# Convert all m4a files to mp3
|
||||
for f in *.m4a; do ffmpeg -i "$f" -acodec libmp3lame -vn -b:a 320k "${f%.m4a}.mp3"; done
|
||||
|
||||
# Convert video
|
||||
# Convert video from .foo to .bar
|
||||
# -g : GOP, for searchability
|
||||
ffmpeg -i input.ext -vcodec vp9 -acodec libopus -b:v 21000k -b:a 320k -g 150 -threads 4 output.ext
|
||||
ffmpeg -i input.foo -vcodec bar -acodec baz -b:v 21000k -b:a 320k -g 150 -threads 4 output.bar
|
||||
|
||||
# Convert image sequence to video
|
||||
ffmpeg -r 18 -pattern_type glob -i '*.png' -b:v 21000k -s hd1080 -vcodec vp9 -an -pix_fmt yuv420p -deinterlace output.ext
|
||||
|
||||
# Combine video and audio into one file
|
||||
ffmpeg -i video.ext -i audio.ext -c:v copy -c:a copy output.ext
|
||||
|
||||
# Listen to 10 seconds of audio from a video file
|
||||
#
|
||||
# -ss : start time
|
||||
|
|
20
cheat/cheatsheets/sqlite3
Normal file
20
cheat/cheatsheets/sqlite3
Normal file
|
@ -0,0 +1,20 @@
|
|||
# create database and launch interactive shell
|
||||
sqlite3 example.db
|
||||
|
||||
# create table
|
||||
sqlite3 example.db "CREATE TABLE Os(ID INTEGER PRIMARY KEY, Name TEXT, Year INTEGER);"
|
||||
|
||||
# insert data
|
||||
sqlite3 example.db "INSERT INTO 'Os' VALUES(1,'Linux',1991);"
|
||||
|
||||
# list tables
|
||||
sqlite3 example.db ".tables"
|
||||
|
||||
# view records in table
|
||||
sqlite3 example.db "SELECT * FROM 'Os';"
|
||||
|
||||
# view records in table conditionally
|
||||
sqlite example.db "SELECT * FROM 'Os' WHERE Year='1991';"
|
||||
|
||||
# view records with fuzzy matching
|
||||
sqlite3 ~/example.db "SELECT * FROM 'Os' WHERE Year like '19%';"
|
Loading…
Reference in a new issue