docs.daveops.net

Snippets for yer computer needs

Multimedia

FFmpeg

Encode a video from WAV and PNG

ffmpeg -loop 1 -r 2 -i input.png -i audio.ogg -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p output.mkv

Convert MOV to GIF

ffmpeg -i file.mov -pix_fmt rgb24 output.gif

Do a screencast

ffmpeg -f x11grab -r 25 -s 1280x800 -i :0.0 /tmp/outputFile.mpg

Extract audio from a video file

ffmpeg -i video.mp4 -vn -acodec copy audio.aac

Multimedia

Radio stations

mencoder

Join multiple videos

cat movie1.avi movie2.avi > movie.avi
mencoder -forceidx -oac copy -ovc copy movie.avi -o movie_fixed.avi

Get specific time

Use -ss to seek to a specific part of the file you want.

-ss 00:30:00 -endpos 00:00:05

Get codecs

# audio codecs
mencoder -oac help
# video codecs
mencoder -ovc help

Subtitles

-sub FILE
-subdelay

mplayer

Speed up playback

mplayer -speed 1.2 [file]

Watch movies in a terminal

mplayer -vo caca movie.avi

Play a CD

mplayer cdda:// -cache 5000

Open a DVD menu

mplayer dvdnav://

VLC

Subtitles

# Add a subtitle file
--sub-file FILE # Change the subtitle delay
--sub-delay # Integer is in tenths of a second

Transcoding

# only transcode a few seconds (for testing)
--stop-time SECONDS

Netflix

Secret category

