View Full Version : How to convert x264 HD 25fps to 23.976fps
xxilikedirtxx
14th July 2006, 20:01
I have a x264 encode of a movie but it was encoded from a pal source, can some one explain to me(a novice) how to convert the 25fps to 23.976fps? Mostly I am trying to get rid of the speed up that occurs at the 25fps rate.... thanks in advance
Sharktooth
15th July 2006, 14:19
what's the container format?
In any case, you should demux and remux (to a new file) the audio and video streams with a new FPS value.
Subtitles may be a bit tricky...
Guest
15th July 2006, 14:31
I have a x264 encode of a movie but it was encoded from a pal source Is this rule 6 material?
http://forum.doom9.org/forum-rules.htm
Please explain.
xxilikedirtxx
18th July 2006, 11:18
Is this rule 6 material?
http://forum.doom9.org/forum-rules.htm
Please explain.
No I most definitly "OWN" 3 different versions of this movie
Butterfingers
21st July 2006, 15:15
To get rid of the speed-up of PAL sources you need only slow the material down to 24 frames per sec (which is about 4%).
23.976 fps uses NTSC's horrible pulldown techniques, but results in no speed up.
Or actually just change the fps number and adjust audio sample rate by that 4 % (in the container level) to get it done losslessly. However, then the audio pitch will not be correct (unless it was not pitch corrected when the PAL "conversion" was made), so you might want to use some pitch-correcting method or some program that slows down the audio accurately without changing the pitch.
Anyway, there's no need to do anything to the actual video content, only change the fps and slow down the audio track.
xxilikedirtxx
22nd July 2006, 16:58
i had no idea there was a pitch correction that was applyed to pal conversions, shows what I know.
nm: What program would you recommend?
jano22
22nd July 2006, 18:53
Besweet GUI (http://dspguru.notrace.dk/)
Mug Funky
25th July 2006, 17:32
as far as pitch correction goes, it's really a whim of whoever encodes the movie.
personally i don't do it, as it can only create artefacts. besides which, anyone out there with perfect pitch will no doubt also notice the tempo increase by the same amount - no timestretch can change that.
if you want to check what has been done on this particular movie, try find a song in it's soundtrack and compare it with the album version. pitch will be noticably different. that is if you have the song, which obviously is hardly ever the case :)
Undead Sega
8th April 2009, 23:53
is it possible to speed-up or slow down the actual .264 file, without reencode??
Trahald
9th April 2009, 00:11
h264info will take an elementary stream and change the framerate flag to what you want. it'll take a while (the stream is rewritten), but it will do it.
Atak_Snajpera
9th April 2009, 00:11
you can set frame rate directly in container (mkv or mp4)
You can also modify stream with this tool
http://www.videohelp.com/tools/H264info
Undead Sega
9th April 2009, 00:14
excellent, so with h264info, i can either have a new .264 (not h.264) file that is either slowed or sped-up according to the framerate, and being an entirely lossless process?
Chengbin
9th April 2009, 01:17
I'm confused. I thought frame rate was the number of frames per second. So a frame rate of 30 is 30 frames per second. How can you just slow it down?
For example, instead of playing a video at 25 frames per second, you can slow the playback speed down to 24 frames per second. When you do this, duration of the video (= total playback time) will increase by 4 %.
LoRd_MuldeR
9th April 2009, 01:26
The framerate is just a field in the file header. It can be changed easily to whatever you like. The video stream itself is not modified at all.
Then the player will simply play the video at the "new" framerate instead of the "old" one.
Of course changing the framerate while keeping the number of frames as-is will change the duration of the video and hence destroy audio/video sync.
If you want to keep the audio/video sync, the video needs to be resampled, which cannot be done without re-encoding...
Undead Sega
9th April 2009, 01:30
i just tried h264info, and added the framerate, which i discovered is a pulldown, and did not do the sped-up or slow down that i was mentioning or wanting to do.
all i am wanting to know if it is possible to either sped-up or slow down a .264 file without re-encode, because that introduces quality loss and take a hell of a long time.
anyone may i ask?
LoRd_MuldeR
9th April 2009, 01:34
all i am wanting to know if it is possible to either sped-up or slow down a .264 file without re-encode, because that introduces quality loss and take a hell of a long time.
A "raw" h.264 file doesn't contain framerate information! That information is added to the header when you mux the stream to a container, e.g. MP4 or MKV.
And as said before: Changing the framerate without re-encoding is possible. It simply changes one field in the header of the file.
But be aware that you change the duration of the video when you change the framerate, so the audio/video sync will be lost (given that it was good before).
Changing the framerate in a way that keeps the original duration requires re-encoding of the video stream...
Undead Sega
9th April 2009, 01:38
but when you mention, that it simply changes on field in the header of the file, isnt that pulldown? correct me if i am wrong.
i am wanting to change the framerate of a .264 file, which at the same time will do the same to the audio file, by timestretching it, done it with ac3's with success, therefore pulldown is not wat im looking for, just a subtle speed difference.
LoRd_MuldeR
9th April 2009, 01:44
but when you mention, that it simply changes on field in the header of the file, isnt that pulldown? correct me if i am wrong.
Nope. Pulldown is a flag used to implement "soft telecine". When the pulldown flag is set, the decoder will apply the 2:3 pulldown (http://en.wikipedia.org/wiki/Telecine#2:3_pulldown) at playback time.
For example if the video is encoded at 23.976 fps (progressive), then the pulldown flag will cause the video to be rendered at 29.97 fps (interlaced).
Still the pulldown flag can be ignored or removed in order to retain the original progressive frames...
Undead Sega
9th April 2009, 01:47
i am aware of the pulldown and softtelecine, i hae done it before for DVDs :D
so straight as it is, by adding the framerate in h264info, will that already adjust the speed of the .264 by creating a new one?
if so, then why is it, when i load it up in DGAVCIndex, i still get the original framerate as if the file hasnt been adjusted?
LoRd_MuldeR
9th April 2009, 01:53
Because the "raw" h.264 stream doesn't contain framerate information. Only when muxed into a container (MP4, MKV, M2TS, etc) there is a header that contains a framerate field.
Most applications simply assume 25 fps for "raw" h.264 stremas, unless you manually overwrite the framerate in that application.
If you are using DGAVCIndex/AVCSource, you can simply use AssumeFPS() in your Avisynth script to set up the framerate. No need to modify the source file for that...
Undead Sega
9th April 2009, 01:56
okay, i tired 25fps, and it strangely worked from 23.976, however, i am wanting to do 23.976 to 24p speedup on a .264 file which didnt result at all.
can this be done may i ask?
LoRd_MuldeR
9th April 2009, 02:01
okay, i tired 25fps, and it strangely worked from 23.976, however, i am wanting to do 23.976 to 24p speedup on a .264 file which didnt result at all.
can this be done may i ask?
You can set the framerate to whatever you want. Either when you mux your "raw" h.264 stream to some container (MP4, MKV, M2TS, etc) or by using AssumeFPS() in your Avisynth script.
But as said before: You can not change the framerate of your .264 file, as that's a "raw" stream which doesn't contain any framerate information. It's not possible to change something that isn't specified ;)
Undead Sega
9th April 2009, 02:04
But as said before: You can not change the framerate of your .264 file, as that's a "raw" stream which doesn't contain any framerate information.
therefore h264info creates a new file right?
but i am still confused, because the .264 reads in DGAVCIndex says it has a framerate of 23.976, and when i made a new file using h264info with a framerate of 24p, i took that file and opened it in DGAVCIndex which still reads it as 23.976. When i did it again briefly but for 25p, it somehow now sees it as 25p in DGAVCIndex. Why could this be happening may i ask? :(
LoRd_MuldeR
9th April 2009, 02:08
therefore h264info creates a new file right?
Not if it outputs a "raw" stream again :rolleyes:
If you want the framerate to be embedded in the file, use MKVToolnix to mux your .264 stream into a MKV container.
MKVToolnix will ask you to enter the desired framereate (and it defaults to 25 fps).
Undead Sega
9th April 2009, 02:10
okay, i am still not gettnig the clear message, when you change the framerate in h264info, does it adjust it by speed?
and i dont intend muxing is into a MKV, therefore i dont want a container to do the job, because if its done that way, and then its demuxed, i will get the original FPS.
LoRd_MuldeR
9th April 2009, 02:14
okay, i am still not gettnig the clear message, when you change the framerate in h264info, does it adjust it by speed?
I have no idea what h264info does. But if it operates on raw/elementary h.264 streams (without a container) it does not change the framerate, as such "raw" files do not contain a framerate field! You cannot change something that isn't there. Is it so hard to understand? The framerate of a "raw" h.264 file is simply unspecified and that's it...
Undead Sega
9th April 2009, 02:16
so what is it doing exactly when one is applying a new framerate, to which it outputs a new raw stream?
LoRd_MuldeR
9th April 2009, 02:19
so what is it doing exactly when one is applying a new framerate, to which it outputs a new raw stream?
Nothing!?
And why in the world are you trying to change the framerate of an elementary h.264 stream ???
It has been explained before: You can specify the framerate when muxing your elementary stream to some suitable container.
Also you can set the framerate in Avisynth via AssumeFPS() or ChangeFPS().
Undead Sega
9th April 2009, 02:21
so what is the point of the framerate option in h264info?
LoRd_MuldeR
9th April 2009, 02:26
so what is the point of the framerate option in h264info?
Ask the author of h264info ;)
It is possible to give a hint of the framerate with VUI timing information. x264 does it too:sps->vui.b_timing_info_present = 0;
if( param->i_fps_num > 0 && param->i_fps_den > 0)
{
sps->vui.b_timing_info_present = 1;
sps->vui.i_num_units_in_tick = param->i_fps_den;
sps->vui.i_time_scale = param->i_fps_num * 2;
sps->vui.b_fixed_frame_rate = 1;
}
Undead Sega
9th April 2009, 21:10
So, there is no way of speeding up or slowing down the rar stream itself? in accordance to the FPS?
LoRd_MuldeR
9th April 2009, 21:15
So, there is no way of speeding up or slowing down the rar stream itself? in accordance to the FPS?
Nope. You cannot speed up or slowdown the thing that doesn't have a speed associated with itself. And you also do not need to do this.
If you want your H.264 stream to play at a specific framerate, go and mux it to a suitable container. It's that easy!
Trahald
13th April 2009, 17:59
Ask the author of h264info ;)
there is a spot for framerate (see nm's post) and that is whats modified. its not a mandatory field which may be why some muxers ask for the frame rate. (since it cant be relied on to be there) h264info rewrites the bitstream and will always write a framerate in. i dont think ive seen any AVC files raw/contained that didnt contain something in this field.
vBulletin® v3.8.11, Copyright ©2000-2022, vBulletin Solutions Inc.