jrottenberg / ffmpeg

Docker build for FFmpeg on Ubuntu / Alpine / Centos / Scratch / nvidia / vaapi
https://hub.docker.com/r/jrottenberg/ffmpeg/
Apache License 2.0
1.43k stars 462 forks source link

How to use multipass #118

Open r8code opened 6 years ago

r8code commented 6 years ago

Does anyone know to use multipass with this docker ? Thx

jrottenberg commented 6 years ago

multistage ?

What are you trying to do with multistage ?

r8code commented 6 years ago

sorry I mean I want to do 2-pass : ffmpeg -i < input > -c:v libx264 -b:v 1M -pass 1 -f mp4 /dev/null ffmpeg -i < input > -c:v libx264 -b:v 1M -pass 2 < output >.mp4 how to do it ? thx

jrottenberg commented 6 years ago

That seems correct what issue do you have ? can you paste the command with docker. I can help support on the image integration not really ffmpeg

r8code commented 6 years ago

srry for late reply , I can't do this : $ docker run jrottenberg/ffmpeg -i < input > -c:v libx264 -b:v 1M -pass 1 -f mp4 /dev/null $ docker run jrottenberg/ffmpeg -i < input > -c:v libx264 -b:v 1M -pass 2 < output >.mp4

since it become 2 different container I mean how to achive two pass ffmpeg with ffmpeg inside docker ? thx again

jrottenberg commented 6 years ago

yeah you need to mount a volume for both container to keep the state file visible, first command will create it , second will read from it:

docker run -v $(pwd):/var/tmp jrottenberg/ffmpeg should do the trick, make sure you use the same path for both.

r8code commented 6 years ago

thx for the reply

jbeere commented 5 years ago

For this method you would also need to add -passlogfile /var/tmp/<prefix> to both commands.

This will persist the log files for sharing between the executions

r8code commented 5 years ago

Thx , I end up with --entrypoint "/bin/bash" jrottenberg/ffmpeg -c "ffmpeg ... ffmpeg ... "