2012-01-01, 22:35 | Link #1 |
Rouge Encoder
Join Date: Aug 2011
Location: wut?
|
Timecodes in an mp4
Alright my source is an mp4 file that is apparently(from what media info says) a VFR. I want to try and keep it a VFR, so how do I go about doing that.
I usually deal with VFR MKV files so this is a little different. I extract the timecodes via FFMpegSource. Do I go about it the same way? I've tried that, but I may be entering something wrong in the command. LoadPlugin("filepath\ffm2.dll") FFMpegSource("filepath\filename.mp4, timecodes= "filename.txt") |
2012-01-02, 04:27 | Link #5 | |
warpsharpened
Join Date: Sep 2008
|
Quote:
Code:
Usually it's the " or ( Then there's your OP (which I'll wrap in code tags for you): Code:
LoadPlugin("filepath\ffm2.dll") FFMpegSource("filepath\filename.mp4, timecodes= "filename.txt") |
|
2012-01-03, 02:15 | Link #7 |
Rouge Encoder
Join Date: Aug 2011
Location: wut?
|
Yes I did, and I feel like a damn idiot -.-'. But when I fixed the script and got my time codes file, I made a new script for encoding and made my video and audio and then muxed it together(timecodes included) via mkv merge GUI. But I watched the video to make sure nothing was wrong, and the audio slowly started get out of sync. The new videos frame rate is the same as the old one, 29.970. I didn't cut the video or do anything different really, just hard sub some karaoke and typesetting. What was I doing wrong? There were no warnings or error codes while muxing or encoding either, everything went smoothly.
|
2012-01-03, 11:57 | Link #8 |
Senior Member
Join Date: Dec 2008
|
1. The audio went out of sync with the subtitles or with the video or both?
2. "new videos frame rate is the same as the old one, 29.970" - I thought you had VFR? (You can not trust mediainfo on detecting "VFR", btw.) 3. Did you use the original .mp4 file as the source for the audio track in mkvmerge or did you demux it first? |
2012-01-04, 01:27 | Link #9 |
Rouge Encoder
Join Date: Aug 2011
Location: wut?
|
Both actually, the audio was faaaar ahead of the subtitles and the video. And I'm using the source itself as the audio. And MeGUI read it as 29.970 when I went to make a script. What methods could I use to find out if my orignal source id a VFR.
|
2012-01-04, 02:49 | Link #10 | ||
Senior Member
Join Date: Dec 2008
|
Quote:
What happens if you don't use the timecode file and instead choose "30000/1001" (or "24000/1001") as the fps in mkvmerge? Are the hard-coded subtitles and the video in sync and did you load the timecode file for assrender/textsub? Does that mean you did not actually use the script you posted in your first post as input to MeGUI, but let it create a new script on its own instead? Quote:
http://www.mediafire.com/?0b3kdn4xy2te524 http://www.mediafire.com/?6z553mv548tec0b I'm probably not up-to-date when it comes to v2->v1 conversion tools, though. Maybe someone else can post better alternatives. Or upload the timecodes so we can take a quick look at them. |
||
2012-01-04, 17:12 | Link #11 |
Rouge Encoder
Join Date: Aug 2011
Location: wut?
|
Yes, in MKVmergeGUI the option to load timecodes into the video was how I did it. But if I don't put the input the timecodes and choose "30000/1001", then everything is perfectly fine. Yes the hard coded material and the video are in-sync perfectly fine.
^I don't understand. Are you asking if I muxed the timecodes with the subtitles as well? Yes, I created a new script after I got my timecodes. The one I posted was purely for extracting timecodes, that one was hand made....so to speak. I made another one via Avisynth Script Creator in MeGUI. I'm sure I could have done everything from a single script, but it's kind of a quirk I have -_-'. So I'm guessing v1 timecodes are a better version then? |
2012-01-04, 17:34 | Link #12 | ||
Senior Member
Join Date: Dec 2008
|
Quote:
Code:
ffvideosource("source_video.mp4", timecodes="timecodes.txt") AssRender("subtitles.ass", vfr="timecodes.txt") Quote:
That's also why your subtitles fit to the video, although you did not know about VFRaC. It's not better to use timecodes_v1 in general, only to get a human viewable overview of the timecodes. It helps you identify if the source really is VFR or if it's CFR. http://www.bunkus.org/videotools/mkv...timecode_files You see that timecodes_v1 files are only a few lines long mostly, while timecodes_v2 have a line for every single frame. Not something a human can take a short look at and identify whether it's VRF or CFR. |
||
2012-01-04, 20:37 | Link #13 |
Rouge Encoder
Join Date: Aug 2011
Location: wut?
|
I looked at the time codes, and I'm not sure what what format(v1, v2, v3, v4) it is, but it has the designated frames and then the frame rate from what it looks like(i.e 2309,4569. 29.970)
but the thing is, it's all 29.970. So I'm guessing it's not actually a VFR? You were right, DSS did the covertfps, but I never paid attention to it. Thanks for that part. So if the timecodes are in a v2 format, does that meant that the source has a high chance of not actually being a VFR? |
2012-01-04, 21:09 | Link #14 | ||
Senior Member
Join Date: Dec 2008
|
Quote:
Quote:
I can only recommend to just use your own script, instead of letting MeGUI create one. It has to look like the example in my last post. That the timecodes didn't fit the VFR->CFR encode made by MeGUI (and its script creator) is an indication of your source really being VFR, btw. My recommendation to convert the timecodes_v2 to timecodes_v1 was only so you can read them more easily in a text editor, not to actually use them as input for mkvmerge, x264 or whatever. Despite being long and thus not being easily readable, timecodes_v2 are perfectly fine. I've never seen anyone use v3 or v4 timecodes and distinguishing v1 and v2 timecodes is very very easy. Just look at the examples I posted above: http://www.bunkus.org/videotools/mkv...timecode_files They also they what format they are explicitly in the very first line. |
||
2012-01-05, 15:34 | Link #16 |
Senior Member
Join Date: Dec 2008
|
I guess you should learn to read and understand timecodes_v2 and timecodes_v1 files. If someone asks you "what does this number in this line mean" you have to be able to answer that immediately. Ask yourself "What exactly are timecodes/timestamps? What is their meaning?"!
When looking at a timecodes_v1 file you have to be able to tell whether it's VFR or CFR within a single second. It's trivial, really. Those are the very basics of dealing with VFR content. And read every article/blog post (like TheFluff's about VFR/VFRaC I posted above) or wiki anyone mentions here! Then read it again and again, until you understand! Seriously. I know it takes some time to grasp the concept of VFR, but chances are that at some point it will fall like scales from your eyes. |
|
|