using ffmpeg command line with python's subprocess module
rosuav at gmail.com
Fri Dec 6 15:59:43 CET 2013
On Sat, Dec 7, 2013 at 1:54 AM, iMath <redstone-cold at 163.com> wrote:
> fp.write(("file '"+fileName1+"'\n").encode('utf-8'))
> fp.write(("file '"+fileName2+"'\n").encode('utf-8'))
> subprocess.call(['ffmpeg', '-f', 'concat','-i',fp.name, '-c', 'copy', fileName])
You need to close the file before getting the other process to use it.
Otherwise, it may not be able to open the file at all, and even if it
can, you might find that not all the data has been written.
But congrats! You have successfully found the points I was directing
you to. Yes, I was hinting that you need NamedTemporaryFile, the .name
attribute, and delete=False. Good job!
More information about the Python-list