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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th October 2008, 17:44   #401  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
The indexing program wasn't written by me and I actually haven't looked closely at the source yet (but I suspect that I soon will have to). Most likely TheFluff did something very clever. So clever no other CLI app does it. In the future it should also be easier for you to link directly to ffms2.dll when doing indexing. (unless you use a very weird programming language)

1) They are identical to the four first of FFVideoSource. (source, track, cache, cachefile)
2) No, there's no reliable way that I know of to skip frames in the way that's required. All I can think of would more or less be equivalent to putting trim() after the source filter.
3) I think all of those are directed to stderr but I'm not sure. Logging things seems to be very integrated into ffmpeg itself so I'm not sure what can be done about it but I'll look into it.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 5th October 2008, 21:50   #402  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,241
Quote:
I have a problem with the ffmsindex.exe program. I want to use it because unlike FFVideoSource it can show it's process. Unfortunately once I use it from my program it doesn't show the progress anymore.
I have the same problem. It would be nice if you added switch so every percent would be in new line. This should solve our problem.
Atak_Snajpera is offline   Reply With Quote
Old 5th October 2008, 21:51   #403  |  Link
vlada
Registered User
 
Join Date: Apr 2003
Location: Czech Republic
Posts: 752
Atak_Snajpera> I'm glad you confirmed the problem. I was afraid there might be something wrong on my side.

Myrsloik> Thanks a lot for your answers. I know that the indexing program wasn't written by you, but I hope TheFluff is hanging somewhere around. I'm using Python as my programming language. There is a ctypes wrapper to load compiled C libraries. But I have no knowledge how to use it. Also I would have to introduce threading, because using external DLL locks the main loop. So an external CLI application (which runs in a separate process by default) is right now the best solution for me.

I'm working on a program which would take any input video, process it with AviSynth and output it to many predefined formats (based on presets). It should be able to process many files at once. The workflow is following:
1) You select your files to convert
2) The files are added to list and analyzed (audio/video parameters, autocrop etc.) and previews are created
3) You select a preset (PMP model, cellphone model, typical HD rip or custom preset)
4) Just press "Encode" and wait until it is finished.

There is an additional 2b step step, where you can change many parameters, but some are locked or limited to keep compatibility with the preset you selected. So using it should be really simple. But I'm currently not satisfied with the step 2. Opening video files takes a long time (mainly because of indexing) and I can't even show it's progress. Choose one file, wait a minute, then choose another one, another minute and so on. That disappoints you...

So this why I was asking if it would be possible to index only a part of a video file. To display a preview or to detect letterboxing I only need few frames from the video. As you said - like using Trim() - but much faster. The full indexing would be done before compression.

As for the errors, I get them from stdout. But maybe I've redirected the stderr to stdout. As I said I'm still quite lost in this, I only understand the high level programming. I will need to have a deeper look into this and how do the modules I use work. In case somebody's interested I use this module to run external processes.

Last edited by vlada; 6th October 2008 at 01:14.
vlada is offline   Reply With Quote
Old 11th October 2008, 17:00   #404  |  Link
Quark.Fusion
Registered User
 
Quark.Fusion's Avatar
 
Join Date: Jun 2008
Posts: 177
Looks like there is memory leak during indexing of a file — during indexing of 50gb m2ts file memory usage pimp up to 1.6gb and ffmsindex crashed (same with virtualdub).

Is it ever possible to access file in linear manner without indexing?
Quark.Fusion is offline   Reply With Quote
Old 11th October 2008, 18:17   #405  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
There shouldn't be any leaks in that part of the code, at least not that depend on the number of frames or file size. Did it get far before crashing? How far does it get in the the file if you use ffmsindex.exe?

I guess I could add yet another seekmode that does linear access without indexing. The problem is that you would have to specify exactly how many frames the source has since avisynth (and vfw in general) doesn't allow it to change after a file has been opened. Could it still be useful with that limitation?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 11th October 2008, 18:56   #406  |  Link
Quark.Fusion
Registered User
 
Quark.Fusion's Avatar
 
Join Date: Jun 2008
Posts: 177
I don't sure at which frame it crashes, but there is definitely a memory leak as memory usage go up and up, with my file it crashes near 900MB of file position. Also during indexing it uses 100% of single core while reading file very slowly — is it decoding to build index?
Maybe it tries to allocate some buffer with size as fraction of system memory? My system is Vista x64 with 8GB RAM.

I can't understand why you can't detect number of frames as directshow returns it without indexing (or that estimated value?).
Quark.Fusion is offline   Reply With Quote
Old 12th October 2008, 10:54   #407  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
Quote:
Originally Posted by Myrsloik View Post
The problem is that you would have to specify exactly how many frames the source has since avisynth (and vfw in general) doesn't allow it to change after a file has been opened. Could it still be useful with that limitation?
not mutch, because we must rely on another tool for analyze the movie

BUT if easy to implement.. feel free to do it thanks

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 12th October 2008, 13:27   #408  |  Link
Quark.Fusion
Registered User
 
