Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th July 2010, 13:27   #1  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
custom frame dropping

I would like to know how to drop ocasional corrupt frames. I thought of modifying the .txts from multidecimate but it comes to be a huge load of work.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 16th July 2010, 14:24   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
If you drop frames , wont you start to get A/V sync issues? or is this no audio content ?

Maybe replace frames with adjacent "good" ones? FreezeFrame() ?
poisondeathray is offline   Reply With Quote
Old 16th July 2010, 15:32   #3  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
yes, I always wondered how avisynth looking a so powerful tool couldnt handle sample tasks like this. Im more worried on the visual aspect rather than audio, normally I edit audio to sync with content, although I work a lot with no audio content. thanks for freezeframe it may work, although creating a stutter. Something like Drop(frame=13540) would be really cool.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 16th July 2010, 15:52   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
It's not a deficiency of Avisynth but rather of your creativity in using it.

Quote:
Originally Posted by Dogway View Post
Something like Drop(frame=13540) would be really cool.
This will drop frames and the audio for them:

Trim(0,a-1) ++ Trim(b+1,0)

It's cumbersome but you can use it to make a Drop() function as you describe (exercise for student). Better to support a range as above than a single frame.
Guest is offline   Reply With Quote
Old 16th July 2010, 17:28   #5  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Creativity is not the problem, RAM is. You havent discovered anything, only a workaround I dont want to deal with because I suspect it's a performance killer. but thanks for the input, will check anyway.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 16th July 2010, 17:30   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Dogway View Post
Creativity is not the problem, RAM is. You havent discovered anything, only a workaround I dont want to deal with because I suspect it's a performance killer. but thanks for the input, will check anyway.
I didn't claim to discover anything. I don't understand your concerns about RAM or performance. Are you seeing imaginary goblins or do you have a basis for that?

And BTW, if you don't care about audio, there is DeleteFrame().
Guest is offline   Reply With Quote
Old 16th July 2010, 17:35   #7  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Dogway View Post
Something like Drop(frame=13540) would be really cool.
It's called DeleteFrame.
Will even do a list of frames, eg DeleteFrame(3, 9, 21, 42)
It doesn't modify the sound track, so you'll want neuron2's suggestion if you need to preserve audio sync.

Ah, I see neuron2 has addressed that too now.
What was that about 'great minds..."

Last edited by Gavino; 16th July 2010 at 17:37.
Gavino is offline   Reply With Quote
Old 16th July 2010, 17:37   #8  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Quote:
Originally Posted by neuron2 View Post
And BTW, if you don't care about audio, there is DeleteFrame().
That is all I was aking for.

PD: just in time, thank you too Gavino!!
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 16th July 2010, 17:40   #9  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Dogway View Post
a workaround I dont want to deal with because I suspect it's a performance killer.
Trim has almost zero hit on performance.
Gavino is offline   Reply With Quote
Old 16th July 2010, 17:48   #10  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Dogway View Post
That is all I was asking for.
I suggest that you make a habit of reading the Avisynth documentation before claiming that Avisynth is missing the most basic functionality.
Guest is offline   Reply With Quote
Old 16th July 2010, 18:21   #11  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I suggest you to dont look down people you dont know.

And...
Reorganize (suggest) the documentation for better searching.

Gavino: I had in mind that triming was keeping in cache (RAM) the range to be joint with other trims, like variables do.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 16th July 2010, 19:44   #12  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Dogway View Post
I suggest you to dont look down people you dont know.
Don't make it personal buddy, I'm not looking down on you. It's always a good idea to read documentation before jumping to erroneous conclusions.

The documentation is superbly organized, in my view.

Last edited by Guest; 16th July 2010 at 19:48.
Guest is offline   Reply With Quote
Old 16th July 2010, 20:22   #13  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Dogway View Post
Gavino: I had in mind that triming was keeping in cache (RAM) the range to be joint with other trims, like variables do.
It's true that Trim, like all filters (except + and ++), has a cache associated with it to avoid fetching the same frame more than once, but that's no great overhead. Trim doesn't store all the frames in the trimmed range, if that's what you're thinking - Avisynth doesn't work that way. Variables have very little overhead too, as they are just pointers (or simple values).
Quote:
Reorganize (suggest) the documentation for better searching.
A good place to start when looking for a filter is here, which is organised by category.
If you already know the filter name, but want more details, a useful alphabetic index is here.
And of course the documentation installed on your hard disk has similar info.
Gavino is offline   Reply With Quote
Old 16th July 2010, 20:44   #14  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Quote:
Originally Posted by neuron2 View Post
It's not a deficiency of Avisynth but rather of your creativity in using it.

...to make a Drop() function as you describe (exercise for student).
Sorry, if that sounded too personal.

I actually searched on google/doom9: remove/delete/drop frames avisynth, and looked into external filters (I have it on my favourites). I didnt think it was internal, but after almost 1 hour searching, I thought it was easier to just ask (As easy it is for me to reply)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 16th July 2010, 21:23   #15  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
That's surprising but you're right. A simple search for "avisynth delete frame" does not lead quickly to DeleteFrame().
Guest is offline   Reply With Quote
Old 17th July 2010, 23:30   #16  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by neuron2 View Post
This will drop frames and the audio for them:
Trim(0,a-1) ++ Trim(b+1,0)
It's cumbersome ...
A less cumbersome way is simply Loop(0, a, b) (or Loop(0, a, a) for a single frame).
I overlooked this yesterday - still trying to get my brain in gear after the World Cup celebrations.
Dogway. )

Last edited by Guest; 18th July 2010 at 03:49. Reason: 13
Gavino is offline   Reply With Quote
Old 18th July 2010, 03:47   #17  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
@Gavino:

Finally I used Deleteframe, its better for random frames deletion, although I had to install v2.58. I know there are many ways for doing the same, only this came to be the fastest for my purposes. Hope next time somebody finds out this thread when searching for delete frame on avisynth: I wont misslook the internal filters either... : D
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Guest; 18th July 2010 at 03:49. Reason: 13
Dogway is offline   Reply With Quote
Old 18th July 2010, 23:14   #18  |  Link
Floatingshed
Registered User
 
Join Date: Nov 2008
Posts: 322
I would find a simple command like "deleteframe" that also removed the audio very useful...
Floatingshed is offline   Reply With Quote
Old 18th July 2010, 23:30   #19  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
freezeframe works well for me too, to fix a few consecutive corrupted frames
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 18th July 2010, 23:38   #20  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Floatingshed View Post
I would find a simple command like "deleteframe" that also removed the audio very useful...
Like I said, you can do this with Loop(0, n, n) to delete both video and audio of frame n.
Or define a wrapper function for it with a name of your choice, eg

Code:
function DeleteFrameA(clip c, int frame) {
  c.Loop(0, frame, frame)
}
Gavino is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:35.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.