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 13th November 2010, 09:00   #1  |  Link
a1s2d3f4
Registered User
 
Join Date: Nov 2010
Posts: 72
Can AVISynth display PDF?

I have some videos that I have been manipulating with avisynth. I also have a PDF file that has some information related to the videos, which I would like to display underneath as a static image, if there is a way to do that.

In other words, lets say I have a 1920x600 video clip.
I'd like to take my PDF file and display top third of the first page for 10 seconds underneath (stretched to fill 1920x480 rectangle - I was thinking of using StackVertical to create an HD video).

Then, when the video moves on, I display second third (the middle) of the 1st page for another 8 seconds, then the last third for another 5, and so on.

Might anyone know of a solution?
Thanks
a1s2d3f4 is offline   Reply With Quote
Old 13th November 2010, 10:40   #2  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi a1s2d3f4!
Welcome to forum.
You can convert pdf to image png using
Ghostscript http://pages.cs.wisc.edu/~ghost/
and after using
Imagereader http://avisynth.org/mediawiki/ImageSource
insert to Your script.
yup.

Last edited by yup; 13th November 2010 at 10:44.
yup is offline   Reply With Quote
Old 13th November 2010, 10:54   #3  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
You can import pdf directly with Immaread.
Wilbert is offline   Reply With Quote
Old 13th November 2010, 21:39   #4  |  Link
a1s2d3f4
Registered User
 
Join Date: Nov 2010
Posts: 72
OK, thanks. I downloaded what I think is your latest version. But stuck with this problem:

---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Evaluate: System exception - 0xc06d007e
(C:\test\test.avs, line 3)
---------------------------
OK
---------------------------


This is in response to this script:

Code:
filename = "1619.pdf"

ImmaRead(filename, magick_home="C:\\windows\\system32")

Last edited by a1s2d3f4; 15th November 2010 at 08:58.
a1s2d3f4 is offline   Reply With Quote
Old 14th November 2010, 00:03   #5  |  Link
a1s2d3f4
Registered User
 
Join Date: Nov 2010
Posts: 72
Looks like the very last few messages in the thread dedicated to the discussion of Immaavs describe the very same issue.
a1s2d3f4 is offline   Reply With Quote
Old 14th November 2010, 00:27   #6  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
Could you do the following:

1) Put all files in http://www.wilbertdijkhof.com/ImageMagick-6.5.8_dll.zip in your system folder.
2) Set the MAGICK_HOME variable to that folder, in Control Panel -> System -> Advanced -> Environment Variables -> User Variables: MAGICK_HOME=C:\WINNT\system32 (and not in your script).
3) Try to load a jpeg/png image first, using its full path.

and report back.
Wilbert is offline   Reply With Quote
Old 15th November 2010, 08:56   #7  |  Link
a1s2d3f4
Registered User
 
Join Date: Nov 2010
Posts: 72
Sorry. Don't seem to be getting notifications on this thread in my email.

1) I already have them in my system32 folder. (magick_home = that path).
2) I already have MAGICK_HOME set to c:\WINDOWS\SYSTEM32\ - so, I am simply removing the reference from my script.
3) Tried. Used a PNG. Used full path instead of relative. This is the error:
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
ImmaRead: you haven't set the MAGICK_HOME variable and you didn't provide it as argument!
(C:\test\test.avs, line 4)
---------------------------
OK

I do see that variable set with the right path if I run set from my command prompt, so not sure what's going on here.

Tx
a1s2d3f4 is offline   Reply With Quote
Old 15th November 2010, 13:50   #8  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 360
Have you restarted VirtualDub after changing the variable via system properties?

Alternatively you can use SET in the command prompt window to change it, and then start VirtualDub from there.
creaothceann is offline   Reply With Quote
Old 15th November 2010, 16:09   #9  |  Link
a1s2d3f4
Registered User
 
Join Date: Nov 2010
Posts: 72
Perhaps I didn't.
So now I have for sure, and here is the new error message:
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Evaluate: System exception - 0xc06d007e
(C:\test\test.avs, line 4)
---------------------------
OK
---------------------------

Line 4 is my call to ImmaRead()
a1s2d3f4 is offline   Reply With Quote
Old 15th November 2010, 19:26   #10  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
Quote:
Perhaps I didn't.
So now I have for sure, and here is the new error message:
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Evaluate: System exception - 0xc06d007e
(C:\test\test.avs, line 4)
---------------------------
OK
---------------------------

Line 4 is my call to ImmaRead()
Sorry, i have no clue why it doesn't work
Wilbert is offline   Reply With Quote
Old 15th November 2010, 22:27   #11  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
Quote:
Originally Posted by a1s2d3f4 View Post
Evaluate: System exception - 0xc06d007e
(C:\test\test.avs, line 4)
0xC06D007E is "Delay-load Module Not Found" from the Windows LoadLibrary() call.

Generally means that a .dll is missing or not accessible.

Smartarse do-gooder's using SetDllDirectory() in their applications to remove the current directory from the DLL search path can cause this if you rely on the current directory to find some of your .dll's.
IanB is offline   Reply With Quote
Old 16th November 2010, 20:53   #12  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
Quote:
0xC06D007E is "Delay-load Module Not Found" from the Windows LoadLibrary() call.

Generally means that a .dll is missing or not accessible.
It should be looking for CORE_RL_magick_.dll in his system folder, because MAGICK_HOME is pointer there. That file seems to be in his system folder. Any idea how to solve this problem? (It seems to work for other people who are using this plugin.)
Wilbert is offline   Reply With Quote
Old 16th November 2010, 21:21   #13  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
Maybe the runtime support .dll's are not installed.

What compiler was used to build the ImageMagick pluggin?
What compiler was used to build CORE_RL_magick_.dll?
What compiler was used to build any .dll's that CORE_RL_magick_.dll uses?
What compiler was used to build any .dll's that the .dll's that CORE_RL_magick_.dll needs uses?
What compiler was used to build ...
Are the runtime library versions needed for all the above installed?

Are all .dll's that CORE_RL_magick_.dll needs installed?
IanB is offline   Reply With Quote
Old 16th November 2010, 22:51   #14  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
Quote:
What compiler was used to build the ImageMagick pluggin?
What compiler was used to build CORE_RL_magick_.dll?
What compiler was used to build any .dll's that CORE_RL_magick_.dll uses?
What compiler was used to build any .dll's that the .dll's that CORE_RL_magick_.dll needs uses?
What compiler was used to build ...
Everything is build with VC++6.0. So you need the same runtime dll's as needed by AviSynth itself.

Quote:
Are all .dll's that CORE_RL_magick_.dll needs installed?
The needed files (ImageMagick dlls and xmls) are in that zip file above.
Wilbert is offline   Reply With Quote
Old 16th November 2010, 23:30   #15  |  Link
a1s2d3f4
Registered User
 
Join Date: Nov 2010
Posts: 72
Ah! So those xmls are also required?

I didn't realize they needed to be copied in addition to all the dlls. For some reason I thought that only .dlls needed to go into system32.

So, I corrected that problem.

EDIT:
PNG import works fine.

But with PDF, VirtualDub simply closes without any error messages.


ANOTHER EDIT:
And PNG only works if I use full path, not relative.

Last edited by a1s2d3f4; 16th November 2010 at 23:56.
a1s2d3f4 is offline   Reply With Quote
Old 17th November 2010, 20:04   #16  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
Ok, good! Could you upload the pdf somewhere?
Wilbert is offline   Reply With Quote
Old 18th November 2010, 01:11   #17  |  Link
a1s2d3f4
Registered User
 
Join Date: Nov 2010
Posts: 72
Quote:
Originally Posted by Wilbert View Post
Ok, good! Could you upload the pdf somewhere?
http://dl.dropbox.com/u/11118470/test.pdf
a1s2d3f4 is offline   Reply With Quote
Old 18th July 2011, 06:02   #18  |  Link
Alex-Kid
Antronio's DV ambassador
 
Alex-Kid's Avatar
 
Join Date: Mar 2006
Location: Santiago, Chile
Posts: 113
Had the same problem, could open images but no PDFs. But solved it by...

...installing Ghostscript.

Result = it displays 1-frame video with the first page of a PDF.

Last edited by Alex-Kid; 18th July 2011 at 06:14.
Alex-Kid is offline   Reply With Quote
Old 18th July 2011, 12:49   #19  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
http://imageshack.us/photo/my-images/204/testxgx.png/

seems that GS works OK - export to image then import image to Avisynth seems to be most efficient.
pandy is offline   Reply With Quote
Old 18th July 2011, 17:31   #20  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
Quote:
Had the same problem, could open images but no PDFs. But solved it by...

...installing Ghostscript.

Result = it displays 1-frame video with the first page of a PDF.
Good job! I will add this to the documentation. Setting animation=true should load it as an animation (or multipage image).
Wilbert 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 23:58.


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