Sorry, I'm a noob.
For a while, I haven't had trouble using MeGUI and AviSynth to cut videos, but I don't know if it's because of an update, but my old scripts don't work anymore. (I've figured out how to get them working again on my own after 3 hours. ...ugh) After going through all those threads, now I'm curious about a few functions I saw in sample scripts (I tried copying the functions from their scripts, but had trouble getting them to work).
FFVideoSource doesn't work for me. FFmpegSource2 works fine, though.
Everytime I try, it just tells me there's "no video stream found".
FFAudioSource doesn't seem to do anything.
AviSynth is installed properly. All 3 ffmpeg plugins are in the right folders. I downloaded Haali's splitter. Still nothing.
Also, is there a way to cut .mkv videos and audio at the same time? So far, I've been extracting the audio stream, cutting it separately, and then muxing it. I make a lot of clips, so it's excruciatingly tedious to continue doing this manually. Is AudioDub one way to do this? If so, how do I use it? I looked up AudioDub, but it didn't help at all--or I just suck at searching.
When I cut a video, there are multiple file outputs, right? So far I've been making separate avs scripts for different files. OTL Obviously I've been taking the long way around. To clarify, I can keep all the cuts in a single script and have multiple outputs, correct? What if I wanted to rename my output files?
So say I wanted to open a mkv file (video.mkv) with sound (audio.aac) in AVS cutter, cut the video into several clips, and have separate outputs for... say, clips 1-3, but I want to join only 4 and 5. I want to rename these output files.
Would someone be able to give me an example with a sample script, pretty please and thank you?
+ Reply to Thread
Results 1 to 9 of 9
-
-
regarding cutting mkv files which contain constant frame rate H.264 video and one or multiple audio streams, you can try: MKVCutter.
All 3 ffmpeg plugins are in the right folders.
FFVideoSource doesn't work for me. FFmpegSource2 works fine, though.
Code:# FFmpegSource 1.21 syntax compatibility # Created by TheFluff function FFmpegSource2(string source, int "vtrack", int "atrack", bool "cache", \ string "cachefile", int "fpsnum", int "fpsden", int "threads", \ string "timecodes", int "seekmode", bool "overwrite", int "width", int "height", \ string "resizer", string "colorspace", int "rffmode", int "adjustdelay", \ bool "utf8", string "varprefix") { vtrack = default(vtrack,-1) atrack = default(atrack,-2) cache = default(cache,true) cachefile = default(cachefile,source+".ffindex") fpsnum = default(fpsnum,-1) fpsden = default(fpsden,1) threads = default(threads,-1) timecodes = default(timecodes,"") seekmode = default(seekmode,1) overwrite = default(overwrite,false) width = default(width,-1) height = default(height,-1) resizer = default(resizer,"BICUBIC") colorspace = default(colorspace,"") rffmode = default(rffmode,0) adjustdelay = default(adjustdelay,-1) utf8 = default(utf8,false) varprefix = default(varprefix, "") ((cache == true) && (atrack <= -2)) ? ffindex(source=source, cachefile=cachefile, \ indexmask=0, overwrite=overwrite, utf8=utf8) : (cache == true) ? ffindex(source=source, \ cachefile=cachefile, indexmask=-1, overwrite=overwrite, utf8=utf8) : nop v = ffvideosource(source=source, track=vtrack, cache=cache, cachefile=cachefile, \ fpsnum=fpsnum, fpsden=fpsden, threads=threads, timecodes=timecodes, \ seekmode=seekmode, rffmode=rffmode, width=width, height=height, resizer=resizer, \ colorspace=colorspace, utf8=utf8, varprefix=varprefix) a = (atrack <= -2) ? blankclip(audio_rate=0) : ffaudiosource(source=source, \ track=atrack, cache=cache, cachefile=cachefile, adjustdelay=adjustdelay, \ utf8=utf8, varprefix=varprefix) return audiodubex(v,a) } function FFImageSource(string source, int "width", int "height", string "resizer", \ string "colorspace", bool "utf8", string "varprefix") { width = default(width,-1) height = default(height,-1) resizer = default(resizer,"BICUBIC") colorspace = default(colorspace,"") utf8 = default(utf8,false) varprefix = default(varprefix,"") return FFVideoSource(source, cache=false, seekmode=-1, width=width, height=height, \ resizer=resizer, colorspace=colorspace, utf8=utf8, varprefix=varprefix) } function FFCopyrightInfringement(string source) { ################################################################ # Violates copyright # * With audio # * No annoying lawyers # * Simple syntax # * Do not use on Britney Spears' music videos or sex tapes # # And whatever you do: # DO NOT TELL NEURON2 THAT YOU USED THIS FUNCTION ################################################################ FFIndex(source=source) return audiodubex(FFVideoSource(source=source), FFAudioSource(source=source)) } function FFFormatTime(int ms) { s = ms / 1000 ms = ms % 1000 m = s / 60 s = s % 60 h = m / 60 m = m % 60 return string(h) + ":" + string(m,"%02.0f") + ":" + string(s,"%02.0f") + "." + string(ms,"%03.0f") } function FFInfo(clip c, bool "framenum", bool "frametype", bool "cfrtime", bool "vfrtime", string "varprefix") { framenum = default(framenum,true) frametype = default(frametype,true) cfrtime = default(cfrtime,true) vfrtime = default(vfrtime,true) varprefix = default(varprefix, FFVAR_PREFIX) c.frameevaluate(""" fftempstring = "" varprefix = """" + varprefix + """"""") framenum ? frameevaluate("""fftempstring = fftempstring + "Frame Number: " + string(current_frame) + " of " + string(framecount()) + "\n" """, after_frame=true) : nop() frametype ? frameevaluate("""fftempstring = fftempstring + "Picture Type: " + chr(eval(varprefix + "FFPICT_TYPE")) + "\n" """, after_frame=true) : nop() cfrtime ? frameevaluate("""fftempstring = fftempstring + "CFR Time: " + FFFormatTime(round((current_frame * 1000) / framerate())) + "\n" """, after_frame=true) : nop() vfrtime ? frameevaluate("""fftempstring = fftempstring + "VFR Time: " + FFFormatTime(eval(varprefix + "FFVFR_TIME")) + "\n" """, after_frame=true) : nop() return scriptclip("subtitle(fftempstring, lsp = 1)", after_frame=true) }
Cu Selur -
Ah, I look forward to seeing MKVCutter grow. I don't think it'll encode my videos as losslessly as I'd like right now, being in alpha-stage.
I'm sorry, I don't know how to make use of that compatibility information you gave me. :C I don't understand what it means.
Also, I figured out how to get AudioDub working in AVS, but is there a way to get the audio into the encoded video? Or will I have to cut and mux in the audio separately?
I tried encoding the AVS script without combining the clips, but there weren't multiple output files. > _< Does this mean I have to continue separating all the clips into different AVS? Argh... Painful. -
I don't think it'll encode my videos as losslessly as I'd like right now, being in alpha-stage.
There's also other tools which can do the job, see: https://forum.videohelp.com/threads/358762-Cut-MKV-frame-accurate
About the rest: Not sure what you are doing, but if you cut your clip together with Avisynth, the whole thing will be reencoded,... (if audio and video or just audio or just video depends on the tool you use). -
You can do edits (cut audio and video at the same time, or join multiple segements or videos ) in the avs script using Trim() , but multiple outputs require multiple scripts
And as selur says - If you want to do this without re-encoding, don't use avisynth . It's not clear (at least to me) what you're trying to do -
I haven't found anything else that'll cut my mkv videos losslessly. :C Machete and SolveigMM are the best ones I've found so far, but they can only cut using keyframes, and can't cut MKV. Avidemux just crashes instantly. I've tried pretty much all the decent ones.
So I figured I didn't have much choice but to re-encode, but do I know what the heck I'm doing? No, not really. x _x
The thing about MKV Cutter is this line that concerns me: "x264 encoding is very rudimentary (no user choice, always crf 21 encode)" What does that mean? :X The frame rate is a constant 21? -
The frame rate is a constant 21?
not constant frame rate (cfr)
'MKV Cutter' will not change the frame rate -
Enable frame accuracy mode in SolveigMM Video Splitter (Control => frame accuracy). It can cut MKV. IT's a different product than Solveig AVI Splitter . -
I have frame accuracy enabled. x _x It's not accurate at all. It doesn't work well with MKV at all.
Similar Threads
-
AviSynth:can't get ffvideosource to work.
By sambat in forum EditingReplies: 5Last Post: 11th Nov 2015, 08:15 -
[Avisynth] FFVideoSource: Video track is unseekable
By marcorocchini in forum Newbie / General discussionsReplies: 2Last Post: 17th Oct 2013, 16:36 -
DirectShowSource and FFVideoSource Problems
By ndjamena in forum Video ConversionReplies: 15Last Post: 8th Mar 2013, 23:04 -
avisynth: directShowSource, ffVideoSource, avcSource -- speed
By adom in forum Video ConversionReplies: 8Last Post: 14th Jun 2011, 20:35 -
Trying to get AudioDub to work with .mp4 and .wav!!!!!
By Nagashi in forum EditingReplies: 1Last Post: 29th Dec 2010, 17:33