Changes between Version 5 and Version 6 of Waveform
- Timestamp:
- Oct 10, 2017, 10:55:07 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Waveform
v5 v6 50 50 Note that this won't be as accurate of a representation as it would without compand, but for aesthetics it may be preferred. 51 51 52 == Adding color, alpha (transparency), andbackground ==52 == Adding a background == 53 53 54 54 [[Image(showwavespic_bg.png)]] 55 55 56 Using [https://ffmpeg.org/ffmpeg-filters.html#format format], [https://ffmpeg.org/ffmpeg-filters.html#colorkey colorkey], [https://ffmpeg.org/ffmpeg-filters.html#colorchannelmixer colorchannelmixer], and [https://ffmpeg.org/ffmpeg-filters.html#overlay overlay]: 57 58 {{{ 59 ffmpeg -i input -i background.png -filter_complex \ 60 "[0:a]showwavespic=s=640x240,format=rgba,colorkey=black,colorchannelmixer=rr=0.953:gg=0.435:bb=0.133[top]; \ 61 [1:v][top]overlay=format=rgb" \ 62 -frames:v 1 output.png 56 Using [https://ffmpeg.org/ffmpeg-filters.html#overlay overlay]: 57 58 {{{ 59 ffmpeg -i input -i background.png -filter_complex "[0:a]showwavespic=s=640x240[fg];[1:v][top]overlay=format=auto" -frames:v 1 output.png 63 60 }}} 64 61 65 62 * This example assumes the background is the same width and height as the waveform. If it is not, you can [https://ffmpeg.org/ffmpeg-filters.html#scale scale], [https://ffmpeg.org/ffmpeg-filters.html#crop crop], or [https://ffmpeg.org/ffmpeg-filters.html#pad pad] the background first. 66 63 67 * Th is example will make the waveform an orange color (`#f36f22` or `rgb(243,111,34)`). The RGB value for each color channel must be interpolated to fit the 0-1 range of the colorchannelmixer filter by dividing each value by 255. For example, the green channel is 111/255≈0.435.64 * The waveform color can be modified with the `colors` option in showwavespic. 68 65 69 66 = Waveform video =
