Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error during encoding 2 #37

Open
fperdigon opened this issue Nov 18, 2020 · 1 comment
Open

error during encoding 2 #37

fperdigon opened this issue Nov 18, 2020 · 1 comment

Comments

@fperdigon
Copy link

I got another error, the conditions are the same as #36
The error:

(base) fco@X99:~$ video-diet folder "/media/fco/STORAGE1/VIDEOS LYF_HDD/PELICULAS/"
Processing: /media/fco/STORAGE1/VIDEOS LYF_HDD/PELICULAS/Point Break [2015] [HD]/Point Break [2015] [HD].mp4
Traceback (most recent call last):
  File "/home/fco/miniconda3/bin/video-diet", line 8, in <module>
    sys.exit(app())
  File "/home/fco/miniconda3/lib/python3.7/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/home/fco/miniconda3/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/fco/miniconda3/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/fco/miniconda3/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/fco/miniconda3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fco/miniconda3/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/fco/miniconda3/lib/python3.7/site-packages/typer/main.py", line 497, in wrapper
    return callback(**use_params)  # type: ignore
  File "/home/fco/miniconda3/lib/python3.7/site-packages/video_diet/main.py", line 71, in folder
    if get_codec(str(video)) != 'hevc':
  File "/home/fco/miniconda3/lib/python3.7/site-packages/video_diet/utils.py", line 48, in get_codec
    return metadata.audio[0].codec()
IndexError: list index out of range
@fperdigon fperdigon changed the title error encoding #2 error encoding 2 Nov 18, 2020
@fperdigon fperdigon changed the title error encoding 2 error during encoding 2 Nov 18, 2020
@fperdigon
Copy link
Author

I have been checking this error and one of the causes is due to some video files that have errors and can't be opened whit VLC. A proposed way to solve it could be:
1- Capturing the error and saving the file name (it can ve created an error log in the folder where the video is)
2- Then jump to another file and continues the conversion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant