Log in

View Full Version : 24p Flag for x264 encoded files possible ?


LOGiC
26th July 2008, 14:25
@all,

I have a Panasonic DMP-BD30 standalone blu-player where I sometimes use to see AVCHD discs. I can set the player output to 24p, but it will of course just output 24p if it's as an information (a flag ?) in the stream, so it will output BluRay with 24p, nothing else. My question is, if anyone around knows how the information of 24p is on a BluRay disc and if there is any chance to edit a re-encoded x264 in the same way to tell the standalone to output 24p for this stream.

Thanks in advance.

Guest
26th July 2008, 14:29
In AVC, PIC timing SEIs are used to signal soft pulldown.

If you have encoded it as hard telecined, it's too late to do anything about that.

LOGiC
26th July 2008, 14:56
If I hadn't encoded it yet or for future encodes, what exactly would I have to do ?

Guest
26th July 2008, 16:17
There's a patch of x264.exe that supports soft pulldown.

LOGiC
26th July 2008, 16:31
Thank you Neuron2.

Can you please help me finding the right patch ?

Thanks,
Andy.

Sharktooth
27th July 2008, 03:06
if you use megui the x264 build that comes with it has the patch included.
however the latest version of the patch is somewhere in the x264 patches thread. (https://forum.doom9.org/showthread.php?t=130364)..

LOGiC
27th July 2008, 13:36
Thank you guys for the information. I will do some testing, but it might not be the thing I am looking for. Doing a 3:2 pulldown on the stream means that there still will be stutters at slow camera movements. I was looking for a way to tell the standalone, that he should output this x264 at 24p because he finds the information somewhere in the stream.

Guest
27th July 2008, 13:59
The point is that your player can see that it is soft pulldown and then ignore it. You cannot ignore hard pulldown.

Can't you just encode it at 24fps?

LOGiC
27th July 2008, 17:18
The point is that your player can see that it is soft pulldown and then ignore it. You cannot ignore hard pulldown.

Can't you just encode it at 24fps?

Neuron, I would like to directly encode it to 24fps, to do some further testing, but something seems to be strange, maybe you can help me there. I opened the movie in meGUI using Avysinth-Script Generator and then I changed the fps from 23,976xxxxx fps to 24.00 fps. After finishing reencoding TSMuxer told me it was 24fps but when trying to stretch the audio track from 23,976fps to 24fps I noticed it was out of sync. When I tried the "24fps" H264 with the 23,976fps audio track it was absolutely sync, so, he didn't encode with 24fps, just changed the header probably.

Any idea how I could do it for some testings ?

Thanks in advance.

Andy.

lexor
27th July 2008, 17:29
Neuron, I would like to directly encode it to 24fps, to do some further testing, but something seems to be strange, maybe you can help me there. I opened the movie in meGUI using Avysinth-Script Generator and then I changed the fps from 23,976xxxxx fps to 24.00 fps. After finishing reencoding TSMuxer told me it was 24fps but when trying to stretch the audio track from 23,976fps to 24fps I noticed it was out of sync. When I tried the "24fps" H264 with the 23,976fps audio track it was absolutely sync, so, he didn't encode with 24fps, just changed the header probably.

Any idea how I could do it for some testings ?

Thanks in advance.

Andy.
First, it sounds like you replaced fps=xxx in DirectShowSource() (or whatever input you used), instead of using ChangeFPS().
Second, 23.976 is 24, 24 is simply a common name so that people do not have to remember decimals. Still MeGUI puts way to many numbers after the decimal point (some players don't like that), change it to read fps=23.976. Just get a build with hrd patch and make sure the switch is on (so just stick to blu-ray profile and x264 build in megui)

Guest
27th July 2008, 18:13
First, it sounds like you replaced fps=xxx in DirectShowSource() (or whatever input you used), instead of using ChangeFPS(). You want to ensure that your AVS script delivers the right frame rate, but ChangeFPS() is not necessarily the right way to do it. If your source is telecined film, for example, then you would IVTC it.

lexor
27th July 2008, 20:30
yeah sorry, I didn't mean to claim that changefps is the universally correct solution, just that altering fps=xxx to something other than the correct string is universally a bad thing.

Sharktooth
28th July 2008, 02:17
the correct number for 24 FPS is a fraction: 24000/1001. MeGUI does a precise calculation and tries to respect that fraction as close as possible with a floating point. if "cheap" players cant handle it then it's coz of their crappiness.

LOGiC
28th July 2008, 06:21
My Panasonic can handle this easily. I noticed that the reason for being a bit jerky was, that I did too high values for some things to be AVCHD compliant. Looks good now ;-)

Andy.

G_M_C
28th July 2008, 12:11
I've got the same player, and i've allready made some AVCHD's for it. Let me tell you this: It will only work correctly is you AVCHD-disk is exactly according to AVCHD-specs, the BD30 is very picky about that. See here: http://www.avchd-info.org/format/index.html

This means that you video & audio have to be @ 24.000 fps (not the 23,976 that is "spoken of as 24 fps", but the real thing. 23,976 didnt give image on my player, but sound worked :/ ).

Momentarily it is easiest to use AviSynth & Soundout to convert your video & audio. Make a script importing both video & audio, and then put "AssumeFPS (24,1,true)" and put in SSRC (xxxxx) (xxxxx=samplerate, examine original audio-stream to find out). Follow these by your sound-out command.

For the video-only version of this same scrip, just comment out the SoundOut (with #). And encode this @ 24.000 fps, and level 4.1 specs; Also watch the min/max vbv-buffer options (see the AVCHD-specs I posted earlier).

Sharktooth
28th July 2008, 12:27
another reason why blu-ray sux.
however by default megui encodes at source FPS.

G_M_C
28th July 2008, 12:36
I've recently seen/discovered 1 exeption to this;
I had a capped TV-show, that was 1080i AVC but stream-info gave 1920x1088i / 25 fps. According to those specs i've posted this should not have worked, but when muxed directly (without transcoding, muxing done in TSMuxer) it worked fine.

Next on my list is authoring "real" full Blu-ray specification BD's, but with max file-size =< DVD-9. See if those work.

Sharktooth
28th July 2008, 12:39
if you're going to burn the file to a DVD (as AVC-HD for example), it wont work. Even if the player acceps and try to play it (which i highly doubt) blu-ray specs have higher buffers (and tranfer rates at a minimum of 54mbps) than AVC-HD and the DVD cant sustain the speed to keep the buffer full.

G_M_C
28th July 2008, 12:48
if you're going to burn the file to a DVD (as AVC-HD for example), it wont work. Even if the player acceps and try to play it (which i highly doubt) blu-ray specs have higher buffers (and tranfer rates at a minimum of 54mbps) than AVC-HD and the DVD cant sustain the speed to keep the buffer full.

Even if i set the vbv-buffers to 18mbps (including audio), the max rate for DVD according to the specs i posted ?

I take the 18 Mbps subtract the audio-transferrate, rounded down to next Mbps. For instance: 18 Mbps minus 1.5 Mbps DTS == VBV @ 16Mbps. That works fine with the AVCHD's i make now.

Sharktooth
28th July 2008, 13:14
then that's AVC-HD compliant

LOGiC
28th July 2008, 16:43
@guys,

this stuff is driving me totally crazy.

@Sharktooth I've seen that in your presets the values for Standalone AVCHD for VBV Buffer Size and VBV Max. Bitrate vary. How can I calculate which values are optimal for me for VBV Buffer Size and for max. Bitrate, what is this dependent from ?

Thanks.

Sharktooth
28th July 2008, 17:15
the combined audio/video max bitrate is specified in the specs (18Mbps for DVD media). i had lowered it a bit (16.5Mbps) to make space for the audio too (1.5mbps will be enough for at least 3 ac3 tracks or 1 HQ DTS track).
the buffer size, is not specified but set it like the max bitrate a d slightly smaller value to stay safe.

LOGiC
29th July 2008, 08:24
@Sharktooth

Thank you Sir, I will go with these options for another big re-encode in a couple of days.

@G_M_C

I've done some more testings yesterday (as I already did in the days before) and made some improvements. I am not sure, when my wife will start destroying my computers as I definately spend more time with them :-(

I've re-encoded something using AssumeFPS (24, 1, false) and did stretch the audio from 23,976fps to 24,00fps by myself. In direct comparison of two similar encoded files, one with 23,976, one with 24p on the Panasonic, the 24p one definately was smoother. The one with 23,976 was ok as welll, but in some scenes with very slow camera movements there definately was visible stutter, at 24p I didn't recognize this, even if it wasn't the same smooth movement as Blu-Rays do have.

Unfortunately the 23,976fps re-encode had 240/24 and the 24p one 24/1 keyframe int/GOP. Last night, I did another 24p reencode with 240/24, for my last testings.

I don't see any difference on the LCD between 240/24 and 24/1.

G_M_C
29th July 2008, 08:46
@Sharktooth

Thank you Sir, I will go with these options for another big re-encode in a couple of days.

@G_M_C

I've done some more testings yesterday (as I already did in the days before) and made some improvements. I am not sure, when my wife will start destroying my computers as I definately spend more time with them :-(

I've re-encoded something using AssumeFPS (24, 1, false) and did stretch the audio from 23,976fps to 24,00fps by myself. In direct comparison of two similar encoded files, one with 23,976, one with 24p on the Panasonic, the 24p one definately was smoother. The one with 23,976 was ok as welll, but in some scenes with very slow camera movements there definately was visible stutter, at 24p I didn't recognize this, even if it wasn't the same smooth movement as Blu-Rays do have.

Unfortunately the 23,976fps re-encode had 240/24 and the 24p one 24/1 keyframe int/GOP. Last night, I did another 24p reencode with 240/24, for my last testings.

I don't see any difference on the LCD between 240/24 and 24/1.

I haven't played with keyframes yet; But did the file @ 23,976 produce an image ? Last time i tried it didn't in my player, the audio did btw. Might be a difference between the EU and US versions of the player (PAL vs. NTSC regions) ?

The key-frame set to 24/1 ("framerate / 1" more or less actually), is part of the Blu-ray specs. I've sicked to those settings, just to be shure it works.

It looks like there is more expirimenting to be done :)

But the stretching of the audio; I'll advise to do it with the same AviSynth-script, you'll be more shure about beeing in synch then !

Wednesday im going to see if i can trick the player into playing a AVCHD with DTS; I 'll make a video, as i make them now @ 24.000 (to be shure it works) and than mux in a DTS-track :P

LOGiC
29th July 2008, 09:03
I haven't played with keyframes yet; But did the file @ 23,976 produce an image ? Last time i tried it didn't in my player, the audio did btw. Might be a difference between the EU and US versions of the player (PAL vs. NTSC regions) ?

The key-frame set to 24/1 ("framerate / 1" more or less actually), is part of the Blu-ray specs. I've sicked to those settings, just to be shure it works.

It looks like there is more expirimenting to be done :)

