16 Replies Latest reply on Apr 14, 2009 11:06 PM by Typhoon859

    AVISynth Filters Work Real-Time or During Encoding?

    Typhoon859 Level 1

      If in the AVS script I add filters, does that effect the preview playback speed?  That's basically why I ask the question.  Does it take effect in the program or only during rendering?

        • 1. Re: AVISynth Filters Work Real-Time or During Encoding?
          Colin Brougham Level 6

          Premiere will always play back anything you throw at it in "real-time". Now, that may mean that it's only able to update 1 of every 100 frames in a video stream, but technically that's still real-time as long as that 1 frame is initially displayed at the moment in time where it occurs in the video stream.

           

          Best way to find out what impact your filter stack will have on play back in Premiere is to try it--there are no sure bets.

          • 2. Re: AVISynth Filters Work Real-Time or During Encoding?
            Typhoon859 Level 1

            Well, it's normally laggy a lot of the time, so of course it's going to lag real-time with all the added filters, of course.  I have general filters that I use for different types of video (Standard, 720p, and DVD) that I put in FFDShow to improve the quality of my videos in general.  Past a certain point (a point far before what I need to properly filter a video for encoding), it starts to lag because my processor can't handle it and neither can most people's.

             

            Now, I'm trying to think of a way to not have any of the filters active during the time that I'm working on it and use them when I actually render.  I can't figure out a 100% solid way, whether it's doing something in the program, during the actual rendering process, or physically with the files.  Adding code to all the AVS files when I render and then removing it when I need to work on the project again isn't very efficient.

             

            I'm thinking maybe of making two folders of each project with all the AVS files and somehow alternating between which files the program uses for when I need to render and for when I need to edit but can't really think that through all the way, dealing with the program.

             

            Might you or anybody else have any ideas on this?  Thanks.

            • 3. Re: AVISynth Filters Work Real-Time or During Encoding?
              Colin Brougham Level 6

              It sounds like what you're trying to do is use Avisynth to do some preprocessing on files that you're hoping to edit in PPro, but forgo the preprocessing until the export stage of your project. What you're basically suggesting is an "offline" or "proxy" approach to editing with your Avisynth scripts. And I think that makes sense.

               

              Unfortunately, I'm far from proficient with Avisynth so I'm not much help, but there are some others on the board here who are legitimate gurus when it comes to this kind of stuff (Dan Isaacs, for example). I'm sure he and others will pop into this thread at some point if you keep it alive long enough. I imagine you could use the Avisynth Batch Scripter to process a directory full of files with just a generic source filter; this would create your proxies that you'd edit from, with no heavy-duty filtering overhead. Then, when you're ready to export, you could re-run the batch scripter with your additional filters and replace the original AVS scripts (close PPro before you do so, though). When you relaunch PPro, it won't be any the wiser and all the original, uneffected "clips" will be replaced with the effected versions. Export as usual.

               

              That's the theory, anyway. In practice, it may take more than that But that should be something to get you started.

              • 4. Re: AVISynth Filters Work Real-Time or During Encoding?
                Typhoon859 Level 1

                Oh, well..  That sounds like it should work.  It's basically something that'd do automatically what I said would be inefficient manually (adding the code to the files each time before the rendering).  Partially because I'm lazy, I was hoping to get this done without bringing any more external factors into the process, basically only using Windows, AVISynth, and Premiere capabilities or a combination of the two/three.  When it comes to encoding, there are enough factors involved as it is so now adding this Avisynth Batch Scripter to the mix seems a bit crazy.  If nobody can think of another way, I'll look into that further.

                 

                Like I said, sounds like it should work though, thanks.

                • 5. Re: AVISynth Filters Work Real-Time or During Encoding?
                  Jim_Simon Level 8

                  Your best bet would be to render whole new media files first and work with them rather than the .avs scripts.

                  • 6. Re: AVISynth Filters Work Real-Time or During Encoding?
                    Typhoon859 Level 1

                    Well in the end, if I want to use AVS filters, I'd have to change all the files to their AVS substitutes anyway, or am I missing something here?..

                    • 7. Re: AVISynth Filters Work Real-Time or During Encoding?
                      Jim_Simon Level 8

                      I think you're missing something.

                       

                      You start off with the original media.  You decide on your filters, create the .avs scripts.  Use those scripts to create new media files, which you then bring into Premiere to edit with.  Make sense?

                      • 8. Re: AVISynth Filters Work Real-Time or During Encoding?
                        Typhoon859 Level 1

                        Yeah..  That's what I do normally.  How does that change anything?  I'm talking about not having Adobe Premiere try to render the video with the filters when it's giving me a preview of my timeline.

                        • 9. Re: AVISynth Filters Work Real-Time or During Encoding?
                          Jim_Simon Level 8

                          I think you're still missing something (or maybe I am).

                           

                          Currently you're importing the .avs file into Premiere, yes?  I'm talking about processing all your original media using the desired filters outside of Premiere.  You create new media files, and work with them.  Those new media files already have the filters processed into them, and so work the same as the originals from Premiere's standpoint.

                           

                          For example.  You start with a DV clip of a wedding ceremony.  You create an .avs script using the filters you like.  Using VirtualDub, you process that .avs script and create a new DV clip.  It's that new clip you work with in Premiere, not the .avs script.

                           

                          Make more sense now?

                          • 10. Re: AVISynth Filters Work Real-Time or During Encoding?
                            Typhoon859 Level 1

                            OH!  Well.  The reason I don't do that is because that means I'm going to lose quality.  That's what I've been doing earlier.  Basically, I'd be encoding the file twice, first through VirtualDub, and then when I'm exporting it from Premiere.

                            • 11. Re: AVISynth Filters Work Real-Time or During Encoding?
                              Jim_Simon Level 8

                              That's right, but it is your best option here.  You will also find DV files much easier to work with than either Divx originals, or .avs scripts.  You could try creating new files using a lossless codec like Lagarith, and indeed might have to if your source media is anything other than 720 x 480 in size, but they don't edit quite as well as DV files in Premiere.  Still, it may be worth a shot.

                              • 12. Re: AVISynth Filters Work Real-Time or During Encoding?
                                Typhoon859 Level 1

                                Encoding it with a lossless codec will leave me with huge files, wasting my HDD space.  Colin Brougham found a solution already.  I was just looking for a shorter one.  The solutions you've presented are feasible solutions but they're sorta changing the playing field so to speak.  Thanks for the ideas though.

                                • 13. Re: AVISynth Filters Work Real-Time or During Encoding?
                                  Jim_Simon Level 8

                                  Unfortunately, there just is no way to 'turn off' the filter processing while editing.  Colin's idea, or even your own of using two sets of scripts in different folders, are the closet you can come to that ideal.

                                  • 14. Re: AVISynth Filters Work Real-Time or During Encoding?
                                    Typhoon859 Level 1

                                    I don't know what I'm thinking but maybe you can develop the idea further.  I'm thinking about using nesting/different sequences to accomplish this.  Could that help in some way?

                                    • 15. Re: AVISynth Filters Work Real-Time or During Encoding?
                                      Jim_Simon Level 8

                                      No, it wouldn't help.  The clips in the bins would still be the same.

                                      • 16. Re: AVISynth Filters Work Real-Time or During Encoding?
                                        Typhoon859 Level 1

                                        Here's what I'l basically do then..  I'm just going to have a folder with all the AVS files that have the sources and commented out filtering code in them.  Inside this folder will be another folder that I will name "Temporary".  Somewhere else I'll have a folder with those same AVS files where I'll UN-comment out the code.  Whenever I need to render the video, I will drag and drop all the original AVS files into the "Temporary" folder and copy & paste the ones with the filters to the folder that I moved the files from.  When and if I need to edit the video again, I just cut and paste the files out of the "Temporary" folder and replace the ones with the active filters.  That's all.  I don't think it's too tedious.