Skip to content

Commit

Permalink
A few Bug Fixes
Browse files Browse the repository at this point in the history
modified and refractor  the code
  • Loading branch information
GeoHaber committed Jun 19, 2024
1 parent a32a2ed commit 3910a23
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 131 deletions.
9 changes: 5 additions & 4 deletions FFMpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def ffprobe_run(input_file: str, execu=ffprob, de_bug=False) -> dict:
cmd = [execu, '-hide_banner', '-i', input_file,
'-analyzeduration', '100000000',
'-probesize', '50000000',
'-v', 'error', # XXX quiet, panic, fatal, error, warning, info, verbose, de_bug, trace
'-v', 'fatal', # XXX quiet, panic, fatal, error, warning, info, verbose, de_bug, trace
'-of','json', # XXX default, csv, xml, flat, ini
'-show_programs',
'-show_format',
Expand Down Expand Up @@ -252,7 +252,7 @@ def parse_frmat(input_file: str, mta_dta: Dict[str, any], de_bug: bool) -> Tuple
streams_by_type = defaultdict(list)

for i, stream in enumerate(_Streams, start=1):
codec_type = stream.get('codec_type')
codec_type = stream.get('codec_type','?')
streams_by_type[codec_type].append(stream)

if debug:
Expand Down Expand Up @@ -339,8 +339,9 @@ def parse_frmat(input_file: str, mta_dta: Dict[str, any], de_bug: bool) -> Tuple
skip_it = skip_it and d_skip
if de_bug : print (f"\nSkip={skip_it}, Dskip = {d_skip}\n" )

if de_bug:
print(f"FFcom: {ff_com}\nSkip: {skip_it}")
if de_bug or f_skip:
# print(f" Skip: {skip_it}\n FFmpeg: {ff_com}\n Nothing to do")
return [], f_skip

return ff_com, skip_it

Expand Down
Loading

0 comments on commit 3910a23

Please sign in to comment.