Log in

View Full Version : imwri and .dpx sequences


LarryHotdogs
10th December 2015, 20:25
Hello,

I am trying to use VapourSynth to read in a sequence of .dpx files, which I believe should be supported. When I preview the script in the editor, I get the message:

Error getting the frame number 0:
Read: Format mismatch for frame 0, is RGB30 but should be RGB48


Running 'check script' results in:

Script was successfully evaluated. Output video info:
Frames: 864 | Time: 0:00:28.800 | Size: 1920x1080 | FPS: 30/1 = 30 | Format: RGB48

Besides that the frame rate should be 23.976, it looks like it's detecting the sequence okay.

My script is as follows:

import vapoursynth as vs
core = vs.get_core()

core.std.LoadPlugin(r"C:\Program Files\VapourSynth\plugins64\imwri64\imwri.dll")
video = core.imwri.Read(r"path_to_v001.%04d.dpx", 1001)

video.set_output()

And then I assume it could be a simple fix just by manually setting some properties so I've tried playing around with things like
video = core.std.SetFrameProp(video, prop="Format", intval=vs.RGB48)
video = core.std.SetFrameProp(video, prop="FPS Num", intval=24)


But I have no idea what I'm doing so I'm sure that's complete nonsense.


Using VapourSynth r29 and imwri test6

Anyone have any ideas?


Thanks!

AzraelNewtype
10th December 2015, 23:03
You probably want this for the FPS:

video = core.std.AssumeFPS(video, fpsnum=24000, fpsden=1001)

The format is trickier, because I don't know that you can just set its format like that. That's not usually a frame property. I mean, I know how you could convert it, (look at resize) but that may not actually be desirable. See if adding mismatch=1 to the read command helps any maybe?

Are_
10th December 2015, 23:48
Are you sure all your input files have the same format?

LarryHotdogs
11th December 2015, 00:02
Nice, AssumeFPS works. Adding mismatch=1 to the read changes check script to this:

Script was successfully evaluated. Output video info:
Frames: 864 | Time: 0:00:36.036 | Size: 0x0 | FPS: 24000/1001 = 23.976 | Format:

But then crashes the editor when I try to preview it.

I was getting a lot of crashes trying to read dpxs in AviSynth too so it may well be an imagemagick issue...

All the frames in the sequence are the same format.

Myrsloik
11th December 2015, 00:07
Can you make thw three first images in the sequence available?
It could be a bug.

LarryHotdogs
11th December 2015, 00:23
Can you make thw three first images in the sequence available?
It could be a bug.

sure: https://www.dropbox.com/s/a84t4bvlf2wmv9f/dpx_test.zip?dl=1


Thanks for everyone's help on this.

Are_
11th December 2015, 00:29
I have problems with this too:
1. With vs I created some RGB48 dpx files.
2. I tried to read back with imwri.
3. Got "Error getting the frame number 0: Read: Format mismatch for frame 0, is RGB48 but should be RGBS"

IM is compiled with hdri an q16.

aladdin4d
17th December 2015, 02:18
Getting the exact same error with an OpenEXR sequence that worked a couple of weeks ago with r28 so it's something new with r29.

"Error getting the frame number 0: Read: Format mismatch for frame 0, is RGB48 but should be RGBS"

Myrsloik
17th December 2015, 14:18
I broke hdri support in r29 apparently. I think I fixed it but imagemagick is so annoying (4 separate configurations) to test so it'll take a while before I know it's ready.

aladdin4d
17th December 2015, 20:34
Imagemagick being annoying.......imagine that!

Myrsloik
19th January 2016, 15:25
I think I've fixed the bug now. The problem is that imagemagick is shit and doesn't want to make a working windows version. Again. And they eliminated all old source code archives. So I can't go back. Because it's all shit.

But at least the bug is fixed. May I suggest Linux?

Myrsloik
30th January 2016, 03:18
Try the new test version.