Outils du site

Qu'est-ce que le premier janvier, sinon le jour honni entre tous où des brassés d'imbéciles joviaux se jettent sur leur téléphone pour vous rappeler l'inexorable progression de votre compte à rebours avant le départ vers le Père Lachaise. Cet hiver, afin de m'épargner au maximum les assauts grotesques de ces enthousiasmes hypocrites, jai modifié légèrement le message de mon répondeur téléphonique. Au lieu de dire \"Bonjour à tous\", jai mis \"Bonne anne mon cul\". C'est net, c'est sobre, et ça vole suffisamment bas pour que les grossiers trouvent ca vulgaire. [Pierre Desproges]

04-linux:92-tips-tricks

Ceci est une ancienne révision du document !


Tips & tricks

ISO to USB Key


#liste des devices
blkid

# indispensable de demonter le clé USB
sudo umount /dev/sdd

dd if=image.iso of=/dev/sdx bs=4M status=progress && sync

Recherche recursive

find . -name “*mkv”

ou

ls -R | grep '.*mkv'

Convert all flac to mp3

for f in *.flac; do flac -cd “$f” | lame -b 128 - “${f%.*}”.mp3; done

Convert mkv to mp4

ffmpeg -i LostInTranslation.mkv -vcodec copy -acodec copy LostInTranslation.mp4

The same in a loop:

for i in *mkv; do ffmpeg -i $i -vcodec copy -acodec copy $i.mp4; done

youtube download

sudo apt install youtube-dl

Download mp3 only

youtube-dl --ignore-config -o '~/Music/%(uploader)s - %(title)s.%(ext)s' --extract-audio --audio-format mp3 --audio-quality 5 **// <youtube code or URL> //**

Download vidéo

Config file: .config/youtube-dl/config

# Lines starting with # are comments

-x          # Always extract audio
-k          # Keep the video file on disk after the post- processing; the video is erased by default
--no-mtime  # Do not copy the mtime

# Do not download the DASH manifests and related data on YouTube videos
--youtube-skip-dash-manifest

# Save all videos under Movies directory in your home directory
-o '~/Videos/%(uploader)s - %(title)s.%(ext)s'

#--audio-format mp3

# Specify ffmpeg/avconv audio quality, insert a value between 0 (better) and 9 (worse) for VBR or a specific bitrate like 128K (default 5)
--audio-quality 5

# Download best mp4 format available or any other best if no mp4 available
# -f 'bestuploadervideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'
# Download best format available but not better that 480p
# -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'
# Download best video only format but no bigger than 50 MB
# -f 'best[filesize<50M]'
# Download best format available via direct link over HTTP/HTTPS protocol
# -f '(bestvideo+bestaudio/best)[protocol^=http]'
# Download the best video format and the best audio format without merging them
#-f 'bestvideo,bestaudio'

-f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]'
--merge-output-format mp4

# Bypass geographic restriction via faking X-Forwarded-For HTTP header (experimental)
--geo-bypass   

Using the preceding config :

youtube-dl <youtube code or URL>

Without using a config file :

youtube-dl --ignore-config -x -k --no-mtime --youtube-skip-dash-manifest -o '~/Videos/%(uploader)s - %(title)s.%(ext)s' --audio-quality 5 -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' --merge-output-format mp4 --geo-bypass **// <youtube code or URL> //**

Dernière modification : 2021/01/31 12:27