Quark.Fusion's Avatar
 
Join Date: Jun 2008
Posts: 177
Quote:
Originally Posted by buzzqw View Post
not mutch, because we must rely on another tool for analyze the movie
It's still faster that waiting for index, especially when it can't construct it
Quark.Fusion is offline   Reply With Quote
Old 12th October 2008, 15:08   #409  |  Link
liquidator87
Registered User
 
liquidator87's Avatar
 
Join Date: Mar 2006
Posts: 70
I can confirm the huge memory usage during indexing... till the program crashes
Tried to index a 20 GiB m2ts file, the memory usage increases till it reaches the max... then BUM!
liquidator87 is offline   Reply With Quote
Old 12th October 2008, 19:30   #410  |  Link
vlada
Registered User
 
Join Date: Apr 2003
Location: Czech Republic
Posts: 752
Quote:
Originally Posted by Myrsloik View Post
I guess I could add yet another seekmode that does linear access without indexing. The problem is that you would have to specify exactly how many frames the source has since avisynth (and vfw in general) doesn't allow it to change after a file has been opened. Could it still be useful with that limitation?
This would be very useful for me, because I detect the number of frames with MediaInfo anyway. So I know the number of frames before creating the AviSynth script.
vlada is offline   Reply With Quote
Old 21st October 2008, 15:43   #411  |  Link
saint-francis
too much lurking
 
saint-francis's Avatar
 
Join Date: Sep 2006
Location: Valhalla
Posts: 668
Myrsloik, are you interested in samples that make you tool crash?
saint-francis is offline   Reply With Quote
Old 21st October 2008, 16:32   #412  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
Yes, if they don't also make fairly recent mplayer/ffmpeg compiles crash. Or have been mentioned in the two previous pages because I can still remember those.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 28th October 2008, 12:10   #413  |  Link
Akatsuker
Hack'n Roll
 
Join Date: Sep 2007
Posts: 46
Hi, i've just tried the FFVideoSource in a VFR mkv file. All the time, all that I've got is:

"Could not open video codec"

Code:
FFVideoSource("E:\video02.mkv",timecodes="TESTTIMECODES.tc",seekmode=1)
I don't know, maybe I doing this wrong. Can you help me?
Thanks a lot in advance.
Akatsuker is offline   Reply With Quote
Old 28th October 2008, 12:47   #414  |  Link
loliconxd
Registered User
 
Join Date: Aug 2008
Posts: 2
mmmm, ffmpegsource can't open correctly vfr files, try with dss or dss2.
loliconxd is offline   Reply With Quote
Old 20th November 2008, 19:02   #415  |  Link
tacman1123
Registered User
 
Join Date: Jun 2007
Location: Washington, DC
Posts: 130
I have the FFMS2.dll in my plugins directory, but I still get an error using FFMegSource() -- did the call change as well? I had another problem, I think, with FFMegSource.dll in the directory as well, is that Version 1?

EDIT: I figured it out, at least I think I did, the call is now FFMS2_FFVideoSource(), yes?

Last edited by tacman1123; 20th November 2008 at 19:05.
tacman1123 is offline   Reply With Quote
Old 20th November 2008, 19:03   #416  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,050
There is no FFMpegSource() in FFMS2.dll (version 2), you must use FFVideoSource() and FFAudioSource() now. Also FFMegSource.dll (version 1) won't be needed!

Didn't you read the readme file?
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 20th November 2008 at 19:59.
LoRd_MuldeR is offline   Reply With Quote
Old 20th November 2008, 20:56   #417  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
A possibly fixed version of the cli index app is now available from http://ivtc.org/new/beta/ffmsindex-progressfix.7z

Try it and report the results. Don't expect any major updates until 2011.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 20th November 2008, 21:39   #418  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Thanks, 2011 is not so distant year
Fizick is offline   Reply With Quote
Old 20th November 2008, 23:39   #419  |  Link
tacman1123
Registered User
 
Join Date: Jun 2007
Location: Washington, DC
Posts: 130
I don't have FFDSHow or Haali Splitter installed, they seemed to really interfere with basic playing of AVI files and returning bad frame info when those avi files were called through Avisynth.

So I was hoping that my mp4 file, which definitely has audio in it and plays fine in GOM, would be able to get the audio with FFVideoSource and/or FFAudioSource. FFVideoSource returns HasAudio as false, and when I try to load the mp4 file with FFAudioSource(mp4_filename), it gives me

Code:
Evaluate: System Exception - Access Violation
Any chance I'll be able to hear audio of mp4 files through avisynth with FFAudioSource? Or something else?

Thx,

Tac
tacman1123 is offline   Reply With Quote
Old 20th November 2008, 23:45   #420  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,050
You need to do it like that:
Code:
v = FFVideoSource("C:\Foobar.mp4")
a = FFAudioSource("C:\Foobar.mp4")
AudioDub(v,a)
But if FFAudioSource() fails on your source file, you'll need to obtain the audio in a different way...
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 20th November 2008 at 23:59.
LoRd_MuldeR 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 12:17.


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