Log in

View Full Version : Please help me speed up an mkv MPEG2 video by 4%


Adam Cole
2nd November 2018, 13:48
I have an MKV file ripped with MakeMKV straight from an NTSC DVD and I want to speed it up by 4% (doing a PAL Speedup). The lenght is 22:51. By doing a speed up, the lenght should decrease but it doesn't for me and I tried several approaches using AVISynth (there is always an error with this one), DGPulldown (didn't work), I even converted the file with Handbrake but the lenght still remained the same. I don't know what else I can do.

Below is the media info of the mkv file. It says the frame rate mode is variable. Not sure if that's important. Please help me.

Video
ID : 1
ID in the original source medi : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=12
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 22 min 51 s
Bit rate mode : Variable
Bit rate : 7 113 kb/s
Maximum bit rate : 9 800 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Frame rate : 23.976 (24000/1001) FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Scan order : 2:3 Pulldown
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.858
Time code of first frame : 01:02:04:10
Time code source : Group of pictures header
GOP, Open/Closed : Open
GOP, Open/Closed of first fram : Closed
Stream size : 1.14 GiB (94%)
Language : English
Default : No
Forced : No
Color primaries : BT.601 NTSC
Transfer characteristics : BT.601
Matrix coefficients : BT.601

tormento
2nd November 2018, 14:09
I have an MKV file ripped with MakeMKV straight from an NTSC DVD and I want to speed it up by 4%
You can try to feed to MKVToolnix and set the wanted "speed" there.

Adam Cole
2nd November 2018, 14:22
You can try to feed to MKVToolnix and set the wanted "speed" there.

Where is the speed parameter?

videoh
2nd November 2018, 15:15
DGPulldown (didn't work) That's because DGPulldown is neither designed nor intended to speed up video.

huhn
2nd November 2018, 15:30
https://forum.doom9.org/archive/index.php/t-133338.html

assumeFPS(25)

and since the playback is speeded by about 4% (25/23.976) the audio must be stretched using the following avisynth command:

timestretch(tempo=25.0 * 100 / 23.976)

you should look up a better version with pitch correction.

the variable part can be problematic. but if the media information are correct this file is softtelecine and just loading it into avisynth should turn it into a perfectly progressive file but i personally never trust stuff like this.

manono
3rd November 2018, 09:23
DGPulldown (didn't work...

It wouldn't, on an MKV. Extract the M2V either from the VOB or from your MKV using MKVToolNix and then run that M2V through DGPulldown with the "Custom" box ticked and set for 25->25.

This assumes your DVD really is all soft telecined (encoded as progressive 23.976fps). You'll have to speed up the audio before muxing them back together into MKV or MPG or whatever.

SeeMoreDigital
3rd November 2018, 10:33
With regard to the elementary MPEG-2 video stream, what I have often done is: -

Remove the 3:2 pull-down flag (various applications such as TSmuxer GUI can do this).

Run the elementary MPEG-2 (.m2v) stream through an (very old) application called ReStream v0.9.0 and set the new/required frame-rate

https://i.imgur.com/c5zrfSw.png

As you can see there are many options to tweak an MPEG-2 streams properties

Adam Cole
4th November 2018, 14:35
Ok, so in MKVtoolNix under 'Timestamps and default duration' I set 'Default Duration/FPS' to 25p and that did seem to do the trick. No AviSynth or DGPulldown necessary. Audio I sped up with audacity using the 'Change Tempo' effect. Muxed everything together and voila. Was it really that easy or did I miss something?

Anyways, now that the video is 4% faster, the timestamps of the chapters are wrong. Is there a tool that can correct this automatically?