Help:Scripting

From DFM Wiki
Revision as of 11:47, 22 February 2021 by EricThrift (talk | contribs) (Created page with "These are command-line scripts for advanced processing of DFM documents. == Converting a PDF to a set of images == This is mainly useful for extracting images from a PDF slid...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

These are command-line scripts for advanced processing of DFM documents.

Converting a PDF to a set of images

This is mainly useful for extracting images from a PDF slideshow submitted as a PDF, to be reused in other contexts (e.g., bulk insertion of slides into a workshop report).

convert -verbose -density 300 -trim DFM_PRS_slideshow.pdf -flatten -sharpen 0x1.0 slide-%d.png 

Normalizing Zoom recordings for editing or concatenation

Zoom recordings may have different resolutions/screen dimensions and bitrates, depending on the computer settings of whoever is making the recording. To edit or concatenate recordings, re-encode as follows:

ffmpeg -ss 00:00:29 -i <input>.mp4 -t 36:35.0 -avoid_negative_ts 1 -ac 1 -b:a 192k -ar 44100 -vf pad=width=1600:height=900:color=black <output>.mp4

In the above, use -ss HH:MM:ss for the start time, and -t HH:MM:ss for the duration if you want to trim the start and end of the recording.