html_menu

Friday, May 29, 2015

How to make rar archive from files inside many folders and then delete original folders.

How to make rar archive from files inside many folders and then delete original folders (but be sure that you have enough free space on disk):
@echo off
set path="C:\Program Files\WinRAR\";%path%

for /D %%f in ("*") do (
         rar  m -m5 -ep1 -r -v4000M "%%~nxf.rar" "%%f/*"
         rem rd /q /s "%%f"
         rem echo "delete %%f"
) 

And improved version, offer choice at beginning to not run file by mistake and mess up your data:
@echo off

set path="C:\Program Files\WinRAR\";%path%

set /P c=Are you sure you want to continue[Y/N]?
if /I "%c%" EQU "Y" goto :action
if /I "%c%" EQU "N" goto :exit
goto :choice

:action
for /D %%f in ("*") do (
   rar  m -m5 -ep1 -r -v4000M "%%~nxf.rar" "%%f/*"
   rd /q /s "%%f"
   echo "delete %%f"
)
exit 

:exit
exit

Wednesday, May 27, 2015

youtube-dl

youtube-dl --autonumber-size 3 --ignore-errors -o "%(title)s.%(ext)s" --yes-playlist PLAYLIST

youtube-dl --autonumber-size 3 -o "%(autonumber)s -- %(title)s.%(ext)s" --yes-playlist PLAYLIST

youtube-dl --autonumber-size 3 -o "%(autonumber)s -- %(title)s -- %(upload_date)s.%(ext)s" --yes-playlist --playlist-reverse PLAYLIST

-F to query video formats
-f to choose quality from -F (also can be "best" or "worst")

youtube-dl readme

_________________________________________
# FLV, AAC audio
ffmpeg -i in.flv -q 1 -map a out.mp3
# Apply max noclip gain
mp3gain -r -k -m 10 out.mp3

# FLV, MP3 audio
ffmpeg -i in.flv -c copy -map a out.mp3

# MP3 file
ffmpeg -i in.mp3 -c copy -map a out.mp3

# WAV source
ffmpeg -i in.wav -b:a 320k out.mp3

# Flac source
ffmpeg -i in.flac -b:a 320k out.mp3
_________________________________________

ffmpeg -i filename.mp4 filename.mp3
ffmpeg -i video.mp4 -b:a 192K -vn music.mp3