But the stretching of the audio; I'll advise to do it with the same AviSynth-script, you'll be more shure about beeing in synch then !

Wednesday im going to see if i can trick the player into playing a AVCHD with DTS; I 'll make a video, as i make them now @ 24.000 (to be shure it works) and than mux in a DTS-track :P


@G_M_C

I got an image from the beginning on. All the time I tried to play 23,976 as AVHCD, I got an image. I sometimes tried with 4 or 5 ref. frames, but that seems to be way too much, went down to 3. I don't know if the slight stutters are normal when playing 23,976, but I don't think I will ever get the same smooth movements as I have with original blu-rays.

You don't need to worry about a DTS track, it works like a charm. When I am at home this evening, I will test the 24p at 240/24 and will see, if this is as smooth as yesterday, otherwise I will go back to 24/1. I don't think that there is a visible difference.

G_M_C
29th July 2008, 09:18
On framerates: 24/1 is smoother (on movies anyway) because it is the original rate it was filmed.

Hmmm, i'll expirement further; Cant remember how i found out it didnt work / what i did that led to my conclusion that it HAD TO BE 24.000 fps :confused: Seems the player is more versatile than i thought at first !

LOGiC
29th July 2008, 09:44
I will do some more testings as well. By the way, do you know if there is a way to put i.e. several episodes of something on one DVD as AVCHD in a way they can be chosen ?

