2013-12-08, 14:07
Hi,
I've been developing a little script to stack my movies:
My problem is that when I call ffmpeg to concat part movies with Popen, and when process finishes, I have to CTRL+C to return to cmd prompt.
This is my script: stackit.py
It searches movies folder and builds an dictionary like ['movie.a',('movie.a.cd1.avi','movie.a.cd2.avi','movie.a.cd3.avi')]
for every movie folder with part movie files.
Movie folder structure:
It then writes each movie parts to <movie>.txt to feed ffmpeg concat command.
My problem is that it only runs successfully with Popen(ffmpeg_command) but it won't return to cmd prompt. It just hangs.
I can't run it with or
If I try to get output/erros like
it also fails.
With these command it always fails with
It seems it fails to read my txt, perhaps because of single backslash?
Can anyone help me with this?
Thanks
I've been developing a little script to stack my movies:
Code:
input: movie.cd1.avi | movie.cd2.avi | ...
output: movie.avi
My problem is that when I call ffmpeg to concat part movies with Popen, and when process finishes, I have to CTRL+C to return to cmd prompt.
This is my script: stackit.py
It searches movies folder and builds an dictionary like ['movie.a',('movie.a.cd1.avi','movie.a.cd2.avi','movie.a.cd3.avi')]
for every movie folder with part movie files.
Movie folder structure:
Code:
C:\Movies
----Movie.A
------Movie.A.CD1.avi
------Movie.A.CD1.avi
It then writes each movie parts to <movie>.txt to feed ffmpeg concat command.
My problem is that it only runs successfully with Popen(ffmpeg_command) but it won't return to cmd prompt. It just hangs.
I can't run it with
Code:
call(ffmpeg_command)
Code:
check_output(ffmpeg_command)
If I try to get output/erros like
Code:
ffmpeg = Popen(ffmpeg_command, stdout=STDOUT, stderr=STDOUT)
(out, err) = ffmpeg.communicate()
With these command it always fails with
Code:
e:\Test\1941.(1979).txt: Invalid data found when processing input
It seems it fails to read my txt, perhaps because of single backslash?
Can anyone help me with this?
Thanks