Action & Adventure 1365
Action Comedies 43040
Action Sci-Fi & Fantasy 1568
Action Thrillers 43048
Adult Animation 11881
Adventures 7442
African Movies 3761
Alien Sci-Fi 3327
Animal Tales 5507
Anime Action 2653
Anime Comedies 9302
Anime Dramas 452
Anime Fantasy 11146
Anime Features 3063
Anime Horror 10695
Anime Sci-Fi 2729
Anime Series 6721
Anime 7424
Art House Movies 29764
Asian Action Movies 77232
Australian Movies 5230
Baseball Movies 12339
Basketball Movies 12762
Belgian Movies 262
B-Horror Movies 8195
Biographical Documentaries 3652
Biographical Dramas 3179
Boxing Movies 12443
British Movies 10757
British TV Shows 52117
Campy Movies 1252
Children & Family Movies 783
Chinese Movies 3960
Classic Action & Adventure 46576
Classic Comedies 31694
Classic Dramas 29809
Classic Foreign Movies 32473
Classic Movies 31574
Classic Musicals 32392
Classic Romantic Movies 31273
Classic Sci-Fi & Fantasy 47147
Classic Thrillers 46588
Classic TV Shows 46553
Classic War Movies 48744
Classic Westerns 47465
Comedies 6548
Comic Book and Superhero Movies 10118
Country & Western/Folk 1105
Courtroom Dramas 528582748
Creature Features 6895
Crime Action & Adventure 9584
Crime Documentaries 9875
Crime Dramas 6889
Crime Thrillers 10499
Crime TV Shows 26146
Cult Comedies 9434
Cult Horror Movies 10944
Cult Movies 7627
Cult Sci-Fi & Fantasy 4734
Cult TV Shows 74652
Dark Comedies 869
Deep Sea Horror Movies 45028
Disney Musicals 59433
Disney 67673
Documentaries 6839
Dramas based on Books 4961
Dramas based on real life 3653
Dramas 5763
Dutch Movies 10606
Eastern European Movies 5254
Education for Kids 10659
Epics 52858
Experimental Movies 11079
Faith & Spirituality Movies 52804
Faith & Spirituality 26835
Family Features 51056
Fantasy Movies 9744
Film Noir 7687
Food & Travel TV 72436
Football Movies 12803
Foreign Action & Adventure 11828
Foreign Comedies 4426
Foreign Documentaries 5161
Foreign Dramas 2150
Foreign Gay & Lesbian Movies 8243
Foreign Horror Movies 8654
Foreign Movies 7462
Foreign Sci-Fi & Fantasy 6485
Foreign Thrillers 10306
French Movies 58807
Gangster Movies 31851
Gay & Lesbian Dramas 500
German Movies 58886
Greek Movies 61115
Historical Documentaries 5349
Horror Comedy 89585
Horror Movies 8711
Independent Action & Adventure 11804
Independent Comedies 4195
Independent Dramas 384
Independent Movies 7077
Independent Thrillers 3269
Indian Movies 10463
Irish Movies 58750
Italian Movies 8221
Japanese Movies 10398
Jazz & Easy Listening 10271
Kids Faith & Spirituality 751423
Kids Music 52843
Kids’ TV 27346
Korean Movies 5685
Korean TV Shows 67879
Late Night Comedies 1402
Latin American Movies 1613
Latin Music 10741
Martial Arts Movies 8985
Martial Arts, Boxing & Wrestling 6695
Middle Eastern Movies 5875
Military Action & Adventure 2125
Military Documentaries 4006
Military Dramas 11
Military TV Shows 25804
Miniseries 4814
Mockumentaries 26
Monster Movies 947
Movies based on children’s books 10056
Movies for ages 0 to 2 6796
Movies for ages 11 to 12 6962
Movies for ages 2 to 4 6218
Movies for ages 5 to 7 5455
Movies for ages 8 to 10 561
Music & Concert Documentaries 90361
Music 1701
Musicals 13335
Mysteries 9994
New Zealand Movies 63782
Period Pieces 12123
Political Comedies 2700
Political Documentaries 7018
Political Dramas 6616
Political Thrillers 10504
Psychological Thrillers 5505
Quirky Romance 36103
Reality TV 9833
Religious Documentaries 10005
Rock & Pop Concerts 3278
Romantic Comedies 5475
Romantic Dramas 1255
Romantic Favorites 502675
Romantic Foreign Movies 7153
Romantic Independent Movies 9916
Romantic Movies 8883
Russian 11567
Satanic Stories 6998
Satires 4922
Scandinavian Movies 9292
Science & Nature Documentaries 2595
Science & Nature TV 52780
Sci-Fi & Fantasy 1492
Sci-Fi Adventure 6926
Sci-Fi Dramas 3916
Sci-Fi Horror Movies 1694
Sci-Fi Thrillers 11014
Screwball Comedies 9702
Showbiz Dramas 5012
Showbiz Musicals 13573
Silent Movies 53310
Slapstick Comedies 10256
Slasher and Serial Killer Movies 8646
Soccer Movies 12549
Social & Cultural Documentaries 3675
Social Issue Dramas 3947
Southeast Asian Movies 9196
Spanish Movies 58741
Spiritual Documentaries 2760
Sports & Fitness 9327
Sports Comedies 5286
Sports Documentaries 180
Sports Dramas 7243
Sports Movies 4370
Spy Action & Adventure 10702
Spy Thrillers 9147
Stage Musicals 55774
Stand-up Comedy 11559
Steamy Romantic Movies 35800
Steamy Thrillers 972
Supernatural Horror Movies 42023
Supernatural Thrillers 11140
Tearjerkers 6384
Teen Comedies 3519
Teen Dramas 9299
Teen Screams 52147
Teen TV Shows 60951
Thrillers 8933
Travel & Adventure Documentaries 1159
TV Action & Adventure 10673
TV Cartoons 11177
TV Comedies 10375
TV Documentaries 10105
TV Dramas 11714
TV Horror 83059
TV Mysteries 4366
TV Sci-Fi & Fantasy 1372
TV Shows 83
Urban & Dance Concerts 9472
Vampire Horror Movies 75804
Werewolf Horror Movies 75930
Westerns 7700
World Music Concerts 2856
Zombie Horror Movies 75405