Media

OCR

tesseract

sudo apt install tesseract-ocr
sudo apt install tesseract-ocr-fra
sudo apt install tesseract-ocr-ita
sudo apt install tesseract-ocr-frk      # allemand
sudo apt install imagemagick

# generate result.txt
tesseract test.jpg result -l ita 

# generate result.txt, using english + italian
tesseract test.jpg result -l eng+ita 

# Assume a single uniform block of text
tesseract MullerWritersP1.jpg result --psm 6

for i in $(ls *.jpg); do tesseract $i $i --psm 6; done;
tesseract MullerWritersP1.jpg result --psm 6

gocr

gocr -i test.jpg -o test.txt

for i in $(ls *.pbm); do gocr -i $i -o ${i/.pbm/.txt}; done;

ffmpeg

Conversion
sudo apt install ffmpeg

ffmpeg -i myfile.webm myfile.mp4
ffmpeg -i myfile.mp4 -vn -acodec libmp3lame -ab 128k myfile.mp3
ffmpeg -i myfile.webm -vn -acodec libmp3lame -ab 128k myfile.mp3
ffmpeg -i myfile.flv -vn -acodec libmp3lame -ab 128k myfile.mp3

# convert all .mp4 to .mp3 (without deleting .mp4) ; do not treat subdirectories
for file in $(ls -l | grep -v ^d); do file2=$(echo $file | sed -e 's/\..*$//'); ffmpeg -i $file2.mp4 -vn -acodec libmp3lame -ab 128k $file2.mp3; done
for file in $(ls -I mp3 -I mp4); do file2=$(echo $file | sed -e 's/\..*$//'); ffmpeg -i $file2.mp4 -vn -acodec libmp3lame -ab 128k $file2.mp3; done

yt-dlp

(previously youtube-dl)
# see https://forums.linuxmint.com/viewtopic.php?t=441348
wget `curl https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest | jq -r '.assets[].browser_download_url' | grep 'yt-dlp$'` && chmod +x yt-dlp
Update to last version:
rm yt-dlp and run the previous command
-i, --ignore-errors
      Ignore download and postprocessing errors.  The download will be considered successful even if the postprocessing fails
-f, --format FORMAT
      Video format code, see "FORMAT SELECTION" for more details
Download video
yt-dlp <video URL>
yt-dlp https://vimeo.com/411316540 --video-password <my_password>
Download and convert to mp4
yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' <video URL>
# smallest size
yt-dlp -S '+size,+br' <video URL>
# specify quality
yt-dlp -f "bestvideo[height<=360]+bestaudio/best[height<=360]" --merge-output-format mp4 <video URL>
yt-dlp -f "bestvideo[height<=480]+bestaudio/best[height<=480]" --merge-output-format mp4 <video URL>
Download and convert to mp3
yt-dlp --extract-audio --audio-format mp3 <video URL>
yt-dlp --extract-audio --audio-format mp3 --audio-quality 0 <video URL>             # --audio-quality between 0 (best) and 10 (worst)

# download whole playlist
yt-dlp -i -f mp4 --yes-playlist 'https://www.youtube.com/watch?v=7Vy8970q0Xc&list=PLwJ2VKmefmxpUJEGB1ff6yUZ5Zd7Gegn2'
# Alternatively, you can just use the playlist ID:
yt-dlp -i --yes-playlist PLx5f8IelFRgGuSn4L90j3taAGSzyfw-U1

# batch
# <file containing list of urls> is a file where urls are listed, one url per line
# Lines starting with "#", ";" or "]" are considered as comments and ignored
yt-dlp --batch-file=<file containing list of urls>

--prefer-ffmpeg