For the 24p again, I am investigating for days already, but I am not able to find the core point I was looking for. Panasonic support told me that 24p would be just outputted if this was given as information in the stream. An Original Blu-Ray is encoded in 23,976fps, but it plays perfectly with 24p in the Panasonic, smoothest thing.

I believe that there somewhere must be a setting or a flag which tells the player about the 24p. I was looking for this, encoding a file as x264, setting this flag manually and enjoy smoothest 24p, but this should be hard to find.

Sharktooth
29th July 2008, 12:36
the filmed framerate (what ppl refers to 23.976) is in reality 24000/1001, so how can 24/1 be more smoother? any different value is a vulgar approximation.
the stuttering comes from framerate conversions you cant do anything about it except encoding at the source FPS or multiplr of it.

LOGiC
29th July 2008, 13:10
@Sharktooth,

I know that this sounds ridiculous to you, but I really had the feeling. My wife and me watched the same scene a couple of times and it gives more stutter at 24000/1001 than at 24/1. Is it possible that the bluray player outputs 24p ?

You said I can't do anything expect encoding at the source FPS, that's what I normally do, at 23,976fps. But it stutters and I feel that it stutters more as the usual slow camera movements.

Sharktooth, do you think it really could have do to something with my 24/1 and 240/24 testings, which could bringt more or less stuttering ? With the other settings I kept to your latest AVCHD-standalone presets, just changed RDO to 6, trellis to 2, ref.frames 3 and some other things.

