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

Created on 11 May 2020  路  43Comments  路  Source: 3b1b/manim

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

Most helpful comment

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

All 43 comments

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

SystemPropertiesAdvanced_rmPQDq1inU

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

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

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()

Didn't work

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

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

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.

The path is correctly specified in the txt file

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

@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']

Also tried it with pip install manimlib. Same error.

Also tried it with pip install manimlib. Same error.

This problem is with ffmpeg
Try to reinstall ffmpeg

@NavpreetDevpuri Alright, I'll try.

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.

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.

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

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\

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

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

@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?

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

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

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

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

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

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 ?

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.

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

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?

Alright, thanks for all of your help. :D

I'll close the issue.

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

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

Had the same issue thanks @NavpreetDevpuri

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

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

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).

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.

Ah, that's good.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samsamson33 picture samsamson33  路  5Comments

lucyliu2016 picture lucyliu2016  路  6Comments

purusharths picture purusharths  路  4Comments

Glidos picture Glidos  路  5Comments

WeiruLin picture WeiruLin  路  5Comments