This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -vf tpad=start_duration=10:color=black -af "adelay=10s:all=1" output.mp4 | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 10 -reset_timestamps 1 output_%03d.mp4 | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -vf setpts=PTS/2 -af atempo=2 output_fast.mp4 | |
ffmpeg -i input.mp4 -vf setpts=PTS*2 -af atempo=0.5 output_slow.mp4 | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir output | |
ffmpeg -i input.mp4 -r 2 -vcodec png output\output_%06d.png | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir output_png | |
ffmpeg -i input.mp4 -vcodec png output_png\output_%06d.png | |
mkdir output_jpg | |
ffmpeg -i input.mp4 -vcodec mjpeg output_jpg\output_%06d.jpg | |
mkdir output_bmp | |
ffmpeg -i input.mp4 -vcodec bmp output_bmp\output_%06d.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -i logo.png -filter_complex overlay=10:10 output1.mp4 | |
ffmpeg -i input.mp4 -i logo.png -filter_complex [1:v]lut=a='val*0.5',[0:v]overlay=10:10 output2.mp4 | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -filter_complex "drawtext=fontfile=C\\://WINDOWS/Fonts/arial.ttf:text='test':enable='between(t,1,8)':fontcolor=blue:fontsize=64:x=40:y=40" output.mp4 | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -filter_complex "drawtext=fontfile=C\\://WINDOWS/Fonts/arial.ttf:text='test':fontcolor=blue:fontsize=64:x=40:y=40" output.mp4 | |
ffmpeg -i input.mp4 -filter_complex "drawtext=fontfile=C\\://WINDOWS/Fonts/arial.ttf:text='test':fontcolor=blue:fontsize=64:x=40:y=40:box=1:boxcolor=black@0.3: boxborderw=20" output.mp4 | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -vf crop=w=960:h=540:x=100:y=100 output.mp4 | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
import sys | |
def main(): | |
print("OpenCV Version: " + str(cv2.__version__)) | |
# Loading image data (GRAYSCALE) | |
filename = "image.png" |