View Full Version : Converting tga sequences to Y8 video streams
alexh110
27th August 2009, 01:16
Hi all.
I'm trying to convert a tga or bmp sequence to a monochrome video stream in the Y8 format.
Can anyone advise how this can be done, as I'm a bit stumped at the moment!
MatLz
27th August 2009, 02:15
Hi all.
I'm trying to convert a tga or bmp sequence to a monochrome video stream in the Y8 format.
Can anyone advise how this can be done, as I'm a bit stumped at the moment!
Hi Alexh110, in virtualdub you can change the video color depth to your need.
alexh110
27th August 2009, 02:34
Thanks for your reply; but I'm not sure how that helps?
I don't want to reduce the colour depth; but rather to save the sequence as a video stream with FOURCC Y8. (The colour depth is irrelevant because the image sequence is in monochrome.)
There doesn't seem to be any output compressor available to make a raw Y8 video stream. (N.B. These typically have the extension .y rather than .avi)
I can read the .y files in using AviSynth's RawSource plugin, and convert them to bmp or tga sequences using Virtual Dub; but I have no way of converting these tga sequences back again once I've processed them.
MatLz
27th August 2009, 02:50
It works for me.
Maybe with my bad english, my explanation didn't speak to you but you can save in uncompressed y8 with virtualdub. It's in the 'color depth option'. After that just put out the stream with a demux tool.
Good luck.
alexh110
27th August 2009, 03:11
Thanks, I think the problem may be that my version of Virtual Dub is out of date, and doesn't have the Y8 option.
I'll try downloading the latest version.
Do I still set the output compressor to "Uncompressed RGB/YCbCr"?
MatLz
27th August 2009, 03:28
Do I still set the output compressor to "Uncompressed RGB/YCbCr"?
Yes, you do. Don't forget to precise your framerate!;)
alexh110
27th August 2009, 17:48
Many thanks for taking the time to reply.
Is there any way to stop Virtual Dub writing a file header?
I need the video stream to be raw headerless Y8, otherwise my software does not correctly recognise the footage and the framing is corrupted.
Wilbert
27th August 2009, 18:18
Get Immaavs and try:
# saves to a raw greyscale clip:
c = ImageSource(...)
ImmaWrite(c, "file_raw", type="raw", mode="Grayscale", animation=true)
# can be read by the plugin RawSource as "Y8"
alexh110
27th August 2009, 18:49
Thanks.
I tried running that script, but it says "there is no function called Immawrite".
I've copied Immaavs.dll to C:\Windows as well as AviSynth's plugins folder, so I'm not sure what's wrong?
I'm using AviSynth version 2.5.7: do I perhaps need an updated version?
Wilbert
27th August 2009, 19:19
I'm using AviSynth version 2.5.7: do I perhaps need an updated version?
No.
I've copied Immaavs.dll to C:\Windows as well as AviSynth's plugins folder, so I'm not sure what's wrong?
immaavs should only be in AviSynth's plugin folder (if not, you should load it manually). You need to use v1.41.
alexh110
27th August 2009, 23:37
It seems the problem was I didn't have the ImageMagick dll's installed.
I've installed them to C:\Windows\System, but now Virtual Dub comes out with the error:
"You haven't set the MAGICK_HOME variable, and you didn't provide the argument"
My script is as follows:
c = ImageSource("F:\Temp\0.tga")
ImmaWrite(c, "file_raw", type="raw", mode="Grayscale", animation=true)
Gavino
27th August 2009, 23:57
From the documentation immaavs.htm:
You need to set the MAGICK_HOME variable to the location of ImageMagick dll's (under Settings -> System -> Advanced -> Environment Variables -> Add MAGICK_HOME as a user variable), or you need to provide it using the magick_home argument. Thus magick_home = "C:\\WINNT\\system32".
alexh110
28th August 2009, 00:14
Thanks,
I've done that now, and Virtual Dub is reading the script.
However unfortunately it's not producing the video stream from the tga sequence; but rather is repeating the first image in the tga sequence over and over: so I just end up with a video of a still frame!
alexh110
28th August 2009, 00:30
I think I've figured it out now, have changed my script to:
c = ImageSource("F:\Temp\%01d.tga", start = 0, end = 480)
ImmaWrite(c, "file_raw", type="raw", mode="Grayscale", animation=true)
Hopefully that will work!
Many thanks guys for your advice
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.