fid-ffmpeg 0.4.7__tar.gz → 0.4.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/PKG-INFO +1 -1
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/pyproject.toml +1 -1
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/fid.py +6 -4
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/fid_interactive.py +3 -3
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/initial_files/error_handling.py +2 -1
- fid_ffmpeg-0.4.9/src/fid/tasks/audio/mute.py +14 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/encode/encode_interactive.py +2 -9
- fid_ffmpeg-0.4.9/src/fid/tasks/extract/audio.py +13 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/extract_interactive.py +0 -27
- fid_ffmpeg-0.4.9/src/fid/tasks/extract/frames.py +15 -0
- fid_ffmpeg-0.4.9/src/fid/tasks/info.py +12 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/stream_interactive.py +0 -21
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/compressor.py +9 -8
- fid_ffmpeg-0.4.9/src/fid/tasks/video/gif.py +14 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/resize.py +10 -8
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/video_interactive.py +6 -25
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid_ffmpeg.egg-info/PKG-INFO +1 -1
- fid_ffmpeg-0.4.7/src/fid/tasks/audio/mute.py +0 -12
- fid_ffmpeg-0.4.7/src/fid/tasks/extract/audio.py +0 -12
- fid_ffmpeg-0.4.7/src/fid/tasks/extract/frames.py +0 -14
- fid_ffmpeg-0.4.7/src/fid/tasks/info.py +0 -11
- fid_ffmpeg-0.4.7/src/fid/tasks/video/gif.py +0 -12
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/LICENSE +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/README.md +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/setup.cfg +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/initial_files/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/audio_interactive.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/bitrate.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/channels.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/codec.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/compressor.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/delay.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/denoise.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/equalizer.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/fade.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/mix.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/normalize.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/replace.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/speed.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/trim.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/audio/volume.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/encode/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/encode/av1.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/encode/h264.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/encode/h265.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/attachments.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/audio_channels.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/audio_track.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/chapters.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/keyframes.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/subtitles.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/subtitles_convert.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/subtitles_track.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/extract/thumbnails.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/dash.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/hls.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/http.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/rtmp.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/rtsp.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/srt.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/stream/udp.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/__init__.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/concat.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/crop.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/fps.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/rotate.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/speed.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/tasks/video/trim.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid/welcome.py +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid_ffmpeg.egg-info/SOURCES.txt +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid_ffmpeg.egg-info/dependency_links.txt +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid_ffmpeg.egg-info/entry_points.txt +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid_ffmpeg.egg-info/requires.txt +0 -0
- {fid_ffmpeg-0.4.7 → fid_ffmpeg-0.4.9}/src/fid_ffmpeg.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "fid-ffmpeg"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.9"
|
|
8
8
|
description = "FFmpeg-based CLI tool for video and audio operations like editing, extracting, streaming, and encoding"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Omar Abdalgwad", email = "ahlawyomar95@gmail.com" }]
|
|
@@ -24,12 +24,14 @@ def start(ctx : typer.Context):
|
|
|
24
24
|
video_path= questionary.path("enter the path to your video:").ask()
|
|
25
25
|
if video_path is None:
|
|
26
26
|
raise typer.Exit()
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
|
|
28
|
+
cPath= Path(video_path.strip('"').strip("'"))
|
|
29
|
+
if cPath.is_file():
|
|
30
|
+
fid_main(str(cPath))
|
|
29
31
|
break
|
|
30
32
|
else:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
print(f"[red]Error: '{video_path}' is not a valid file path. Please try again.[/red]")
|
|
34
|
+
|
|
33
35
|
audio_main(app)
|
|
34
36
|
compress_main(app)
|
|
35
37
|
frames_main(app)
|
|
@@ -6,7 +6,7 @@ from .tasks.extract.extract_interactive import extract_main
|
|
|
6
6
|
from .tasks.stream.stream_interactive import stream_main
|
|
7
7
|
from .tasks.video.video_interactive import video_main
|
|
8
8
|
|
|
9
|
-
def fid_main(
|
|
9
|
+
def fid_main(cPath):
|
|
10
10
|
|
|
11
11
|
while True:
|
|
12
12
|
choice= questionary.select(
|
|
@@ -24,7 +24,7 @@ def fid_main(video_path):
|
|
|
24
24
|
raise typer.Exit()
|
|
25
25
|
|
|
26
26
|
if choice=="video editing":
|
|
27
|
-
|
|
27
|
+
video_main(video_path)
|
|
28
28
|
|
|
29
29
|
elif choice=="audio editing":
|
|
30
30
|
audio_main(video_path)
|
|
@@ -39,4 +39,4 @@ def fid_main(video_path):
|
|
|
39
39
|
encode_main(video_path)
|
|
40
40
|
|
|
41
41
|
elif choice=="exit":
|
|
42
|
-
|
|
42
|
+
raise typer.Exit()
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import subprocess
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def mute(video_path: Path):
|
|
8
|
+
ffmpeg()
|
|
9
|
+
ckvideo(video_path)
|
|
10
|
+
mute_out=video_path.with_stem(f"{video_path.stem}_muted").with_suffix(video_path.suffix)
|
|
11
|
+
subprocess.run(["ffmpeg", "-i", str(video_path), "-c", "copy", "-an", "-y", str(mute_out)], check=True)
|
|
12
|
+
|
|
13
|
+
def mute_main(app: typer.Typer):
|
|
14
|
+
app.command()(mute)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import questionary
|
|
2
3
|
import typer
|
|
3
4
|
#from .h264 import h264
|
|
@@ -19,15 +20,7 @@ def encode_main(video_path):
|
|
|
19
20
|
if choice is None:
|
|
20
21
|
raise typer.Exit()
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
h264(video_path)
|
|
24
|
-
|
|
25
|
-
elif choice=="encode to h265":
|
|
26
|
-
h265(video_path)
|
|
27
|
-
|
|
28
|
-
elif choice=="encode to av1":
|
|
29
|
-
av1(video_path)
|
|
30
|
-
|
|
23
|
+
|
|
31
24
|
elif choice=="Back to main menu":
|
|
32
25
|
return
|
|
33
26
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import subprocess
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def audio(video_path: Path):
|
|
8
|
+
ffmpeg()
|
|
9
|
+
ckvideo(video_path)
|
|
10
|
+
audio_out=video_path.with_suffix(".mp3")
|
|
11
|
+
subprocess.run(["ffmpeg", "-i", str(video_path), "-vn", "-acodec", "libmp3lame", "-y", str(audio_out)], check=True)
|
|
12
|
+
def audio_main(app: typer.Typer):
|
|
13
|
+
app.command()(audio)
|
|
@@ -41,33 +41,6 @@ def extract_main(video_path):
|
|
|
41
41
|
elif choice=="extract frames":
|
|
42
42
|
frames(video_path)
|
|
43
43
|
|
|
44
|
-
elif choice=="extract subtitles":
|
|
45
|
-
subtitles(video_path)
|
|
46
|
-
|
|
47
|
-
elif choice=="extract chapters":
|
|
48
|
-
chapters(video_path)
|
|
49
|
-
|
|
50
|
-
elif choice=="extract thumbnails":
|
|
51
|
-
thumbnails(video_path)
|
|
52
|
-
|
|
53
|
-
elif choice=="extract keyframes":
|
|
54
|
-
keyframes(video_path)
|
|
55
|
-
|
|
56
|
-
elif choice=="extract audio_track":
|
|
57
|
-
audio_track(video_path)
|
|
58
|
-
|
|
59
|
-
elif choice=="extract audio_channels":
|
|
60
|
-
audio_channels(video_path)
|
|
61
|
-
|
|
62
|
-
elif choice=="extract subtitles_track":
|
|
63
|
-
subtitles_track(video_path)
|
|
64
|
-
|
|
65
|
-
elif choice=="subtitles convert":
|
|
66
|
-
subtitles_convert(video_path)
|
|
67
|
-
|
|
68
|
-
elif choice=="extract attachments":
|
|
69
|
-
attachments(video_path)
|
|
70
|
-
|
|
71
44
|
elif choice=="Back to main menu":
|
|
72
45
|
return
|
|
73
46
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import subprocess
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def frames(video_path: Path):
|
|
8
|
+
ffmpeg()
|
|
9
|
+
ckvideo(video_path)
|
|
10
|
+
Fdir= video_path.parent
|
|
11
|
+
frames_out= Fdir / "Frames" / video_path.stem
|
|
12
|
+
frames_out.mkdir(parents=True,exist_ok=True)
|
|
13
|
+
subprocess.run(["ffmpeg", "-i", str(video_path),str(frames_out/ "frame_%02d.png")],check=True )
|
|
14
|
+
def frames_main(app: typer.Typer):
|
|
15
|
+
app.command()(frames)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import subprocess
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from ..initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def info(video_path: Path):
|
|
8
|
+
ffmpeg()
|
|
9
|
+
ckvideo(cPath)
|
|
10
|
+
subprocess.run(["ffprobe", "-v", "error", "-show_format", "-show_streams", str(video_path)], check=True)
|
|
11
|
+
def info_main(app: typer.Typer):
|
|
12
|
+
app.command()(info)
|
|
@@ -27,28 +27,7 @@ def stream_main(video_path):
|
|
|
27
27
|
|
|
28
28
|
if choice is None:
|
|
29
29
|
raise typer.Exit()
|
|
30
|
-
|
|
31
|
-
if choice=="stream with hls":
|
|
32
|
-
hls(video_path)
|
|
33
|
-
|
|
34
|
-
elif choice=="stream with rtmp":
|
|
35
|
-
rtmp(video_path)
|
|
36
|
-
|
|
37
|
-
elif choice=="stream with dash":
|
|
38
|
-
dash(video_path)
|
|
39
|
-
|
|
40
|
-
elif choice=="stream with srt":
|
|
41
|
-
srt(video_path)
|
|
42
30
|
|
|
43
|
-
elif choice=="stream with udp":
|
|
44
|
-
udp(video_path)
|
|
45
|
-
|
|
46
|
-
elif choice=="stream with rtsp":
|
|
47
|
-
rtsp(video_path)
|
|
48
|
-
|
|
49
|
-
elif choice=="stream with http":
|
|
50
|
-
http(video_path)
|
|
51
|
-
|
|
52
31
|
elif choice=="Back to main menu":
|
|
53
32
|
return
|
|
54
33
|
|
|
@@ -3,12 +3,13 @@ import subprocess
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
subprocess.run(
|
|
6
|
+
|
|
7
|
+
def compress(video_path: Path, crf: int=28):
|
|
8
|
+
ffmpeg()
|
|
9
|
+
ckvideo(video_path)
|
|
10
|
+
compress_out= video_path.with_stem(f"{video_path.stem}_compressed").with_suffix(".mkv")
|
|
11
|
+
subprocess.run(
|
|
13
12
|
["ffmpeg", "-i", str(video_path),"-c:v", "libx264", "-crf", str(crf), "-preset","medium","-c:a","aac","-b:a","96k","-y",str(compress_out),]
|
|
14
|
-
, check=True)
|
|
13
|
+
, check=True)
|
|
14
|
+
def compress_main(app: typer.Typer):
|
|
15
|
+
app.command()(compress)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import subprocess
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def gif(video_path: Path):
|
|
8
|
+
ffmpeg()
|
|
9
|
+
ckvideo(video_path)
|
|
10
|
+
gif_out=video_path.with_suffix(".gif")
|
|
11
|
+
subprocess.run(["ffmpeg", "-i", str(video_path), "-t", "3", "-vf", "scale=320:-1", "-y", str(gif_out)], check=True)
|
|
12
|
+
|
|
13
|
+
def gif_main(app: typer.Typer):
|
|
14
|
+
app.command()(gif)
|
|
@@ -3,13 +3,12 @@ import subprocess
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
subprocess.run(
|
|
6
|
+
|
|
7
|
+
def resize(video_path: Path, width: int):
|
|
8
|
+
ffmpeg()
|
|
9
|
+
ckvideo(video_path)
|
|
10
|
+
resize_out= video_path.with_stem(f"{video_path.stem}_{width}w").with_suffix(".mp4")
|
|
11
|
+
subprocess.run(
|
|
13
12
|
["ffmpeg",
|
|
14
13
|
"-i", str(video_path),
|
|
15
14
|
"-vf", f"scale={width}:-1",
|
|
@@ -17,4 +16,7 @@ def resize_main(app: typer.Typer):
|
|
|
17
16
|
"-preset", "medium",
|
|
18
17
|
"-c:a", "copy",
|
|
19
18
|
"-y",
|
|
20
|
-
str(resize_out)], check=True)
|
|
19
|
+
str(resize_out)], check=True)
|
|
20
|
+
|
|
21
|
+
def resize_main(app: typer.Typer):
|
|
22
|
+
app.command()(resize)
|
|
@@ -5,7 +5,7 @@ from .compressor import compress
|
|
|
5
5
|
#from .crop import crop
|
|
6
6
|
#from .fps import fps
|
|
7
7
|
from .gif import gif
|
|
8
|
-
from .resize import resize
|
|
8
|
+
#from .resize import resize
|
|
9
9
|
#from .rotate import rotate
|
|
10
10
|
#from .speed import speed
|
|
11
11
|
#from .trim import trim
|
|
@@ -33,32 +33,13 @@ def video_main(video_path):
|
|
|
33
33
|
raise typer.Exit()
|
|
34
34
|
|
|
35
35
|
if choice=="compress the video":
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
compress(video_path)
|
|
37
|
+
|
|
38
38
|
elif choice=="make gif":
|
|
39
39
|
gif(video_path)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
elif choice=="change fps":
|
|
45
|
-
fps(video_path)
|
|
46
|
-
|
|
47
|
-
elif choice=="concat videos":
|
|
48
|
-
concat(video_path)
|
|
49
|
-
|
|
50
|
-
elif choice=="crop video":
|
|
51
|
-
crop(video_path)
|
|
52
|
-
|
|
53
|
-
elif choice=="resize video":
|
|
54
|
-
resize(video_path)
|
|
55
|
-
|
|
56
|
-
elif choice=="rotate video":
|
|
57
|
-
rotate(video_path)
|
|
58
|
-
|
|
59
|
-
elif choice=="trim video":
|
|
60
|
-
trim(video_path)
|
|
61
|
-
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
62
43
|
elif choice=="Back to main menu":
|
|
63
44
|
return
|
|
64
45
|
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
import subprocess
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
-
|
|
6
|
-
def mute_main(app: typer.Typer):
|
|
7
|
-
@app.command()
|
|
8
|
-
def mute(video_path: Path):
|
|
9
|
-
ffmpeg()
|
|
10
|
-
ckvideo(video_path)
|
|
11
|
-
mute_out=video_path.with_stem(f"{video_path.stem}_muted").with_suffix(video_path.suffix)
|
|
12
|
-
subprocess.run(["ffmpeg", "-i", str(video_path), "-c", "copy", "-an", "-y", str(mute_out)], check=True)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
import subprocess
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
-
|
|
6
|
-
def audio_main(app: typer.Typer):
|
|
7
|
-
@app.command()
|
|
8
|
-
def audio(video_path: Path):
|
|
9
|
-
ffmpeg()
|
|
10
|
-
ckvideo(video_path)
|
|
11
|
-
audio_out=video_path.with_suffix(".mp3")
|
|
12
|
-
subprocess.run(["ffmpeg", "-i", str(video_path), "-vn", "-acodec", "libmp3lame", "-y", str(audio_out)], check=True)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
import subprocess
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
-
|
|
6
|
-
def frames_main(app: typer.Typer):
|
|
7
|
-
@app.command()
|
|
8
|
-
def frames(video_path: Path):
|
|
9
|
-
ffmpeg()
|
|
10
|
-
ckvideo(video_path)
|
|
11
|
-
Fdir= video_path.parent
|
|
12
|
-
frames_out= Fdir / "Frames" / video_path.stem
|
|
13
|
-
frames_out.mkdir(parents=True,exist_ok=True)
|
|
14
|
-
subprocess.run(["ffmpeg", "-i", str(video_path),str(frames_out/ "frame_%02d.png")],check=True )
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
import subprocess
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from .initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
-
|
|
6
|
-
def info_main(app: typer.Typer):
|
|
7
|
-
@app.command()
|
|
8
|
-
def info(video_path: Path):
|
|
9
|
-
ffmpeg()
|
|
10
|
-
ckvideo(video_path)
|
|
11
|
-
subprocess.run(["ffprobe", "-v", "error", "-show_format", "-show_streams", str(video_path)], check=True)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
import subprocess
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from ...initial_files.error_handling import ffmpeg , ckvideo
|
|
5
|
-
|
|
6
|
-
def gif_main(app: typer.Typer):
|
|
7
|
-
@app.command()
|
|
8
|
-
def gif(video_path: Path):
|
|
9
|
-
ffmpeg()
|
|
10
|
-
ckvideo(video_path)
|
|
11
|
-
gif_out=video_path.with_suffix(".gif")
|
|
12
|
-
subprocess.run(["ffmpeg", "-i", str(video_path), "-t", "3", "-vf", "scale=320:-1", "-y", str(gif_out)], check=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|