FFMPEG cannot read filename that contains "..."

Asked

Viewed 22 times

0

I have a problem reading videos that contain two or more "." points followed in the name of one of the folders or in the name of the video itself. Ex: C://pasta 1/pasta 2/meuvideo1... parte2.ts. The problem is that he "understands" the path as being parte2.ts, i.e., it reads only after the 2 points.

I read about Quoting and Escaping from Ffmpeg and tried the following:

  1. I tried to replace "..." to "' . . '" getting thus: C://pasta 1/pasta 2/meuvideo1'\.\.\.' parte2.ts

  2. I also tried to replace ".." to "' . '." by getting thus: C://pasta 1/pasta 2/meuvideo1'\.\.'. parte2.ts

  3. I also tried to replace ".." to "' .. '." thus: C://pasta 1/pasta 2/meuvideo1'\..'. parte2.ts

None worked all continued with the same error:

[Concat @ 000001c1d661e3c0] Impossible to open ' Parte2.ts' Links.txt: No such file or directory.

I’m creating a Links.txt file where I saved all the video tracks to be joined by ffmpeg. Just remembering that both the name of the videos that are in the Links.txt file, and the output name have the three dots.

with  open(out_link_file, mode='w', encoding='UTF-8') as Link_file:
            for line in file:
                if "'" in line:
                    line = line.replace('\'', r"'\''")
                if ".." in line:
                    line = line.replace('..', r"'\.\.'.")
                Link_file.write(f'file \'{line}\' \n')
        


    subprocess.run(f'ffmpega.exe -hide_banner -loglevel error  -f concat -safe 0 -i "Links.txt" -c copy -y "{outfolder}"')
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.