You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Convert video format
ffmpeg -i input.mp4 output.webm
# Extract audio from video
ffmpeg -i video.mp4 -vn audio.mp3
# Create video thumbnail
ffmpeg -i video.mp4 -ss 00:00:05 -frames:v 1 thumb.jpg
# Resize video
ffmpeg -i input.mp4 -vf scale=1280:720 output.mp4
# Convert audio format
ffmpeg -i input.wav output.mp3
# Audio effects with sox
sox input.wav output.wav reverse
sox input.wav output.wav trim 0 30 # First 30 seconds
PDF Processing
# PDF to text
pdftotext document.pdf output.txt
# PDF to images (one per page)
pdftoppm -png document.pdf output
# Compress PDF
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -o compressed.pdf input.pdf
# Rotate PDF pages
qpdf --rotate=90:1-5 input.pdf output.pdf
frompdf2imageimportconvert_from_path# Convert PDF to imagesimages=convert_from_path('document.pdf')
fori, imginenumerate(images):
img.save(f'page_{i}.png')
Python Image Processing
fromPILimportImageimportcv2# Resize with Pillowimg=Image.open('input.png')
img.thumbnail((800, 600))
img.save('output.jpg')
# OpenCV - read and processimg=cv2.imread('input.png')
gray=cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imwrite('gray.png', gray)