-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from vondas-network/dev
Added ball_point_pen, digital_boss, ghostee, and zapruder effects
- Loading branch information
Showing
7 changed files
with
194 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from utils.ffmpeg_operations import run_ffmpeg_command | ||
|
||
def ball_point_pen(input_file, output_file): | ||
command = [ | ||
"ffmpeg", | ||
"-i", input_file, | ||
"-filter_complex", "[0:v]amplify=radius=6:factor=2,bwdif=mode=send_frame:parity=bff,colorbalance=gs=-0.34:bs=0.47:rm=-0.18:gm=-0.7:bm=0.5[out_v]", | ||
"-map", "[out_v]", | ||
"-map", "0:a", | ||
"-c:v", "libx264", | ||
"-profile:v", "high", | ||
"-level:v", "4.2", | ||
"-pix_fmt", "yuv420p", | ||
"-movflags", "+faststart", | ||
"-c:a", "aac", | ||
"-b:a", "128", | ||
output_file | ||
] | ||
run_ffmpeg_command(command) | ||
print(f"Video processed with ball_point_pen and file is {output_file}") | ||
|
||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from utils.ffmpeg_operations import run_ffmpeg_command | ||
|
||
def digital_boss(input_file, output_file): | ||
command = [ | ||
"ffmpeg", | ||
"-i", input_file, | ||
"-filter_complex", "[0:v]huesaturation=hue=-131.18:saturation=0.56:intensity=0.18:strength=57.81:rw=0.75:gw=0.81,amplify=factor=10[out_v]", | ||
"-map", "[out_v]", | ||
"-map", "0:a", | ||
"-c:v", "libx264", | ||
"-profile:v", "high", | ||
"-level:v", "4.2", | ||
"-pix_fmt", "yuv420p", | ||
"-movflags", "+faststart", | ||
"-c:a", "aac", | ||
"-b:a", "128", | ||
output_file | ||
] | ||
run_ffmpeg_command(command) | ||
print(f"Video processed with digital_boss and file is {output_file}") | ||
|
||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from utils.ffmpeg_operations import run_ffmpeg_command | ||
|
||
def ghostee(input_file, output_file): | ||
command = [ | ||
"ffmpeg", | ||
"-i", input_file, | ||
"-filter_complex", "[0:v]amplify=radius=8:factor=4,colorbalance[out_v]", | ||
"-map", "[out_v]", | ||
"-map", "0:a", | ||
"-c:v", "libx264", | ||
"-profile:v", "high", | ||
"-level:v", "4.2", | ||
"-pix_fmt", "yuv420p", | ||
"-movflags", "+faststart", | ||
"-c:a", "aac", | ||
"-b:a", "128", | ||
output_file | ||
] | ||
run_ffmpeg_command(command) | ||
print(f"Video processed with ghostee and file is {output_file}") | ||
|
||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from utils.ffmpeg_operations import run_ffmpeg_command | ||
|
||
def zapruder(input_file, output_file): | ||
command = [ | ||
"ffmpeg", | ||
"-i", input_file, | ||
"-filter_complex", "[0:v]amplify=radius=2:factor=13:threshold=61889.14:tolerance=0.2,colorbalance,colorcorrect=rl=0.61:rh=0.2:bh=0.16:analyze=minmax,dctdnoiz=sigma=498.03[out_v]", | ||
"-map", "[out_v]", | ||
"-map", "0:a", | ||
"-c:v", "libx264", | ||
"-profile:v", "high", | ||
"-level:v", "4.2", | ||
"-pix_fmt", "yuv420p", | ||
"-movflags", "+faststart", | ||
"-c:a", "aac", | ||
"-b:a", "128", | ||
output_file | ||
] | ||
run_ffmpeg_command(command) | ||
print(f"Video processed with zapruder and file is {output_file}") | ||
|
||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4 |
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