Hi. I want to make a vid with a small scene repeated a few times. With an mp4/AAC, this is what I use:
LoadPlugin("E:\MeGUI\tools\lsmash\LSMASHSource.dll")
a=LSMASHVideoSource("E:\vid.mp4")
b=LSMASHAudioSource("E:\vid.mp4")
audiodub(a,b)
Spline64Resize(640,360)
x=trim(6394,6813)
last++x++x
Unfortunately, I've a vid here with 'MPEG Audio (Version 1) (Layer 3)' and the above doesn't work. My googling hasn't helped so I'm hoping someone can tell me what I need to do with this script. Thank you.
+ Reply to Thread
Results 1 to 7 of 7
-
-
Your script should produce the enitre video, with a small section repeated twice at the end. I'm pretty sure. The video/audio format shouldn't matter. If you want just the small section repeated three times, try
audiodub(a,b)
Spline64Resize(640,360)
x=last.trim(6394,6813)
x++x++x
Or
audiodub(a,b)
Spline64Resize(640,360)
trim(6394,6813)
x=last
x++x++x
Or
audiodub(a,b)
Spline64Resize(640,360)
Trim(6394,6813)++Trim(6394,6813)++Trim(6394,6813)
Which is the same as
audiodub(a,b)
Spline64Resize(640,360)
Trim(6394,6813)\
++Trim(6394,6813)\
++Trim(6394,6813)
Avisynth has a function EnsureVBRMP3Sync, but I think it's only applicable to AviSource.
Or you could encode trim(6394,6813) once with the audio, make a couple of copies of the output file, then append the original encode and the two copies together.Last edited by hello_hello; 13th Jun 2016 at 01:00.
-
I think, mp3 with this script will work in virtualdub, but it doesnt help you I think
Bernix -
in virtualdub you neednt do anything with audio so this
a=LSMASHVideoSource("E:\vid.mp4")
Spline64Resize(640,360)
x=trim(6394,6813)
last++x++x
should work
Bernix -
L-Smash should work for MPEG audio. Maybe the file is corrupted. Try remuxing it with MKVToolNix or an appropriate muxer, see if it remuxes without error, then index the new file.
Havc you tried opening the script with something else? That's the first thing I do when there's problems, to see if the error remains or goes away. I'd usually open it with MPC-HC. -
Well, the script does indeed fail elsewhere (avspmod). I tried vdub, it seemed to be working but the file it produced wouldn't play and had no audio according to mediainfo.
I've converted the file with toolnix and the indexing of it gave me this script:
LoadPlugin("E:\MeGUI\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("F:\vid.mkv")
Which I amended to this:
LoadPlugin("E:\MeGUI\tools\lsmash\LSMASHSource.dll ")
a=LWLibavVideoSource("F:\vid.mkv")
b=LWLibavAudioSource("F:\vid.mkv")
audiodub(a,b)
Spline64Resize(640,360)
and it's now loading fine. Many thanks. Don't know what I'd do without y'all.
Similar Threads
-
Conversion MP4 to WMV/MPEG no audio
By FrankyOne in forum Video ConversionReplies: 2Last Post: 12th Dec 2014, 07:15 -
Avisynth Script audio problem
By Mr_Flintstone in forum Video ConversionReplies: 12Last Post: 19th Apr 2014, 23:01 -
MPEG StreamClip - H.264 MP4 w/AC3 audio loses audio
By the_wallcrawler in forum Video ConversionReplies: 5Last Post: 25th Jan 2014, 03:05 -
mp4 to mpeg with ffmpeg - no audio
By ilpilo in forum Video ConversionReplies: 15Last Post: 29th Mar 2012, 09:17 -
Avisynth Script for letterboxed mp4 to mpg?
By Robert Simandl in forum Video ConversionReplies: 1Last Post: 16th Sep 2011, 16:57