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

[concat @ <nums>] Impossible to Open "'DD:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00000.mp4'" #1051

Closed
SuperMaZingCoder opened this issue May 11, 2020 · 43 comments

Comments

@SuperMaZingCoder
Copy link

I followed this tutorial: https://www.youtube.com/watch?v=ZltiKHFWmv8
After, I ran the python -m manim example_scenes.py SquareToCircle -pl command through the Windows terminal, in the manim repo folder, and got an error. Here is the trace:

D:\Documents\Coding\Installations\manim>python -m manim example_scenes.py SquareToCircle -pl
Media will be stored in media\. You can change this behavior by writing a different directory to media_dir.txt.
[concat @ 000001a1d404bf80] Impossible to open 'DD:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00000.mp4'
D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt: Protocol not found
Did you mean file:D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt?

File ready at D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\SquareToCircle.mp4

Played 3 animations



Traceback (most recent call last):
  File "D:\Documents\Coding\Installations\manim\manimlib\extract_scene.py", line 154, in main
    open_file_if_needed(scene.file_writer, **config)
  File "D:\Documents\Coding\Installations\manim\manimlib\extract_scene.py", line 35, in open_file_if_needed
    os.startfile(file_path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'D:\\Documents\\Coding\\Installations\\manim\\media\\videos\\example_scenes\\480p15\\SquareToCircle.mp4'

I am using this version of manim: https://github.com/3b1b/manim/tree/3b088b12843b7a4459fe71eba96b70edafb7aa78

@SuperMaZingCoder
Copy link
Author

I tested this on the newest version, as well. Still getting the issue.

@SuperMaZingCoder
Copy link
Author

SystemPropertiesAdvanced_rmPQDq1inU

@SuperMaZingCoder
Copy link
Author

SuperMaZingCoder commented May 11, 2020

Those are the environment variables I have (that I am using for manim).

@Kasajizoo
Copy link

I'm having the exactly the same problem. Disrupted by the absence of some answer for this issue >:(

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

Try to add this file_list = "file:" + file_list line to the file manim/manimlib/scene/scene_file_writer.py at line number 289 just before the line movie_file_path = self.get_movie_file_path()

@Kasajizoo
Copy link

Kasajizoo commented May 12, 2020

Didn't work

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

look, it says DD:/Documents...etc but it should be D:/Documents..etc in [concat @ 000001a1d404bf80] Impossible to open 'DD:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00000.mp4'

Try to add this print("file::::::", partial_movie_files) line to the file manim/manimlib/scene/scene_file_writer.py at line number 284 just before the line with open(file_list, 'w') as fp:

After that show your output

@NavpreetDevpuri
Copy link
Contributor

and check you file D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt

this file may also contains wrong path DD:/Documents...etc instead of D:/Documents..etc

@olympic-games
Copy link

Followed the same tutorial and got the same error.
Did try print("file::::::", partial_movie_files) line to the file manim/manimlib/scene/scene_file_writer.py at line number 284 just before the line with open(file_list, 'w') as fp:
But got the same Traceback.

@olympic-games
Copy link

The path is correctly specified in the txt file

@jnhyjere
Copy link

I'm facing this issue too. Impossible to open it

@SuperMaZingCoder
Copy link
Author

@NavpreetDevpuri Followed those steps, but am still getting an error. Here is what was printed:

file:::::: ['D:\\Documents\\Coding\\Installations\\manim\\media\\videos\\example_scenes\\480p15\\partial_movie_files\\SquareToCircle\\00000.mp4', 'D:\\Documents\\Coding\\Installations\\manim\\media\\videos\\example_scenes\\480p15\\partial_movie_files\\SquareToCircle\\00001.mp4', 'D:\\Documents\\Coding\\Installations\\manim\\media\\videos\\example_scenes\\480p15\\partial_movie_files\\SquareToCircle\\00002.mp4']

@SuperMaZingCoder
Copy link
Author

Also tried it with pip install manimlib. Same error.

@NavpreetDevpuri
Copy link
Contributor

Also tried it with pip install manimlib. Same error.

This problem is with ffmpeg
Try to reinstall ffmpeg

@SuperMaZingCoder
Copy link
Author

@NavpreetDevpuri Alright, I'll try.

@SuperMaZingCoder
Copy link
Author

SuperMaZingCoder commented May 12, 2020

I reinstalled it and then tested it. Works fine when I test it but I get that error still when I try to use manim.

@SuperMaZingCoder
Copy link
Author

SuperMaZingCoder commented May 12, 2020

I looked at the error some and looked again at the part that said: FileNotFoundError: [WinError 2] The system cannot find the file specified: 'D:\\Documents\\Coding\\Installations\\manim\\media\\videos\\example_scenes\\480p15\\SquareToCircle.mp4' And, well, it definitely doesn't exist.

There is a folder within there called partial_movie_files and in there a folder called SquareToCircle. Inside of there, there are three mp4 files and a txt file. The files are:

  • 00000.mp4
  • 00001.mp4
  • 00002.mp4
  • partial_movie_file_list.txt

The .txt file just says:

file 'D:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00000.mp4'
file 'D:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00001.mp4'
file 'D:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00002.mp4'

I think this had something to do with what you might have been saying above.

@NavpreetDevpuri
Copy link
Contributor

This is a error due to ffmpeg somehow it takes sub files names from partial_movie_file_list.txt after that when it try to concat those videos to produce SquareToCircle.mp4 it shows error that sub files impossible to open because somehow it change the file paths from D:/Documents...etc to DD:/Documents...etc

@NavpreetDevpuri
Copy link
Contributor

try to run following command in cmd

ffmpeg -y -f concat -safe 0 -i D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt -loglevel error -c copy D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\output.mp4

After that it should create a file outpu.mp4 in folder D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\

@jnhyjere
Copy link

How, then, can we fix it? If we uninstall and reinstall but still pose the same problem.

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

After trying above command if it shows same error then i suggest you to post this issue about that command on stackoverflow mentioning that what your text file is containing and how it replace a single 'D' in path 'D:/Document..etc" to double 'DD' and showing error impossible to open 'DD:/Documents/....etc'
because this is a issue related to ffmpeg associate with specify system configuration

@SuperMaZingCoder
Copy link
Author

SuperMaZingCoder commented May 12, 2020

@NavpreetDevpuri I'll post a SO question like you said. I did:
ffmpeg -y -f concat -safe 0 -i D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt -loglevel error -c copy D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\output.mp4
and got:

[concat @ 0000021cf2ebbe80] Impossible to open 'DD:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00000.mp4'
D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt: Protocol not found
Did you mean file:D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt?

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

Try to change partial_movie_file_list.txt

file 'file:D:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00000.mp4'
file 'file:D:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00001.mp4'
file 'file:D:/Documents/Coding/Installations/manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle/00002.mp4'

After that run that command again

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

and try following command

ffmpeg -y -f concat -safe 0 -i file:D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt -loglevel error -c copy file:D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\output.mp4

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

and also try to reboot your system and run manim
because sometimes ffmpeg requires rebooting

@SuperMaZingCoder
Copy link
Author

I did the second to last command and there was no error.

@SuperMaZingCoder
Copy link
Author

(after I changed the .txt file to what you said). Should I try the last command as well?

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

try to run following command in cmd

ffmpeg -y -f concat -safe 0 -i D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt -loglevel error -c copy D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\output.mp4

After that it should create a file outpu.mp4 in folder D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\

Is that one works fine after changes in .txt file ?

@SuperMaZingCoder
Copy link
Author

SuperMaZingCoder commented May 12, 2020

I believe so, I typed in this:

ffmpeg -y -f concat -safe 0 -i D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\partial_movie_file_list.txt -loglevel error -c copy D:\Documents\Coding\Installations\manim\media\videos\example_scenes\480p15\partial_movie_files\SquareToCircle\output.mp4

and got a output.mp4 file in the manim/media/videos/example_scenes/480p15/partial_movie_files/SquareToCircle folder.

So, that is the one that worked after the changes to the .txt file.

@NavpreetDevpuri
Copy link
Contributor

NavpreetDevpuri commented May 12, 2020

Now change line number 288 in file manim/manimlib/scene/scene_file_writer.py from fp.write("file \'{}\'\n".format(pf_path)) to fp.write("file \'file:{}\'\n".format(pf_path))

after that try to run manim again

@SuperMaZingCoder
Copy link
Author

SuperMaZingCoder commented May 12, 2020

It worked! I think that it might have been on line 289, or that is from the fact that I tried your other changes before. So, is this worth me making a pull request for? Or should we I leave that for someone else that might know more about this?

@NavpreetDevpuri
Copy link
Contributor

i did #1057

@SuperMaZingCoder
Copy link
Author

Alright, thanks for all of your help. :D

@SuperMaZingCoder
Copy link
Author

I'll close the issue.

@jnhyjere
Copy link

Thank you very much @NavpreetDevpuri! I added the 'file:' into line 258 and it finally work for me as well. Thank you very much :)

@Kasajizoo
Copy link

Kasajizoo commented May 13, 2020

@NavpreetDevpuri I appreciate your help, thank you very much!

@ethiclesshacker
Copy link

Had the same issue thanks @NavpreetDevpuri

@lwzzzzzzzz
Copy link

thank you very much, it fixed my problem! @NavpreetDevpuri

@Alkl58
Copy link

Alkl58 commented May 14, 2020

There is a issue tracker now on ffmpeg: https://trac.ffmpeg.org/ticket/8674

@SuperMaZingCoder
Copy link
Author

Awesome! The pull request was merged. No one will be having this problem anymore (unless it gets fixed on ffmpeg and we then have to undo it).

@NavpreetDevpuri
Copy link
Contributor

I think, there will be no need to undo this because it will works fine even with file: and there is no problem with that.

@SuperMaZingCoder
Copy link
Author

SuperMaZingCoder commented May 16, 2020

Ah, that's good.

@NavpreetDevpuri
Copy link
Contributor

thank you very much, it fixed my problem! @NavpreetDevpuri

@lwzzzzzzzz why are you "so upset", is everything ok?
I just noticed ur status on Github.

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

8 participants