This file contains 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 characters
# create hardsubs for a video from a SRT file using FFMPEG | |
# https://stackoverflow.com/a/21369850/1887369 | |
ffmpeg -i video.mp4 -vf "subtitles=subs.srt:force_style='Fontname=Times New Roman,Fontsize=24,PrimaryColour=&H0000ff&'" output.mp4 | |
## to take only a section of the video: | |
ffmpeg -ss 00:02:00 -copyts -i video.mkv -ss 00:02:00 -vf "subtitles=subs.srt:force_style='Fontsize=24,Fontname=Times New Roman'" -to 00:02:30 cut.mp4 | |
# convert the pixel format using the format filter | |
# https://stackoverflow.com/a/54196619/1887369 |
This file contains 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 characters
# Reduce the size of a PDF file | |
# https://askubuntu.com/a/256449/112818 | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output_reduced.pdf input.pdf | |
# Convert a PDF to grayscale colour | |
# https://superuser.com/a/164857/989263 | |
gs \ | |
-sOutputFile=output_gray.pdf \ | |
-sDEVICE=pdfwrite \ | |
-sColorConversionStrategy=Gray \ |
OlderNewer