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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th August 2014, 00:42   #21  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Quote:
Originally Posted by Myrsloik View Post
Now I've encountered another problem. I have no test images that are identified as being in a yuv-ish colorspace so I can't add support for reading them. Apparently jpeg images aren't considered yuv.

My own web hunt for this kind of image failed so sample images are requested.
Practically all JPEG images are YCbCr. (Rec.601 fullscale, to be exact.) IM just doesn't report them as such, since it converts them to RGB normally, though it also supports CMYK and Lab.
foxyshadis is offline   Reply With Quote
Old 13th August 2014, 03:19   #22  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Quote:
Originally Posted by Myrsloik View Post
IMPORTANT ANNOUNCEMENT
The test2 archive has been updated. It now handles reading lists of files properly. Before it would simply return the first image over and over again due to a typo. Get it from the first post..
Thanks. It works fine now. But could you give a look on my report about VapourSynth here https://www.doom9.org/showpost.php?p...postcount=1339 and here https://www.doom9.org/showpost.php?p...postcount=1341
Please

And just one note more
Code:
import vapoursynth as vs
core = vs.get_core()
import os
core.std.LoadPlugin(path=r"d:\TOOLS\MyDCPConverter\Tools\imwri-64.dll")
core.std.LoadPlugin(path=r"d:\TOOLS\MyDCPConverter\Tools\fmtconv.dll")
vl = core.imwri.Read(r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL2\000034L.png")
vr = core.imwri.Read(r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL2\000034R.png")
v = core.std.StackHorizontal([vl,vr])
v.set_output()
With
Code:
vr = vl
the script goes well, but with
Code:
vr = core.imwri.Read(r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL2\000034L.png")
doesn't, again. But now vr equals vl. What is the difference?
It seems like I can't output video with two different imwri.Read's, doesn't it?

Last edited by alexxdls; 13th August 2014 at 04:30.
alexxdls is offline   Reply With Quote
Old 13th August 2014, 13:32   #23  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,575
It actually appears to be because of how imagemagick was compiled when creating a single file plugin. The error message actually comes from pthreads. I'm trying to think of how to fix it.

Anyway, next update will have grayscale support.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th August 2014, 18:58   #24  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
How do I load image sequence?
I've tried test_%03d.tif, but it did not work.
Loading single files was fine.
kolak is offline   Reply With Quote
Old 17th August 2014, 19:00   #25  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,575
Quote:
Originally Posted by kolak View Post
How do I load image sequence?
I've tried test_%03d.tif, but it did not work.
Loading single files was fine.
That's how you do it. Are the files named test_000.tif, test_001.tif...?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th August 2014, 19:12   #26  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
Yes. It says that files can't be found. Does it have to start with 0?
kolak is offline   Reply With Quote
Old 17th August 2014, 19:13   #27  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,575
Quote:
Originally Posted by kolak View Post
Yes. It says that files can't be found.
Try using the full path. And yes, it has to start at 0 at the moment.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th August 2014, 19:24   #28  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
This is probably the reason. Mine starts from 1. Can we have start number as a variable?
kolak is offline   Reply With Quote
Old 17th August 2014, 19:30   #29  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,575
Quote:
Originally Posted by kolak View Post
This is probably the reason. Mine starts from 1. Can we have start number as a variable?
Yes, I'll add it for the next test version.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th August 2014, 19:37   #30  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
How does the writer work.

I tried
s=source...
core.imwri.Write(s, 'DPX', 'D:\test_%03d.dpx')

And put script through vspipe.
Nothing written to the disk. Script itself givses correct output.
kolak is offline   Reply With Quote
Old 18th August 2014, 00:51   #31  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by kolak View Post
How does the writer work.

I tried
s=source...
core.imwri.Write(s, 'DPX', 'D:\test_%03d.dpx')

And put script through vspipe.
Nothing written to the disk. Script itself givses correct output.
Code:
s = source
s = core.imwri.Write(s, ...)
s.set_output()
Frames that aren't requested from imwri.Write() aren't written.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 18th August 2014, 08:15   #32  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
Thank you.
I figured it out.
kolak is offline   Reply With Quote
Old 18th August 2014, 14:30   #33  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Quote:
Originally Posted by kolak View Post
How do I load image sequence?
I've tried test_%03d.tif, but it did not work.
Loading single files was fine.
Code:
dir = r"dir\path/"
srcs = [dir + src for src in os.listdir(dir)]
v = core.imwri.Read(srcs)
works fine for loading images from directory
alexxdls is offline   Reply With Quote
Old 18th August 2014, 14:44   #34  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
%xd also works, but only when your first image has number 0.

When I tried your method I had error saying:
"Don't know what os means".
kolak is offline   Reply With Quote
Old 18th August 2014, 19:54   #35  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
You need "import os" at the top of your script.
sneaker_ger is offline   Reply With Quote
Old 21st August 2014, 13:10   #36  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
Thx.
Will try.
kolak is offline   Reply With Quote
Old 23rd August 2014, 04:00   #37  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Any update in near future?
alexxdls is offline   Reply With Quote
Old 24th August 2014, 01:16   #38  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,575
Quote:
Originally Posted by alexxdls View Post
Any update in near future?
Maybe in a day or two when I finish all the big changes. I decided to go back and redo a fairly big amount of code because the C++ api is useless.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 24th August 2014, 05:51   #39  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Quote:
Originally Posted by Myrsloik View Post
Maybe in a day or two when I finish all the big changes. I decided to go back and redo a fairly big amount of code because the C++ api is useless.
Thanks. I hope you will be able to solve an issue with stacking two different image seqeunces.
alexxdls is offline   Reply With Quote
Old 24th August 2014, 18:11   #40  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,575
Third test and a small list of notable changes in the first post. The dllpath argument is back and so is the dll mess. I'll probably get around to making a single file dll compile some day with mingw. But that's complicated.

This should more or less be the final version. ImageMagick as a library is simply too abstracted/awkward/horrible to use to return native colorspaces. On the positive side I think it can do most important things, read and write a big pile of formats as image sequences. If I ever locate a better library to use maybe I'll have another go. And remember that ffms2 also works for image reading if you want to try something else.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik 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 00:18.


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