Outils du site

() Il se dessine de façon tangible, dans votre génération qui monte, mon camarade, une espèce d'ambition glacée d'arriver par le fric et un mépris cynique de tous les idéaux assez peu compatible avec l'idée qu'on se fait de la jeunesse éternelle génératrice de fougues irréfléchies et de colères gratuites. [Pierre Desproges]

04-linux:92-tips-tricks

Ceci est une ancienne révision du document !


Tips & tricks

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 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> //**

Convert all flac to mp3

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

Dernière modification : 2017/10/06 23:38