Skip to content

Instantly share code, notes, and snippets.

@frace
Last active September 11, 2021 08:36
Show Gist options
  • Select an option

  • Save frace/d556c46b42d8f8e6ab5c to your computer and use it in GitHub Desktop.

Select an option

Save frace/d556c46b42d8f8e6ab5c to your computer and use it in GitHub Desktop.
A scrapbook for a script
# Get raw encoder value
ffprobe -v quiet -print_format compact=print_section=0:nokey=1:escape=csv -show_entries format_tags=encoder "$input_file"
# Get raw duration value
ffprobe -v quiet -print_format compact=print_section=0:nokey=1:escape=csv -show_entries format=duration "$input_file"
# Generate spectrogram
ffmpeg -ss "$start_position" -t "$duration" -i "$input_file" -f sox - | sox -t sox - -n spectrogram -o "${output_name}.png"
# Generate raw data used in spectrogram
missing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment