0

What are the best options to use to get optimal audio clarity for transcription, and minimal video to be used by the transcription service?

Our videos are all meetings, and we're sending them to a service for transcription services - video quality is of no concern, but audio quality of the speakers is.

Everything I've found is a complicated discussion about channels/tracks/mapping, etc., and frankly everything is about achieving peak video at the same time, so I'm confused about which options work on which tracks, and at this point don't even know what I should be googling.

Clarification The source video can vary, depending on the circumstances of the meeting recorded. It can be an enormous mpeg or a smaller mp4 compressed "somehow". The ffmpeg output VIDEO will be very small, 320:240 or similar, but I need as much of the original AUDIO (improved if possible) as I can get into the output mp4 file for the transcription service to have the best we can provide them.

  • 2
    What sort of input files - MP4s? Share the readout of ffmpeg -i recordingsample. In what format is the output required or preferred? Do you want to filter the audio to improve clarity or simply maintain the source audio - in short, this will be more fruitful if you mention what are the deficiencies with the current workflow, and specifics of what you would like to achieve. – Gyan Feb 19 at 17:26
  • @Gyan Input files vary from producer to producer, as does the resolution. I'm trying to reduce the video to something almost useless, but keep as much audio quality as was originally submitted. I don't understand what overall compression choices will have on the audio without somehow specifying it to be "best available". – GDP Feb 21 at 22:56
  • 1
    What format(s) does the transcription service support? Do you even need the video? If you're using something like IBM Watson speech-to-text you don't need video. – llogan Feb 24 at 21:34
1

It's not entirely clear what you mean by improved audio, but here are three ffmpeg-based options that should get you what you need. Just combine the appropriate code below. I've included an audio conversion to high bitrate aac in all of the commands, but this will not actively improve your audio. If you're looking to optimize the audio for voice, check out ffmpeg's highpass, lowpass, and anequalizer audio filters to filter out unwanted high end and low end frequencies, and to enhance vocal frequencies (probably around 1khz and 5kz).

This line processes all of one file type in a folder. Just cd into the appropriate directory. Replace [original file extension] with your file extension, eg. for i in *.mov; do

mkdir output; for i in *.[original file extension]; do

Use that first line, plus one of the following

Option 1) -vn will ditch the video altogether. Consider just sending audio files.

ffmpeg -i [input] -vn -acodec aac -b:a 320k [output];done

Option 2) -vf scale will scale all your videos into a smaller size without messing with the audio.

ffmpeg -i [input] -vf scale=320:240 -crf 30 -acodec aac -b:a 320k [output];done

Option 3) The first line gets the duration of your video $t using ffmpeg. The second line creates black video to replace your video with, then uses -map to combine the new black video and the audio. Then it uses -ss and -t to set a start and end time $t. Replace [original file extension] with your file extension, eg. "$(basename $i .mov).mp4"

You should really only consider using this if your transcription service demands a video file, but either of the previous options is probably a better choice.

t=$(ffmpeg -i "$i" 2>&1 | grep "Duration"|grep -o '00:*.*'|cut -f1 -d","|awk -F: '{seconds=($1*60)*60; seconds=seconds+($2*60); seconds=seconds+$3; print seconds}');

ffmpeg -f lavfi -i color=c=black:s=2x2:r=1/1 -i "$i" -map 0:v -map 1:a -acodec aac -b:a 320k -ss 0 -t $t "output/$(basename $i .[original file extension]).mp4";done

Again, if your transcription service doesn't care about or even want video, you could shortcut all of this and just send them high quality wav files. ffmpeg -i [input.mp4] [output.wav]

| improve this answer | |
  • Thankyou! I often tremble when considering asking questions on this site because I'm not a video engineer type, and know i don't understand the lingo well enough to ask a question properly (and it's never without a day of googling first). The video is needed, but only enough to identify speaker names, so you've given me EXACTLY what I needed. Thank you again. – GDP Feb 26 at 14:01
0

Just turn the video bitrate or the CRF, depending on what options your encoder gives you, way down.

| improve this answer | |
  • 2
    "turn the video bitrate or the CRF"? I don't understand what you mean, or how to apply that to ffmpeg – GDP Feb 19 at 14:57
  • -crf controls the Constant Rate Factor which ≈ 1 / quality. Higher is worserer, I think the lowest quality you can go is -crf 31. Just add that flag somewhere in your ffmpeg command. – stib Feb 21 at 1:45
  • 1
    This answer could be improved with a bit more detail; it also doesn't address the audio side of the question – stib Feb 21 at 1:47

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.