BTW: Do you think there will be any visible difference in the keyframe int/GOP ?

Sharktooth
29th July 2008, 13:51
yes, it is possible since the BD standard do not support 23,976 FPS. i said you need to encode at the source FPS. if the source is 24 fps then encode it at 24 fps. so if the source is 23,976 dont encode it for blu-ray/AVC-HD. dont change the fps or in many cases you'll get stutters.

nm
29th July 2008, 14:09
the filmed framerate (what ppl refers to 23.976) is in reality 24000/1001, so how can 24/1 be more smoother?
The original filmed rate is usually 24.000 fps, and that is slowed down to 24000/1001 for NTSC-related video systems, or sped up to 25 fps for PAL. Blu-ray (and probably AVCHD too), support both 24 fps and 24000/1001 fps video, but AFAIK the latter is more common, probably because of the NTSC legacy in display refresh rates.

As to LOGiC's problem, apparently the player or the display is set to output at a multiple of 24.000 Hz rate instead of 1000/1001 rates. If 24/1 fps plays without stutter and there are no A/V sync problems, I would say that the source was 24/1 to begin with or the player does something funky.

LOGiC
29th July 2008, 14:10
yes, it is possible since the BD standard do not support 23,976 FPS. i said you need to encode at the source FPS. if the source is 24 fps then encode it at 24 fps. so if the source is 23,976 dont encode it for blu-ray/AVC-HD. dont change the fps or in many cases you'll get stutters.


Probably I just have some problems with the understanding of formats. As I do remember, BluRay discs always have 23,976fps and the player outputs 24. When you say that the BD standard does not support 23,976, I definately would need to encode all BD sources as 24p. Is this what you said ?

Sharktooth
29th July 2008, 14:18
that's what i meant. when the encode is 24000/1001 the BD player always outputs 24 FPS.
that should not create any problems but sometimes the fast pannings just require more FPS (30 or more).
directors and the camera ops should know that but they're not always up to the task.

LOGiC
29th July 2008, 14:25
@Shark,

ok, sorry for all the time you need to spend with my questions, but I like it when you reply so fast, thanks a lot for all this.

To summarize your word, best thing is to encode always with 24000/1001 ? That means I don't need to change anything as meGUI is precisely calculating 24000/1001 ?

Sharktooth
29th July 2008, 14:37
yes, source at that framerate may have stuttering pannings.
in that case you can speed up the framerate and interpolate some frames to mitigate the problem. but the actual solution is shot the film at higher framerate (60p for example) and ensure it will be kept for the final product or dont do fast pannings when you know the final product willl be 24p. obviosly that does not depend on you.