Outils du site

Si un homme ne fait que ce qu'on exige de lui, il est un esclave. S'il en fait plus, il est un homme libre. [Proverbe Chinois]

04-linux:92-tips-tricks

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
04-linux:92-tips-tricks [2017/03/29 23:42] – [youtube download] Roge04-linux:92-tips-tricks [2023/12/16 20:58] (Version actuelle) Roge
Ligne 1: Ligne 1:
 ====== Tips & tricks ====== ====== Tips & tricks ======
 +
 +===== ISO to bootable USB Key =====
 +
 +<code bash>
 +
 +#liste des devices
 +blkid
 +
 +# indispensable de demonter le clé USB
 +sudo umount /dev/sdd
 +
 +sudo dd if=image.iso of=/dev/sdx bs=4M status=progress && sync
 +</code>
 +
 +
 +===== ISO Windows to bootable USB Key =====
 +
 +<code bash>
 +# Install dependancies
 +sudo apt install bash dosfstools findutils grep gawk grub-common grub-pc-bin ntfs-3g p7zip-full parted util-linux wget wimtools
 +
 +
 +# Download WoeUSB
 +https://github.com/WoeUSB/WoeUSB/releases
 +
 +chmod +x woeusb-N.N.N.bash
 +
 +# indispensable de demonter le clé USB
 +sudo umount /dev/sdX
 +
 +sudo ./woeusb-N.N.N.bash --device /path/to/windows.iso /dev/sdX
 +</code>
 +
 +
 +===== 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 ===== ===== Convert mkv to mp4 =====
Ligne 13: Ligne 59:
 ''sudo apt install youtube-dl'' ''sudo apt install youtube-dl''
  
-Download vidéo:+==== Download mp3 only ====
  
-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> //**''+''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''
 +
 +<code bash .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   
 +</code>
 +
 +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> //**%%''
  
-===== 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