EDIT - RESOLUTION is I'm an idiot. Your answer isn't here, unless you are possibly looking at the wrong output file? Double check it. Are you sure you're looking at the right output file? Duh.
------
I've been using AVIsynth and ffmpeg to convert some old music videos that were on a bunch of videocassettes. I create one two-hour capture file, then just use the Trim(xxx,xxx) command through AVIsynth to encode only the section of video/audio that I want.
Before today, when I ran ffmpeg - whether using atrack through avisynth or inputting as a separate file - the audio and video used to be sync'd up to the trimmed video segment. It worked like this for years. I didn't have to do anything, it just matched the audio to whatever video section I "trimmed" in the avisynth file.
Starting today, when encoding a video file trimmed in avisynth, the audio always starts at the beginning of the capture/source track instead of starting at the beginning of the trimmed section.
I even tried to use some of my old scripts that worked, and they no longer work.
Any idea what I could have done? The only functional files I think I overrode today were FFTW and a few plugins.
Thanks for any leads.
+ Reply to Thread
Results 1 to 11 of 11
-
Last edited by spg900ny; 20th Sep 2022 at 01:25.
-
Post your complete script and FFmpeg command
Last edited by davexnet; 19th Sep 2022 at 23:31. Reason: typo
-
Sample AVS script (video1.avs):
Code:LoadPlugin("D:\VIDEOTOOLS\avisynthuniv\AVSPLUS370_x64\plugins\D2VSource.dll") DirectShowSource("D:\VIDEOTOOLS\capture1.avi") ConvertToYV12(interlaced=true) AssumeTFF() QTGMC( Preset="Slow" ) nnedi3_rpow2(rfactor=2, cshift="spline64resize",fwidth=1440,fheight=1080) Crop(4,4,-4,-16) AddBorders(4,4,4,16) Levels(10, 1, 245, 2, 255) LimitedSharpenFaster(Smode=4, strength=75) Trim(42605,55205)
Code:ffmpeg -i "D:\VIDEOTOOLS\video1.avs" -i "D:\VIDEOTOOLS\capture1.avi" -map 0:0 -metadata title="The Gits - Seaweed" -metadata:s:v:0 language=eng -c:v libx265 -crf 18 -preset slow -map 1:a:0 -metadata:s:a:0 language=eng -c:a aac -b:a 256k "C:\Users\volsw\Desktop\The Gits - Seaweed.mkv"
-
I did that because it's a recycled script from a DVD upscale/encoding I did with dual audio tracks and I was lazy and just kept a similar ffmpeg command. I did also try the following command earlier tonight (using FFmpegSource2 and atrack=1 as source line in avisynth) and it did the same thing. I thought since I was specifying the trim of audio and video together in avisynth, it might work - even though this has never been an issue in the past using the original video file for the audio input.
Code:ffmpeg -i "D:\VIDEOTOOLS\video1.avs" -map 0:0 -metadata title="The Gits - Seaweed" -metadata:s:v:0 language=eng -c:v libx265 -crf 18 -preset slow -map 0:a:0 -metadata:s:a:0 language=eng -c:a aac -b:a 256k "C:\Users\volsw\Desktop\The Gits - Seaweed.mkv"
-
Thanks. Will stick with FFmpegSource from now on if I can. Still not sure why this issue is happening, but I guess good to know it works for you.
Maybe I should re-install everything. Ugh. -
The version of FFmpegsource I had was 32-bit, so this worked fine with the 32 bit version of FFmpeg
Code:LoadCPlugin("C:\Program Files (x86)\AVStoDVD\Lib\ffms2.dll") Aud = FFAudioSource("C:\Users\davex\Desktop\alone.mpg", track=-1) Vid = FFVideoSource("C:\Users\davex\Desktop\alone.mpg", track=-1, fpsnum=2997, fpsden=100, colorspace="YV12", seekmode=0) audiodub(vid,aud)
-
That worked, and in putting the script together as you had listed, I realized my error.
I usually write output to that VIDEOTOOLS directory with my ffmpeg script. When I looked at the script again, I realized at some point I had switched the output file to my Desktop.
I've been looking at the wrong output file this whole time. I must have made a mistake at some point, and then when I went to fix it, I changed the file location.
Sorry to have wasted your time. I'm going to edit the subject if I can. Thanks for helping. -
You're welcome. Sometimes all it takes is another set of eyes
to create some discussion and get to the bottom of it
Similar Threads
-
Seeking help on my journey to better understand avisynth
By LighthouseonaCliff in forum Newbie / General discussionsReplies: 46Last Post: 6th Jan 2022, 06:15 -
DVD to MKV with ffmpeg + Avisynth, questions about audio and chapters
By abolibibelot in forum Video ConversionReplies: 4Last Post: 9th Nov 2021, 07:14 -
Online trimming with FFMPEG
By danielko in forum Video Streaming DownloadingReplies: 6Last Post: 26th Oct 2019, 07:58 -
libx264 is no longer available in ffmpeg?
By oduodui in forum LinuxReplies: 2Last Post: 17th Feb 2019, 13:49 -
Avisynth - Audio track longer than video track
By martanius in forum AudioReplies: 4Last Post: 18th May 2018, 02:13