Skip to content

Instantly share code, notes, and snippets.

@ArneAnka
Last active May 25, 2020 10:05
Show Gist options
  • Select an option

  • Save ArneAnka/29edc60a5f286404de40bdf352a3eaf3 to your computer and use it in GitHub Desktop.

Select an option

Save ArneAnka/29edc60a5f286404de40bdf352a3eaf3 to your computer and use it in GitHub Desktop.
1. youtube-dl -a lista.txt
2. for f in *.mp4; do ffmpeg -i "$f" -vn "$(basename "$f" .mp4).mp3"; done
(2. ffmpeg -i input.mp4 -f mp3 -ab 192000 -vn output.mp3)
3. ffmpeg -i output.mp3 -af "highpass=f=200, lowpass=f=3000" output_clean.mp3
4. ffmpeg -i output_clean.mp3 -af silenceremove=1:0:-50dB output_stripped.mp3
@ArneAnka
Copy link
Copy Markdown
Author

ArneAnka commented May 6, 2020

final??

for f in *.mp4; do ffmpeg -i "$f" -af "highpass=f=200, lowpass=f=3000, silenceremove=1:0:-50dB" \
-vn "$(basename "$f" .mp4).mp3"; done && ffmpeg-normalize *.mp3 -c:a libmp3lame -b:a 192k -ext mp3

@ArneAnka
Copy link
Copy Markdown
Author

ArneAnka commented May 7, 2020

Final version!

for f in *.mp4; do ffmpeg -i "$f" \
-af "silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-40dB,highpass=f=200,lowpass=f=3000,loudnorm" \
-codec:a libmp3lame -q:a 5 -vn "$(basename "$f" .mp4).mp3"; done

For reference I found this reddit thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment