ffmpeg icon indicating copy to clipboard operation
ffmpeg copied to clipboard

How to use multipass

Open r8code opened this issue 6 years ago • 8 comments

Does anyone know to use multipass with this docker ? Thx

r8code avatar Sep 19 '18 11:09 r8code

multistage ?

What are you trying to do with multistage ?

jrottenberg avatar Sep 19 '18 16:09 jrottenberg

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

r8code avatar Sep 20 '18 05:09 r8code

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

jrottenberg avatar Sep 22 '18 05:09 jrottenberg

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

r8code avatar Sep 24 '18 06:09 r8code

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.

jrottenberg avatar Sep 24 '18 16:09 jrottenberg

thx for the reply

r8code avatar Sep 25 '18 04:09 r8code

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

jbeere avatar Jul 14 '19 07:07 jbeere

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

r8code avatar Jul 15 '19 04:07 r8code