Log in

View Full Version : ImageSource fails with different types of images


pixaeiro
31st October 2014, 13:28
Hello,

I am trying to render a video using ImageSource but I am getting error messages when I mix different file types.
For example, these two scripts are ok:

------------
v00 = ImageSource( "C:/VideoSamples/AviSynthScripts/ImgsBad/frame-00001.bmp", 0, 100, 25.0 )
v01 = ImageSource( "C:/VideoSamples/AviSynthScripts/ImgsBad/frame-01762.bmp", 0, 100, 25.0 )
video = v00 + v01
audio = WAVSource( "C:/VideoSamples/Material/Audio/1.PixaFluxIs.wav" )
AudioDub( video, audio )
------------
v00 = ImageSource( "C:/VideoSamples/AviSynthScripts/ImgsBad/groundhog.png", 0, 100, 25.0 )
v01 = ImageSource( "C:/VideoSamples/AviSynthScripts/ImgsBad/beaver.png", 0, 100, 25.0 )
video = v00 + v01
audio = WAVSource( "C:/VideoSamples/Material/Audio/1.PixaFluxIs.wav" )
AudioDub( video, audio )
------------

But this script:
------------
v00 = ImageSource( "C:/VideoSamples/AviSynthScripts/ImgsBad/frame-00001.bmp", 0, 100, 25.0 )
v01 = ImageSource( "C:/VideoSamples/AviSynthScripts/ImgsBad/frame-01762.bmp", 0, 100, 25.0 )
v02 = ImageSource( "C:/VideoSamples/AviSynthScripts/ImgsBad/beaver.png", 0, 100, 25.0 )
video = v00 + v01 + v02
audio = WAVSource( "C:/VideoSamples/Material/Audio/1.PixaFluxIs.wav" )
AudioDub( video, audio )
------------

Fails with this error message:
------------
Splice: Video formats don't match
(C:\VideoSamples\AviSynthScripts\ImgsBad\script_bad temp files\script_bad_Source.avs, line 4)
------------

And the worst part is that it fails even when all files are BMPs saved by different applications, say one saved by GIMP and the other saved by PhotoShop.

Is there a rule about this? Or is this a bug?

Thank you!

creaothceann
31st October 2014, 13:57
Use Info to see if there are differences. There might be RGB24 and RGB32.

pixaeiro
31st October 2014, 14:23
Thanks creaothceann.
I tried again with an image saved in GIMP and this is the message I get:
--------------------------
ImageReader: EBMP reader cannot handle compressed images.
(C:\VideoSamples\AviSynthScripts\ImgsBad\script_bmp_gimp temp files\script_bmp_gimp_Source.avs, line 2)
--------------------------
Unfortunately GIMP doesn't have any options to export BMP images that are not compressed.

poisondeathray
31st October 2014, 14:38
ImageSource() works fine here with GIMP BMP images

You have other options for export like TIFF, or losslessly compressed PNG as well

Something else is going on, or you're not exporting from GIMP correctly

feisty2
31st October 2014, 14:39
add "converttorgb32 ()" to every imagesource command line
and happy Halloween!

pixaeiro
31st October 2014, 14:47
Thank you!
Yes, I had to modify my exporter to save the frames as PNG files instead of BMP and now it works correctly.
The BMP files were fine. I can open them in any other application I have tried.

Wilbert
31st October 2014, 23:26
I tried again with an image saved in GIMP and this is the message I get:
--------------------------
ImageReader: EBMP reader cannot handle compressed images.
(C:\VideoSamples\AviSynthScripts\ImgsBad\script_bmp_gimp temp files\script_bmp_gimp_Source.avs, line 2)
--------------------------
Unfortunately GIMP doesn't have any options to export BMP images that are not compressed.
Use use_DevIL=true when loading bmp images that the internal parser doesn't support.

Splice: Video formats don't match
(C:\VideoSamples\AviSynthScripts\ImgsBad\script_bad temp files\script_bad_Source.avs, line 4)
You will get that message if the height/width of the images don't match. What is the format size of the png's and of the bmp's?

Gavino
1st November 2014, 09:50
You will get that message if the height/width of the images don't match.
No - in that case, you get the message "Frame sizes don't match".
"Video formats don't match" means the clips have different color spaces - that's why pixaeiro was able to fix it by converting everything to RGB32.