Posts: 26
Threads: 3
Joined: 2021 Feb
Thanks: 84
Given 4 thank(s) in 2 post(s)
Country:
Thanks
It seems i´ve to get used to a new program (avisynth or virtualdub), as i´ve never worked with either of them but they seem to be quite popular among project users.
Posts: 7,153
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1466 thank(s) in 963 post(s)
Country:
Virtualdub is an editing software, and you can use it "as is"; avisynth is a frame server and works with virtualdub and other softwares ( http://avisynth.nl/index.php/FAQ_frameserving); the former is quite easy to use, but the latter is much more powerful, but quite difficult to master...
Posts: 759
Threads: 35
Joined: 2018 Feb
Thanks: 651
Given 1071 thank(s) in 405 post(s)
Country:
(2021-10-14, 07:46 PM)zoidberg Wrote: It's much easier to sync in avisynth, import both sources (using frame accurate source filters) and stack them either horizontally or vertically. This way you're only working in one vdub window with one timeline
Which video plugins do you recommend for frame accurate? FFMS seems to crap out every once in a while with MKVs.
Posts: 848
Threads: 202
Joined: 2019 Aug
Thanks: 1227
Given 1152 thank(s) in 382 post(s)
Country:
2022-06-20, 07:01 PM
(This post was last modified: 2022-06-20, 07:09 PM by alleycat.)
I use ffVideoSource(), if that fails LWlibavVideoSource(), then LSMASHVideoSource() and then last resort DirectShowSource. If it's still crapping out you might want to re-encode the video to something else, won't make any difference to you as you are only using it as a visual guide.
Posts: 759
Threads: 35
Joined: 2018 Feb
Thanks: 651
Given 1071 thank(s) in 405 post(s)
Country:
2022-06-20, 08:17 PM
(This post was last modified: 2022-06-20, 09:08 PM by bronan.)
(2022-06-20, 07:01 PM)alleycat Wrote: I use ffVideoSource(), if that fails LWlibavVideoSource(), then LSMASHVideoSource() and then last resort DirectShowSource. If it's still crapping out you might want to re-encode the video to something else, won't make any difference to you as you are only using it as a visual guide.
Yea, something non-264 might be better for frame accuracy, but I'm not sure what. I also have MagicYUV which I use to capture, but not really sure if that'd be any better? Occasionally it seems like the higher res source like the BD video has some frames get "stuck" when moving back and forth. For instance, if a ball was rolling across the frame from left to right, when it should be in the center itd appear back on the left for a couple frames. Reloading the video (F2) in Virtualdub seems to fix this but it sucks it happens.
Posts: 2,051
Threads: 56
Joined: 2016 Dec
Thanks: 162
Given 1011 thank(s) in 614 post(s)
I use ffvideosource mainly because I can't get any of the newer source filters to work, but I've never had any trouble with frame accuracy so long as the file is in an MKV container and AVC. For MPEG2 stuff with pulldown and such I may use DGDecode, but it's been a while since I've done anything like that so I can't be sure.
It helps if files are on separate HDDs so that the drives don't have to scan like crazy constantly, but if you're finding that it stutters or repeats frames add showframenumber() to see if you can rule out decoder error. If you're still having problems then Alleycat's suggestion of creating a low-res proxy file is the best solution, something like lagarith
Posts: 848
Threads: 202
Joined: 2019 Aug
Thanks: 1227
Given 1152 thank(s) in 382 post(s)
Country:
@ bronan I often find with blu ray footage, once decoded with something like ffvideosource, that it can be slow at times for me to move through the video. Moving forward frames is usually ok but moving backwards can take longer, I'll press the back key say 5 times and nothing happens, then after a brief freeze it moves back 5 frames. Storing the file on an SSD instead of traditional hard drive helped me as did increasing the RAM. But that issue never happens with uncompressed AVI or prores files. Like zoidberg says, try lagarith with say a resize to 50%.
@ zoidberg I'm trying to horizontal stack method on a current project - is there a way to incorporate other commands into that script? I can load video A and video B and stack them, but I'm struggling to include other amends in the same script, such as TFM, TDecimate, delete frames, duplicate frames etc. I've tried adding an extra set of () around everything but it gives me errors when importing into VDub. As a workaround I made one script for the DVD, one script for the blu and a third script to import the first two scripts and stack them - that works but has a new problem - I'm getting phantom frame differences. I'll load it into Vdub, one source is say two frames out, delete those frames and reload, then the same source is two frames off the opposite way etc. Very weird. Using two instances of Vdub seems to be fine it only seems to happen when I stack.
Posts: 759
Threads: 35
Joined: 2018 Feb
Thanks: 651
Given 1071 thank(s) in 405 post(s)
Country:
2022-06-21, 03:34 PM
(This post was last modified: 2022-06-21, 04:14 PM by bronan.)
I think you both may be onto something there, because the video that has the issue is on my server. I'm going to try moving it over to a local SSD and see if it helps the matter.
@ alleycat Can you post your script? Its hard to judge why your stacking isn't working without seeing it.
I'm actually working on some new functions to make it even easier to sync two videos. I will post it when I finish my current project as I'm still working out some kinks.
Posts: 2,051
Threads: 56
Joined: 2016 Dec
Thanks: 162
Given 1011 thank(s) in 614 post(s)
@ alleycat,
It's possible to combine multiple calls into a single line, as opposed to over a number of lines:
Code: source("source").tfm.tdecimate.pointresize(720,480).showframenumber.trim(start,end)
In this instance you would only use parentheses to adjust filter parameters like edit points or options within filters like resizing, field order etc. An example script would be
Code: a=source("bluray").pointresize(720,480)
b=source("laserdisc").tfm.tdecimate
stackvertical(a,b)
For stack to work the two clips' heights or widths must be the same. If you wanted to edit the laserdisc to the bluray and export the audio in Vdub the script may look like this:
Code: source("laserdisc").tfm.tdecimate.showframenumber
a=trim(start,end)+trim(start,end)#as many edits as necessary
b=source("bluray").pointresize(720,480)
stackvertical(a,b)
With edits I tend to create a separate edit script and import into another script which merges the two clips, however I don't get problems with phantom frames so YMMV
Posts: 759
Threads: 35
Joined: 2018 Feb
Thanks: 651
Given 1071 thank(s) in 405 post(s)
Country:
2022-06-21, 05:49 PM
(This post was last modified: 2022-06-21, 07:34 PM by bronan.)
OK here is where my syncing script is now:
Code: #helper functions to cut and insert frames
function Insert(clip c, int frameNumber, int framesToInsert)
{
blankClip = BlankClip(c, framesToInsert)
c2 = frameNumber == 0 ? Eval("""
return blankClip + c
""") : Eval("""
return Trim(c, 0, frameNumber - 1) + blankClip + Trim(c, frameNumber, c.FrameCount)
""")
return c2
}
function Remove(clip c, int frameNumber, int framesToDelete)
{
c2 = frameNumber == 0 ? Eval("""
return Trim(c, frameNumber + framesToDelete, c.FrameCount)
""") : Eval("""
return Trim(c, 0, frameNumber - 1) + Trim(c, frameNumber + framesToDelete, c.FrameCount)
""")
return c2
}
#our video sources
bd = FFVideoSource("c:\bd.mkv")
\.Spline36Resize(720, 480)
ld = FFMS2("c:\ld.mkv", atrack=-1)
#output side by side for syncing
StackHorizontal(bd, ld)
This script assumes your LD has already been processed and converted to 23.976. Load it using VirtualDub, and start playing the movie (Spacebar to Play/Stop, arrow keys to move forward and back frames) . You will probably have to do an initial adjustment to get them in line, then when they go off you either insert or remove frames to keep it in sync. Edit and save your script, then press F2 in Virtualdub to reload the changes.
Now to see what a fully edited movie looks like. The ld line just keeps growing as we work our way through the movie inserting and cutting frames. The first paramter is the frame number where you want to insert or cut, and the second is how many frames. It's important to keep the edits in the order they appear in the movie or you will cause problems with frame numbers.
Code: ld = FFMS2("c:\ld.mkv", atrack=-1)
\.Insert(0, 20)
\.Insert(3950, 2)
\.Remove(4060, 1)
\.Insert(4213, 1)
\.Remove(4259, 3)
\.Insert(4377, 1)
\.Insert(10526, 1)
\.Remove(10907, 1)
\.Insert(21753, 1)
\.Insert(32159, 1)
\.Insert(50933, 1)
\.Insert(51744, 2)
\.Insert(75552, 1)
\.Insert(78435, 11)
\.Insert(100831, 2)
\.Insert(118562, 1)
\.Insert(120211, 1)
\.Insert(128171, 1)
\.Insert(130930, 2)
\.Remove(136412, 1)
\.Insert(137144, 1)
When you are ready to export your synced track, comment out the StackHorizontal, and just leave "ld". Then in Virtualdub, go to File -> Save Audio. You will probably still want to go back and patch any sections of inserted frames, so as I'm adding the edits, I also make a note of the timecode to make it quick to find them in Reaper.
|