Last active
May 25, 2020 10:05
-
-
Save ArneAnka/29edc60a5f286404de40bdf352a3eaf3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. youtube-dl -a lista.txt // Download all lectures with youtube-dl from file `lista.txt` | |
2. for f in *.mp4; do ffmpeg -i "$f" -vn "$(basename "$f" .mp4).mp3"; done // convert all mp4 to mp3 | |
3. for f in *.mp3; do ffmpeg -i "$f" -af "highpass=f=200, lowpass=f=3000" "$(basename "$f" .mp3)_noice.mp3"; done | |
4. for f in *_noice.mp3; do ffmpeg -i "$f" -af silenceremove=1:0:-50dB "$(basename "$f" .mp3)_silence.mp3"; done | |
5. ffmpeg-normalize *.mp3 -c:a libmp3lame -b:a 192k -ext mp3 (https://superuser.com/a/323127/643639, https://stackoverflow.com/a/58997035/4892914) | |
6. ???? | |
7. PROFIT | |
(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) // reduce noice (https://superuser.com/questions/733061/reduce-background-noise-and-optimize-the-speech-from-an-audio-clip-using-ffmpeg) | |
(4. ffmpeg -i output_clean.mp3 -af silenceremove=1:0:-50dB output_stripped.mp3) // remove silent bits from the mp3 |
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
final??