Throw in a file to change the frame rate
@echo off<br>set /p file=Which file you want to make mono?<br>set /p fps=Number of frame per second?<br>rem ffmpeg -i %file%.mp4 -map_channel 0.1.0 -c:v copy %file%_mono.mp4<br>ffmpeg -i %1.mp4 -filter:v fps=fps=%fps% %file%low_fps.mp4
Convert to mono (throw in the file) and then change frame rate
@echo off<br>rem set /p file=Which file you want to make mono?<br>set /p fps=Number of frame per second?<br>ffmpeg -i %1 -map_channel 0.1.0 -c:v copy %1_mono.mp4<br>ffmpeg -i %1_mono.mp4 -filter:v fps=fps=%fps% %file%low_fps.mp4<br>pause
Get mp3 from video mp4 or avi etc.
ffmpeg -i sample.avi -q:a 0 -map a sample.mp3
How to make it with python
import os
from tkinter import filedialog
filename = filedialog.askopenfilename()
command = f"ffmpeg -i {filename} -q:a 0 -map a sample.mp3"
os.system(command)
Convert wav to mp3
import os
list_of_commands = [
" -i dina.wav", # input file
" -vn ", # disable video if any in the file
"-ar 44100", # wav audio sampling frequency
" -ac 2", # audio channels
" -b:a 192k", # quality of mp3, converts audio bit rate to 192kbs
" output.mp3" # output file
]
command = "ffmpeg" + " ".join(list_of_commands)
os.system(command)
Convert a single mp3 to wav
ffmpeg -i click.mp3 -acodec pcm_s16le -ac 1 -ar 16000 click.wav
List of devices
This script prints all the audio and video devices name you have on your computer. Useful when you want to record audio or video with ffmpeg, for example.