Posts: 26
Threads: 3
Joined: 2021 Feb
Thanks: 87
Given 4 thank(s) in 2 post(s)
Country:
Posts: 7,151
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1498 thank(s) in 969 post(s)
Country:
Posts: 794
Threads: 36
Joined: 2018 Feb
Thanks: 672
Given 1118 thank(s) in 419 post(s)
Country:
Posts: 870
Threads: 204
Joined: 2019 Aug
Thanks: 1267
Given 1244 thank(s) in 396 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: 794
Threads: 36
Joined: 2018 Feb
Thanks: 672
Given 1118 thank(s) in 419 post(s)
Country:
2022-06-20, 08:17 PM
(This post was last modified: 2022-06-20, 09:08 PM by bronan.)
Posts: 2,128
Threads: 56
Joined: 2016 Dec
Thanks: 164
Given 1060 thank(s) in 646 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: 870
Threads: 204
Joined: 2019 Aug
Thanks: 1267
Given 1244 thank(s) in 396 post(s)
Country:
Posts: 794
Threads: 36
Joined: 2018 Feb
Thanks: 672
Given 1118 thank(s) in 419 post(s)
Country:
2022-06-21, 03:34 PM
(This post was last modified: 2022-06-21, 04:14 PM by bronan.)
Posts: 2,128
Threads: 56
Joined: 2016 Dec
Thanks: 164
Given 1060 thank(s) in 646 post(s)
Posts: 794
Threads: 36
Joined: 2018 Feb
Thanks: 672
Given 1118 thank(s) in 419 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.
|