ffmpeg unknown keyword invalid data found when processing input

Question:

I have a file ffmpeg_list_of_files.txt with the content

and then run ffmpeg -f concat -i ffmpeg_list_of_files.txt -c copy output.mkv as is stated at

http://trac.ffmpeg.org/wiki/Concatenate

I, unfortunately, get the error

in Windows PowerShell in Windows 10.

What am I doing wrong?

Answer:

It’s an encoding problem I also got that I solved changing the file encoding.
Steps to solve it:

  1. Open the ffmpeg_list_of_files.txt with the notepad, notepad++ or similar
  2. Change the encoding to UTF-8 without BOM. To do it follow one of the next steps:
  • with windows notepad, this is done using the “save as…” option and at the bottom changing the encoding to “UTF-8” and press “save”
  • with notepad++ select “encoding” in the main menu and select “encoding with UTF-8 without BOM” and save the file after that

Names could change a little bit depending on the version, but following the steps it’s pretty straight forward.

Note: In my case, when redirecting ls or dir to a file in powershell, the default encoding of the file is USC-2

Source:

ffmpeg unknown keyword invalid data found when processing input by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply