Skip to content

Commit

Permalink
Merge pull request #13 from jmorgadov/fix/check-video-codec-in-file-c…
Browse files Browse the repository at this point in the history
…ommand

Fix/check video codec in file command
  • Loading branch information
hiancdtrsnm authored Sep 14, 2020
2 parents 349874a + 8b0f7ce commit 2cc4e81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion video_diet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import filetype
import os
import shutil
from typer.colors import RED
from typer.colors import RED, GREEN
import enlighten
import ffmpeg

Expand Down Expand Up @@ -114,6 +114,10 @@ def file(path: Path = typer.Argument(
please delete it', fg=RED)
return

if get_codec(str(path)) == 'hevc':
typer.secho('This video codec is already \'hevc\'', fg=GREEN)
return

try:
convert_video(str(path), str(conv_path))

Expand Down

0 comments on commit 2cc4e81

Please sign in to comment.