Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th November 2016, 03:18   #1  |  Link
forestcull
Registered User
 
Join Date: May 2016
Posts: 5
Variable frame video into constant frame x265

I've found that converting variable frame rate files into x265 constant frame always results in significant audio desync. I get this issue using both AviSynth and VapourSynth.

I've considered converting the variable frame file first into x264 constant at crf 0 but I don't consider that an effective solution moving forward for batch conversion. The temp file storage would be huge.

Has anyone figured out a way to convert variable into into constant frame x265 and avoid the audio desync?
forestcull is offline   Reply With Quote
Old 29th November 2016, 07:54   #2  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,436
To convert VFR to CFR:
a.) use VFR aware converter like VidCoder, HandBrake or ffmpeg
b.) in AviSynth or VapourSynth make a VFR->CFR conversion. For example in AviSynth:
Code:
a=ffaudiosource("source.mkv")
v=ffvideosource("source.mkv", fpsnum=24000, fpsden=1001) # example for 24/1.001 fps ~= 23.976 fps target
AudioDub(v, a)
sneaker_ger is offline   Reply With Quote
Old 29th November 2016, 16:16   #3  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 701
extract timecodecs from source file
encode as crf (not convert from vfr to crf)
apply timecodecs to new file when muxing into mkv
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 29th November 2016, 20:28   #4  |  Link
forestcull
Registered User
 
Join Date: May 2016
Posts: 5
Quote:
Originally Posted by sneaker_ger View Post
To convert VFR to CFR:
a.) use VFR aware converter like VidCoder, HandBrake or ffmpeg
b.) in AviSynth or VapourSynth make a VFR->CFR conversion. For example in AviSynth:
Code:
a=ffaudiosource("source.mkv")
v=ffvideosource("source.mkv", fpsnum=24000, fpsden=1001) # example for 24/1.001 fps ~= 23.976 fps target
AudioDub(v, a)
Thanks, I'll give this a shot.

Quote:
Originally Posted by Motenai Yoda View Post
extract timecodecs from source file
encode as crf (not convert from vfr to crf)
apply timecodecs to new file when muxing into mkv
I thought about trying this but it doesn't sound like a long term solution for batch conversions.
forestcull is offline   Reply With Quote
Old 3rd December 2016, 02:34   #5  |  Link
forestcull
Registered User
 
Join Date: May 2016
Posts: 5
a=ffaudiosource("%source_file%")
v=ffvideosource("%source_file%", fpsnum=24000, fpsden=1001)
AudioDub(v, a)

Changing the FFVideoSource filter script in StaxRip to this seems to do the trick for converting variable to constant but now the video never fully converts. It'll convert about half before the audio is dropped and only the audio remains.

Is there a command I'm missing?
forestcull is offline   Reply With Quote
Old 7th February 2017, 19:39   #6  |  Link
elahn
Registered User
 
elahn's Avatar
 
Join Date: Jan 2017
Posts: 4
In StaxRip, I'm clicking Filters -> Edit and inserting:
Code:
, fpsnum=25, fpsden=1
into the ffms2 Source. So the whole line reads:

Code:
clip = core.ffms2.Source(r"%source_file%", cachefile = r"%temp_file%.ffindex", fpsnum=25, fpsden=1)
This is for a VFR x264 (mkv) -> CFR x265 (mkv) conversion and is working perfectly. I'm using VapourSynth and I updated mkvextract & mkvmerge to the latest MkvToolNix, but I'm not sure that's relevant.
elahn is offline   Reply With Quote
Reply

Tags
constant, encoding, hevc, variable, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.