0

so i know how to create a nice smpte bars with tones using sine

bin\ffmpeg -hide_banner -loglevel 0 -f lavfi -i "smptebars=duration=%duration%:size=1280x720:rate=60000/1001" -f lavfi -i "sine=frequency=1000:sample_rate=48000:duration=%duration%" -vf drawtext="fontfile=/Windows/Fonts/arial.ttf:\ timecode='00\:00\:00\:00':rate=60000/1001:fontsize=64:fontcolor='white':\ boxcolor=0x00000088:box=1:boxborderw=5:x=20:y=20" -c:v libx264 -b:v 6000k -c:a aac -b:a 128k -y "%video%"

I googled and could not find how ffmpeg can create DTMF tones, but i did find this article

https://www.epanorama.net/documents/telecom/dtmf_generation.html

sine seems to take the following inputs:

  1. frequency
  2. sample_rate
  3. duration

it does not take into consideration the "number"

so DTMF tone for "1", you use 697 Hz signal and 1209

so you add the 697 and 1209 or create two audio files and mix them? what is the best method? and do we need to use the audio codec as aac or sine all we need?

EDIT: wanted to add what i am using, and it sounds right but def looking for some expert advice here

bin\ffmpeg -hide_banner -loglevel 0 -f lavfi -i "smptebars=duration=%duration%:size=1280x720:rate=60000/1001" -f lavfi -i "sine=frequency=%frequency1%:sample_rate=48000:duration=%duration%" -f lavfi -i "sine=frequency=%frequency2%:sample_rate=48000:duration=%duration%" -filter_complex amerge -vf drawtext="fontfile=/Windows/Fonts/arial.ttf:\ timecode='00\:00\:00\:00':rate=60000/1001:fontsize=64:fontcolor='white':\ boxcolor=0x00000088:box=1:boxborderw=5:x=20:y=20" -c:v libx264 -b:v 6000k -c:a aac -b:a 128k -y "%video%"

FULL Batch File Code can be seen here, as it is long https://pastebin.com/psXtFF7J

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.