Open wabiloo opened 4 years ago
yes
compile
does the job
import ffmpeg
inp = ffmpeg.input('video.mkv').trim(start=0, end=3).output('output.avi')
print(inp.compile())
['ffmpeg', '-i', 'video.mkv', '-filter_complex', '[0]trim=end=3:start=0[s0]', '-map', '[s0]', 'output.avi']
yes
compile
does the jobimport ffmpeg inp = ffmpeg.input('video.mkv').trim(start=0, end=3).output('output.avi') print(inp.compile())
['ffmpeg', '-i', 'video.mkv', '-filter_complex', '[0]trim=end=3:start=0[s0]', '-map', '[s0]', 'output.avi']
How can this fluent form to be compiled?
(ffmpeg .input(file) .filter('fps', fps=25, round='up') .output(outputFile, map=0, video_size='hd720', c='copy', {'c:a': 'ac3'}, {'c:v': 'libx264'}) .overwrite_output() .run() )
Another question please: 'Matroska preset = slow 'can be set in ffmpeg-python?
@xcom169 you can do
inp = (ffmpeg
.input(file)
.filter('fps', fps=25, round='up')
.output(outputFile, map=0, video_size='hd720', c='copy', **{'c:a': 'ac3'}, **{'c:v': 'libx264'})
.overwrite_output()
)
print(inp.compile())
inp.run()
If i use ffmpeg-python to create my configuration, is there a way to output what the equivalent ffmpeg command would be? (as a way to be able to troubleshoot my configuration)