Author Topic: Encoding video (BD source)  (Read 2801 times)

Offline VaMPyR

  • Member
  • Posts: 8
    • View Profile
Encoding video (BD source)
« on: August 20, 2010, 09:04:51 AM »
Hello,

I am newbie in encoding thus sorry if my questions are stupid.

Last month I ripped ~ 160 BDs and kept only the main movie (average size: 25Go/film).
Now I will to encode them with x264 -> mkv container , store them on my NAS and read them with my popcorn hour (mediabox)

I read some informations here http://mewiki.project357.com/wiki/X264_Settings but i was wondering ->
sometimes i can see "When encoding for Blu-ray" DO ... (for exemple set --slices to 4). Should I use this ? (encoding for Blu-ray = encoding from BD source ?)

I thought using simply for exemple
Code: [Select]
x264 --preset slower --tune film --crf 16 --level 4.1but after seing profil

from ripbot
Code: [Select]
--crf 20 --level 4.1 --bframes 3 --ref 3 --aud --nal-hrd vbr --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --b-adapt 1 --b-pyramid none --subme 7 --aq-mode 1 --trellis 1 --partitions all --me umh
from Megui
Code: [Select]
--crf 20 --level 4.1 --bframes 3 --ref 4 --aud --nal-hrd vbr--vbv-bufsize 30000 --vbv-maxrate 40000 --slices 4 --b-pyramid strict --keyint 24 --min-keyint 2 --weightp 0 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --output "output" "input"
I was wondering what exactly I should use ?

Thanks

Offline atavarius

  • Member
  • Posts: 10
  • Grumpy.
    • View Profile
Re: Encoding video (BD source)
« Reply #1 on: August 20, 2010, 12:45:44 PM »
Code: [Select]
x264 --preset slower --tune film --crf 16 --level 4.1
Looks like it should be fine for Popcorn hour.

The settings in those profiles are whats needed for encoding video FOR a bluray disc not from it.

Offline VaMPyR

  • Member
  • Posts: 8
    • View Profile
Re: Encoding video (BD source)
« Reply #2 on: August 31, 2010, 08:25:40 AM »
Thanks for the answer but i have another question.

I made a test using preset placebo with a simple script avs (for cropping)

Code: [Select]
x264 --preset placebo --tune film --crf 18 --level 4.1 --output "W:\OCEANS.mkv" "D:\Videos\Blu Ray\tmp\OCEANS.avs"
Code: [Select]
DirectShowSource("D:\Videos\Blu Ray\tmp\OCEANS.m2ts", fps=23.976, audio=false, convertfps=true)
crop( 0, 138, 0, -138)

I have a quad core i750 o/c 3.8ghz and during the encodind i do not have CPU 100% all the time. Video decoder used = ffmpeg-mt h264 (ffdshow)
Where is the bottelneck ?

EDIT: with fastest preset (for exemple medium) i have always 100%
« Last Edit: August 31, 2010, 08:56:04 AM by VaMPyR »

Offline atavarius

  • Member
  • Posts: 10
  • Grumpy.
    • View Profile
Re: Encoding video (BD source)
« Reply #3 on: August 31, 2010, 11:33:41 AM »
I would guess avisynth is your bottleneck. Install an MT build of avisynth or for a simple script like that just use x264cli's filter system like so:

Code: [Select]
x264 --preset placebo --tune film --crf 18 --level 4.1 --vf crop:0,138,0,138 -o "output" "input"

Offline VaMPyR

  • Member
  • Posts: 8
    • View Profile
Re: Encoding video (BD source)
« Reply #4 on: September 01, 2010, 12:09:13 PM »
Thanks I tested without using avisynth: one question again (sorry): why vfr below ? Is this normal ? Mediainfo show for input -> Frame rate: 23.976 fps -> it should not be cfr ?

Quote
ffms [info]: 1920x1080p 1:1 @ 1846/77 fps (vfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 4.1

Should I add --force-cfr ? I think so ...
« Last Edit: September 03, 2010, 02:45:50 PM by VaMPyR »

Offline Forteen88

  • Member
  • Posts: 47
  • Didée-fan!
    • View Profile
Re: Encoding video (BD source)
« Reply #5 on: September 06, 2010, 11:56:00 AM »
Thanks I tested without using avisynth: one question again (sorry): why vfr below ? Is this normal ? Mediainfo show for input -> Frame rate: 23.976 fps -> it should not be cfr ?

Should I add --force-cfr ? I think so ...
What do MediaInfo say about that FPS?

Offline Blue_MiSfit

  • Member
  • Posts: 8
    • View Profile
Re: Encoding video (BD source)
« Reply #6 on: September 20, 2010, 09:32:52 AM »
That's a very odd frame rate. It seems to be a perversion of 24p :p

It looks like you're using DirectShowSource(***, fps=23.976, audio=false, convertfps=true), which should return a correct frame rate.

Clearly is isn't :P

A few options:

1) Remux M2TS to MKV first using eac3to, then load the MKV with DirectShowSource, DSS2 (I usually do this), or FFVideoSource
2) Keep the M2TS, but try using DSS2 or FFMS2
3) Tweak your DirectShow config to use different demuxer / decoder - one that will return the correct frame rate.
4) Add assumefps("ntsc_film") to your script.. this is risky though, because your audio could desync

Derek

Offline Desbreko

  • Member
  • Posts: 58
    • View Profile
Re: Encoding video (BD source)
« Reply #7 on: September 20, 2010, 04:03:26 PM »
FFMS is usually a bit off on the frame rate because it just takes an average from frame durations. (See this post.) If you know the source is supposed to be constant 23.976 fps, you can just set it in the MKV when you mux it.
« Last Edit: September 20, 2010, 04:25:17 PM by Desbreko »