Last active
January 15, 2020 11:44
-
-
Save micolous/ba93b3833a3957e56377c0c592868a89 to your computer and use it in GitHub Desktop.
Revisions
-
micolous revised this gist
Jan 15, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,8 +18,8 @@ # # If you wonder "what is xrandr?" -- it's a command-line tool for Xorg (graphics/display server) # that lets you adjust display settings. It's a very powerful tool with a lot of options; but # most Linux desktop environments' display settings dialog make it very easy to "just" enable # a second display in mirroring or extending modes. :) # ###### # -
micolous revised this gist
Jan 15, 2020 . 1 changed file with 27 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,43 @@ #!/bin/bash # "Does anyone know how to use xrandr" glitch slides using ffmpeg. #lca2020 # Author: Michael Farrell <[email protected]> # License: BSD-2-Clause or CC-0 (your choice). # ###### # # For linux.conf.au in Gold Coast, Ruan (@xfxf) asked me to make a simple "smoosh / defrag" # slide that would be displayed as a holding slide between talks. I made some others with some # AV team "in-jokes"... :) # # On the third day of the conference (2020-01-15), the video generated by this script was shown # on-screen: https://twitter.com/glasnt/status/1217220463924928513 # # This uses a title slide, "lca2020-xrandr-720p.png", which is displayed normally for 7 seconds, # then "glitches" for 2 seconds, and then returns to normal for 7 seconds. It is intended to be # run in a loop. # # If you wonder "what is xrandr?" -- it's a command-line tool for Xorg (graphics/display server) # that lets you adjust display settings. It's a very powerful tool with a lot of options; but # most Linux desktop environments' display settings dialog are good enough to enable a second # display in mirroring or extending modes. :) # ###### # # Create the "normal" title slide segment from PNG, running for 7 seconds (xrandr-regular-7s.ts) ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 7 \ -codec:v mpeg2video -b:v 5000k xrandr-regular-7s.ts # Create the "glitched" title slide segment from PNG, running for 2 seconds (xrandr-broken-2s.ts) # This adds noise every 1000 bytes of the (video) bitstream: # Docs: https://ffmpeg.org/ffmpeg-bitstream-filters.html#noise ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 2 \ -codec:v mpeg2video -bsf:v noise=1000 -b:v 5000k xrandr-broken-2s.ts # Stitch the files back together, and re-encode (xrandr-partial.ts) # We need to re-encode because the behaviour of glitched bitstream is unpredictable between players. ffmpeg -f concat -safe 0 \ -i <(for f in xrandr-regular-7s.ts xrandr-broken-2s.ts xrandr-regular-7s.ts; do echo "file '$PWD/$f'"; done) \ -b:v 5000k xrandr-partial.ts # That file was called "partial" because my first version of this was _entirely_ glitched. # But that was just unreadable. :) -
micolous revised this gist
Jan 14, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 7 \ -codec:v mpeg2video -b:v 5000k xrandr-regular-7s.ts # Create the "glitched" title slide segment from PNG, running for 2 seconds # This adds noise every 1000 bytes of the (video) bitstream: # Docs: https://ffmpeg.org/ffmpeg-bitstream-filters.html#noise ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 2 \ -codec:v mpeg2video -bsf:v noise=1000 -b:v 5000k xrandr-broken-2s.ts -
micolous revised this gist
Jan 14, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,8 @@ ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 7 \ -codec:v mpeg2video -b:v 5000k xrandr-regular-7s.ts # Create the "glitched" title slide segment from PNG, running for 2 seconds # This adds noise every 1000 bytes of the bitstream: # Docs: https://ffmpeg.org/ffmpeg-bitstream-filters.html#noise ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 2 \ -codec:v mpeg2video -bsf:v noise=1000 -b:v 5000k xrandr-broken-2s.ts -
micolous revised this gist
Jan 14, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,16 +4,16 @@ # License: BSD-2-Clause or CC-0 (your choice). # # Create the "normal" title slide segment from PNG, running for 7 seconds ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 7 \ -codec:v mpeg2video -b:v 5000k xrandr-regular-7s.ts # Create the "glitched" title slide segment from PNG, running for 2 seconds # This adds noise every 1000 bytes of the bitstream. ffmpeg -loop 1 -i lca2020-xrandr-720p.png -t 2 \ -codec:v mpeg2video -bsf:v noise=1000 -b:v 5000k xrandr-broken-2s.ts # Stitch the files back together, and re-encode. # We need to re-encode because the behaviour of glitched bitstream is unpredictable between players. ffmpeg -f concat -safe 0 \ -i <(for f in xrandr-regular-7s.ts xrandr-broken-2s.ts xrandr-regular-7s.ts; do echo "file '$PWD/$f'"; done) \ -b:v 5000k xrandr-partial.ts -
micolous revised this gist
Jan 14, 2020 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,8 @@ #!/bin/bash # "Does anyone know how to use xrandr" glitch slides using FFMPEG. #lca2020 # Author: Michael Farrell <[email protected]> # License: BSD-2-Clause or CC-0 (your choice). # # Create the "normal" title slide segment from PNG, running for 7 seconds ffmpeg -y -loop 1 -i lca2020-xrandr-720p.png -t 7 \ -codec:v mpeg2video -b:v 5000k xrandr-regular-7s.ts -
micolous created this gist
Jan 14, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash # Create the "normal" title slide segment from PNG, running for 7 seconds ffmpeg -y -loop 1 -i lca2020-xrandr-720p.png -t 7 \ -codec:v mpeg2video -b:v 5000k xrandr-regular-7s.ts # Create the "glitched" title slide segment from PNG, running for 2 seconds # This adds noise every 1000 bytes of the bitstream. ffmpeg -y -loop 1 -i lca2020-xrandr-720p.png -t 2 \ -codec:v mpeg2video -bsf:v noise=1000 -b:v 5000k xrandr-broken-2s.ts # Stitch the files back together, and re-encode. # We need to re-encode because the behaviour of glitched bitstream is unpredictable between players. ffmpeg -y -f concat -safe 0 \ -i <(for f in xrandr-regular-7s.ts xrandr-broken-2s.ts xrandr-regular-7s.ts; do echo "file '$PWD/$f'"; done) \ -b:v 5000k xrandr-partial.ts