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. |
3rd December 2018, 07:19 | #21 | Link | |||
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,255
|
Quote:
a. line for each frame b. each line shows when to start displaying the frame in 'ms' if the video is cfr (and isn't interlaced or telecined) the difference between the timestamps should ideally be constant. Seeing that the timestamp differences between frames just switch between 33 and 34, I would drop the time codes. To do that: a. extract video using mkvextract b. extract audio using mkvextract c. multiplex audio&video using mkvmerge (make sure to set your frame rate during this step) this way you dropped all time codes, if the multiplexed content plays fine/synch your content is cfr. Quote:
Quote:
Question is what you are comparing, I thought you compared one file in different players, not a file and it's reencode. Cu Selur |
|||
4th December 2018, 00:43 | #22 | Link |
Registered User
Join Date: May 2015
Posts: 14
|
I did that but nothing is in synch... only the MediaCoder is helping me there restoring framerates to 30000/1001 and the audio is in sync though it's stuttering sometimes. Gah, I don't really know how to sync will have to read more when I will have more time.
One last question: I put my original DVD .vob file into GSpot and it says (pics/s and frames/s = 29.97, progressive). When I look at the file it's 3:2 or 4:1 pulldown? I don't know how you call it... this is what happens: https://files.tinypic.pl/i/00975/9ug3t40a28sb.jpg What settings should I use to encode it and plugins? What to choose in DGIndex (honor flags, force film or the other one?). PS. What will happen when I encode the video trough x264 with audio then save frames as images run batch file resizer and encode them again with same settings and copying audio? I will have problems with sync? What to do if so? Last edited by Blovesx; 4th December 2018 at 07:13. |
4th December 2018, 18:28 | #23 | Link | |||||||
Registered User
Join Date: Mar 2011
Posts: 4,821
|
Quote:
When VFR is decoded as constant frame rate without converting it, the frames, which would display for different durations, display with the same duration (usually the average), changing the audio sync. Decoding while converting to CFR adds (or drops) frames to keep the frame rate constant, but the original frames should stay (roughly) in the same place, so the audio sync shouldn't change. Edit: I just notice you're applying the frame rate conversion to a raw .h264 stream. I've no idea if a raw stream retains the VFR timecode information. I've only used the frame rate conversion method with an MKV as the source. It should work for MP4 though. From what you've said it appears to be working, but I've never done it that way. Likewise, I'm not sure if you'd be able to index a raw.h264 and have FFVideoSource write the correct VFR timecodes. Someone else may know. Quote:
Quote:
TFM().TDecimate() can be used to convert "hybrid" video to a single constant frame rate (see the Hybrid option in the TDecimate help file), but it involves adding or dropping frames using frame blending. Often that's okay, as sources are often mostly one frame rate or the other, and back in the Xvid/AVI days they had to be CFR. Encoding as VFR avoids any conversion though (in theory the output ends up being a combination of two different constant frame rates). I live in PAL land but these days I'd encode any "hybrid" NTSC DVD as VFR. That can also be done with TFM().TDecimate(). It requires 2 passes, but read the help file and if you can't make it work ask for help here. It's not hard once you know how to do it, although I use MeGUI to make it a bit easier. Quote:
Quote:
For TV/limited range the luminance levels are 16-235, where 16 is black and 235 is white. Pretty much all video is limited range. Keep it that way. When playing video on a PC, a player (or your video card) should expand the limited range levels to full range. TVs expect limited range (although it can often be changed for when they're connected to PCs etc). These days, some PC monitors default to limited range for the HDMI inputs, even though PCs are traditional full range. The LCD monitor I bought a while back defaults to limited range. VGA and DVI inputs should always be full range. Color primaries and TV/PC range are two different things. You can convert between TV and PC range with Avisynth. ColorYUV(Levels="PC->TV") but don't unless you know you need to. The x264 --range option has no effect on how the video is encoded, it just provides information on how it should be decoded. You don't need to bother setting it at all. Quote:
Quote:
I always remux as MKV and extract the timecodes myself if necessary, but to get ffms2 to do it while indexing it should be: FFVideoSource("D:\Video.mp4", timecodes="D:\VideoTimcodes.txt") Once the indexing is done, it might pay to remove the timecodes option. I'm not sure if ffms2 would keep over-writing it otherwise. --tcfile-in is just another x264 command line option. ie --level 4.1 --preset slow --tune film --crf 18.0 --tcfile-in "D:\VideoTimcodes.txt" If x264 rejects the timecodes file, open it with notepad and check to see it says this at the top # timecode format v2 If it says # timestamp format v2 change it. The format name was changed (at least for mkv) a while back and the last time I tried it, x264 wouldn't recognise "timestamp". Last edited by hello_hello; 5th December 2018 at 08:56. |
|||||||
7th January 2019, 22:56 | #24 | Link |
Registered User
Join Date: May 2015
Posts: 14
|
Hello,
I'm back with a 2 questions but first regarding your post hello_hello I did tried to encode into CFR using timestamps but the outcome wasn't good I mean the audio was out of sync not sure if I encoded .raw video or .mp4. I will try to sync the audio somehow later on using timestamps again on .mkv file but for now I will leave the trouble makers (VFR files) because I'm stuck with other important things. First - My goal is to achieve all video encodes to be 1280x720p (16:9). I have right now mostly a lot of NTSC anamorphic DVDs with 720x480 resolution. Videos without anything to crop I'm leaving to encode as it is using SAR 1:1 in x264 settings not sure if I'm doing it right. What to do if I have to crop videos like the one I have right now by 8 px from left and right. How should I approach this file? I don't really know how to calculate the resizing... even though I'm using AvsPmod and resizing calculator (my videos are 3:2 sar, 32:27 par, 16:9 dar). Second - What happens if I use IVTC on my NTSC videos to get it back to 23.97 fps, use a program like photoshop maybe to save image sequences keeping the framerate do some batching on all these frames and re-encode it back using same settings and same audio file? I did already tried it and everything is smooth and audio is not out of sync but just to be sure what I did is messing up something? This is it: Code:
#Indexing video = ImageSource("%04d.jpg", 0000, 9999, 23.97) audio = FFAudioSource("*.aac") AudioDub(video, audio) DelayAudio(0.000) Last edited by Blovesx; 7th January 2019 at 22:58. |
Thread Tools | Search this Thread |
Display Modes | |
|
|