How about multi-pass encoding for H264?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How about multi-pass encoding for H264?

babyboy8989
Now I use 2-pass X264 encoding to transcode videos to flv format.


Someone told me that 4-pass will reduce the size of the output file.


Is that true?


I searched much material, but found nothing useful!


How can I use 4-pass encoding.


Does any one know?


Thank you !
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: How about multi-pass encoding for H264?

Lou Logan
On Thu, 8 Aug 2013 10:25:19 +0800
"韩瑞松" <[hidden email]> wrote:

> Now I use 2-pass X264 encoding to transcode videos to flv format.

Are you sure you need to perform more than one pass? Normal bitrate
based two-pass mode is generally used if you are targeting a specific
output file size. Otherwise you can use one pass with -crf. For
examples using both methods see:

https://trac.ffmpeg.org/wiki/x264EncodingGuide

> Someone told me that 4-pass will reduce the size of the output file.

Then wouldn't 8-passes be even better?
 
> Is that true?

Anything over two passes is a waste of time with few exceptions. See:

<http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html#menc-feat-x264-encoding-options-misc-preferences>

> How can I use 4-pass encoding.

ffmpeg -y -i input -pass 1 … output
ffmpeg -y -i input -pass 2 … output
ffmpeg -y -i input -pass 3 … output
ffmpeg -y -i input -pass 4 … output

ffmpeg -y -i input -pass 256 … output
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

回复: How about multi-pass encoding for H264?

babyboy8989
Thank you Lou.


FFmpeg -pass only has 1 or 2 is valid.


I just want to know about the multi-pass encoding and prove that method!




------------------ 原始邮件 ------------------
发件人: "Lou"<[hidden email]>;
发送时间: 2013年8月8日(星期四) 上午10:40
收件人: "ffmpeg-user"<[hidden email]>;

主题: Re: [FFmpeg-user] How about multi-pass encoding for H264?



On Thu, 8 Aug 2013 10:25:19 +0800
"韩瑞松" <[hidden email]> wrote:

> Now I use 2-pass X264 encoding to transcode videos to flv format.

Are you sure you need to perform more than one pass? Normal bitrate
based two-pass mode is generally used if you are targeting a specific
output file size. Otherwise you can use one pass with -crf. For
examples using both methods see:

https://trac.ffmpeg.org/wiki/x264EncodingGuide

> Someone told me that 4-pass will reduce the size of the output file.

Then wouldn't 8-passes be even better?
 
> Is that true?

Anything over two passes is a waste of time with few exceptions. See:

<http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html#menc-feat-x264-encoding-options-misc-preferences>

> How can I use 4-pass encoding.

ffmpeg -y -i input -pass 1 … output
ffmpeg -y -i input -pass 2 … output
ffmpeg -y -i input -pass 3 … output
ffmpeg -y -i input -pass 4 … output

ffmpeg -y -i input -pass 256 … output
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: How about multi-pass encoding for H264?

Phil Rhodes
In reply to this post by Lou Logan
> Someone told me that 4-pass will reduce the size of the output file.


Not so much smaller, but... more accurately constrained to the target bitrate, right?


P
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: How about multi-pass encoding for H264?

babyboy8989
Yes,I think so.


But How can I implement the 4-pass encoding?Any one knows?
I want to prove this idea.




------------------ Original ------------------
From:  "Phil Rhodes"<[hidden email]>;
Date:  Thu, Aug 8, 2013 07:47 PM
To:  "FFmpeg user questions"<[hidden email]>;

Subject:  Re: [FFmpeg-user] How about multi-pass encoding for H264?



> Someone told me that 4-pass will reduce the size of the output file.


Not so much smaller, but... more accurately constrained to the target bitrate, right?


P
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: How about multi-pass encoding for H264?

thljcl


If the encoding speed is not your main concern, I do recommend CRF over multi-pass encoding.