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

Hi am getting this error Unable to choose an output format..... i already downloaded potplayer etc #145

Open
ghost opened this issue Oct 28, 2024 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 28, 2024

Hi I have downloaded all the perquisites and even made sure i am using cuda 11.0 but when I run this either from source or the cpu, it goes though all the steps, cleans the mosaic but at the last step it I get this error:

[AVFormatContext @ 0x55bdd57bdc80] Unable to choose an output format for './result/edit.mp4/edit'; use a standard extension for the filename or specify the format manually.
[out#0 @ 0x55bdd57bb5c0] Error initializing the muxer for ./result/edit.mp4/edit: Invalid argument
Error opening output file ./result/edit.mp4/edit.
Error opening output files: Invalid argument
Clean temp...
Finished!

I chat gpt the error and it said this :

The error message you're encountering indicates that the output file path does not have a standard video file extension, which is necessary for the format to be recognized. Here's how to fix this issue:

Steps to Fix the Output File Extension Error

  1. Check Output Path in Your Code:
    Open the deepmosaic.py file and locate the section where the output file path is specified. Ensure that the output file name includes a valid video file extension such as .mp4, .avi, or .mov.

    For example, if you have code like this:

    output_file = './result/edit'

    Change it to:

    output_file = './result/edit.mp4'
  2. Modify the Output File Name in the Script:
    In the main() function or wherever the output file is being defined, make sure it looks something like this:

    output_file = os.path.join(opt.temp_dir, 'output_video.mp4')  # Make sure to use a valid extension
  3. Ensure the Output Directory Exists:
    Make sure that the ./result/ directory exists. If it doesn't, create it before running your script:

    mkdir -p ./result
  4. Run Your Command Again:
    After making the changes, run your command again:

    python3 deepmosaic.py --media_path "/mnt/c/Users/Leoke/Downloads/edit 4 - Made with Clipchamp.mp4" --model_path ./pretrained_models/mosaic/clean_youknow_video.pth --gpu_id 0

Additional Tips

  • Debugging: If you're still encountering issues, you can add print statements in the deepmosaic.py file to check the value of the output file path before the script tries to save the output.

  • Log Errors: If the script has a logging mechanism, consider checking those logs for more detailed error messages.

By ensuring that the output file path has a valid file extension and that the directory structure is in place, you should be able to resolve this error. Let me know if you need further help!

I tried everything and I still get the same error over and over again. Any help much apricated.

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

0 participants