Commit 304fdfe9 authored by Clément Bœsch's avatar Clément Bœsch Committed by Stefano Sabatini

lavfi: add showwavespic filter

This is a variant of showwaves. It is implemented as a different filter
so that the user is not allowed to use meaningless options which belong
to showwaves (such as rate).

Major edits done by Stefano Sabatini, from a patch by ubitux.

See thread:
From: Clément Bœsch <u@pkh.me>
To: ffmpeg-devel@ffmpeg.org
Date: Wed, 24 Dec 2014 15:03:26 +0100
Subject: [FFmpeg-devel] [PATCH] avfilter/showwaves: add single_pic option
parent 0f16dfda
......@@ -5,6 +5,7 @@ version <next>:
- FFT video filter
- TDSC decoder
- DTS lossless extension (XLL) decoding (not lossless, disabled by default)
- showwavespic filter
version 2.6:
......
......@@ -11741,6 +11741,33 @@ aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=
@end example
@end itemize
@section showwavespic
Convert input audio to a single video frame, representing the samples waves.
The filter accepts the following options:
@table @option
@item size, s
Specify the video size for the output. For the syntax of this option, check the
@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}.
Default value is @code{600x240}.
@item split_channels
Set if channels should be drawn separately or overlap. Default value is 0.
@end table
@subsection Examples
@itemize
@item
Extract a channel split representation of the wave form of a whole audio track
in a 1024x800 picture using @command{ffmpeg}:
@example
ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
@end example
@end itemize
@section split, asplit
Split input into several identical outputs.
......
......@@ -236,6 +236,7 @@ OBJS-$(CONFIG_CONCAT_FILTER) += avf_concat.o
OBJS-$(CONFIG_SHOWCQT_FILTER) += avf_showcqt.o
OBJS-$(CONFIG_SHOWSPECTRUM_FILTER) += avf_showspectrum.o
OBJS-$(CONFIG_SHOWWAVES_FILTER) += avf_showwaves.o
OBJS-$(CONFIG_SHOWWAVESPIC_FILTER) += avf_showwaves.o
# multimedia sources
OBJS-$(CONFIG_AMOVIE_FILTER) += src_movie.o
......
......@@ -251,6 +251,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(SHOWCQT, showcqt, avf);
REGISTER_FILTER(SHOWSPECTRUM, showspectrum, avf);
REGISTER_FILTER(SHOWWAVES, showwaves, avf);
REGISTER_FILTER(SHOWWAVESPIC, showwavespic, avf);
/* multimedia sources */
REGISTER_FILTER(AMOVIE, amovie, avsrc);
......
This diff is collapsed.
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 12
#define LIBAVFILTER_VERSION_MINOR 13
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment