Hello,
I'm looking for help on synchronizing audio when cutting a video using an avisynth script containing trim and/or selectRange. After rendering, audio and video never are in sync. I searched the web and found EnsureVBRMP3Sync which should solve this problem. But while I have the sync problem also with constant bitrate audio streams, EnsureVBRMP3Sync does not work but leads to an error.
This script e.g. does not work:
DirectShowSource(Titel,fps=FpsZ).EnsureVBRMP3Sync( ).Trim(176500,177000)
when trying to render it with SUPER.
And here are some details about my input file:
Format : Matroska
File size : 6.56 GiB
Overall bit rate : 4 809 Kbps
Video Format : AVC
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Muxing mode : Container profile=Unknown@3.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 3h 15mn
Bit rate : 4 162 Kbps
Nominal bit rate : 4 358 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16/9
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Audio Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 3h 15mn
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 6 channels
Sampling rate : 48.0 KHz
I'm trying to find a way to cut this video using trim and selectRange while having video and audio in sync.
Please help me solving this issue,
Kab09
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 10 of 10
Thread
-
-
Originally Posted by Kab09
You could try adding seekzero=true to DirectShowSource. -
Hi Gavino,
thanks for your quick replay. FPSZ is the frame rate and when used correctly it works fine.
Your hint to use SeekZero works well will trim, altough it's quite slow. But with SelectRangeEvery it does not work, the script always causes an error after some seeks.
Is there also a solution for SelectRangeEvery?
Thx,
Kab09. -
Originally Posted by Kab09
Using . to link transforms is compact, but might cause problems with more complex operations like Selectrange, I think.
Try unrolling it and see if that helps:
Code:DirectShowSource(Titel,fps=FpsZ) EnsureVBRMP3Sync() Trim(176500,177000)
-
Originally Posted by AlanHK
You could also try ffmpegsource, which usually works but seems slower.
ffmpegsource builds an index (which makes it slower to start up), providing accuracy.
You can avoid the delay by re-using the index file on subsequent runs on the same source. -
Now I tried FFmpegSource2 by installing the latest version. But by using
FFmpegSource2(Titel)
on the above mentioned file I do not get any audio output.
Do I have to include my audio separately? -
Originally Posted by poisondeathray
-
See the manual at
https://spaceboyz.net/svn/aegisub/trunk/FFmpegSource/ffmpegsource.html
FFmpegSource(string source, int vtrack = -1, int atrack = -2, string timecodes, bool vcache = true, string vcachefile, string acachefile, string pp, int ppquality = 6, int threads = -1, int seekmode = 1)
atrack & vtrack: Track number as seen by the relevant demuxer, starts from 0, -1 means it will pick the first suitable track and -2 means it's disabled.
====
PS: Looks like you have a later version.
ffmpeg is basically omnivorous.
It certainly should be able to handle AC3.
Otherwise, you can try loading them separately, then combining:
Code:A = FFAudioSource(X) V = FFVideoSource(X) AudioDub(V, A)
-
Originally Posted by Kab09
Do you have the beta10 in the avisynth plugins directory? ffms2.dll, ffms2.avsi (otherwise you have to split it as alanhk wrote above)
http://forum.doom9.org/showthread.php?t=127037
http://code.google.com/p/ffmpegsource
Another option is to use DGAVCIndex, NicAC3Source and audiodub()
Similar Threads
-
AviSynth Overlay and Trim Help
By NMeade in forum Newbie / General discussionsReplies: 20Last Post: 1st Apr 2012, 07:53 -
Is there ANYthing that will trim h.264 flv's without audio sync issues?
By AshleyQuick in forum Newbie / General discussionsReplies: 4Last Post: 29th Mar 2012, 09:07 -
Seeking AviSynth script impr0vement suggestions
By jman98 in forum Video ConversionReplies: 14Last Post: 17th Mar 2012, 09:26 -
Is there ANYthing that will trim h.264 flv's without audio sync issues?
By AshleyQuick in forum Newbie / General discussionsReplies: 4Last Post: 18th Nov 2011, 00:28 -
How do I trim audio with AVIsynth?
By Nagashi in forum AudioReplies: 4Last Post: 2nd Oct 2011, 10:13