PDA

View Full Version : Uncompressed Interlaced Video?


extra
29th June 2009, 17:52
Hi,

Sorry if this is not the right place to post this question.

I have some interlaced video in the form of frame pictures (a frame picture contains two fields). I want to make a video file so that I can play the file in a player and make use of the player's deinterlacing ability. Also I want to keep the video as uncompressed to best maintain the quality. Then I ran into a puzzle: how to make an uncompressed interlaced video? The interlaced video I have ever seen are all compressed... Please help if you got any idea.

Extra

neuron2
29th June 2009, 18:01
What is the format of your source video? Container? Codec?

What player are you referring to?

nm
29th June 2009, 18:02
I have some interlaced video in the form of frame pictures (a frame picture contains two fields). I want to make a video file so that I can play the file in a player and make use of the player's deinterlacing ability. Also I want to keep the video as uncompressed to best maintain the quality.
Why? The only reason I can think of would be archiving important footage or lossless intermediates for editing. And even then I'd compress losslessly with x264, FFV1, huffyuv, Lagarith or some other codec. What player (software and hardware) do you target and what is the resolution of your video?

extra
29th June 2009, 20:08
Thanks for the reply. The input is not in a video format. It's a sequence of images.

Actually we are doing some research on deinterlacing algorithms and would like to compare our algorithm with those adopted by some popular players, such as WMP, MPC or VLC player. That's why we don't want to use lossy compression.

To use lossless video compression is a good idea actually. But I still want to know if "uncompressed interlaced video" is possible just out of curiosity.

nm
29th June 2009, 20:29
Actually we are doing some research on deinterlacing algorithms and would like to compare our algorithm with those adopted by some popular players, such as WMP, MPC or VLC player.
Ok, check out yadif (http://guru.multimedia.cx/deinterlacing-filters/) in MPlayer and ffdshow too. :)

But I still want to know if "uncompressed interlaced video" is possible just out of curiosity.
Sure. You need to put it in a container though to make those players play it back. Raw/uncompressed AVI would probably work in all of them. ffmpeg should be able to convert an image sequence to uncompressed AVI.

extra
30th June 2009, 16:24
Ok, check out yadif (http://guru.multimedia.cx/deinterlacing-filters/) in MPlayer and ffdshow too. :)

I will give a try :)

Sure. You need to put it in a container though to make those players play it back. Raw/uncompressed AVI would probably work in all of them. ffmpeg should be able to convert an image sequence to uncompressed AVI.

I tried to use uncompressed AVI for progressive video without any problem. But for interlaced video, there's no place to specify "interlaced" such that the player could call its deinterlacing algorithm automatically... that's my question actually...

neuron2
30th June 2009, 16:50
AVI does not carry any interlaced/progressive flag, so your goal is not possible.

nm
30th June 2009, 17:24
I tried to use uncompressed AVI for progressive video without any problem. But for interlaced video, there's no place to specify "interlaced" such that the player could call its deinterlacing algorithm automatically... that's my question actually...
Well, VLC and MPlayer never deinterlace automatically anyway. For DirectShow-based players such as MPC(-HC) and WMP, you would need to use some other container and possibly a lossy compression scheme. I think ffdshow can set the DirectShow interlaced flag though, so you can force (hardware) deinterlacing that way if the player doesn't provide such an option.

Ghitulescu
30th June 2009, 19:19
Compression algorithms were designed to solve the problem of quantity ;)

If you have 3 seconds of a video (75 images or 150 half images) you won't need any compression.

If you have 98 minutes of Full PAL video you'll definitively need compression.

So it depends on your storage space.

I think that AVI has information of interlaced and pregressive, maybe I'm wrong, but there are many sources for AVI that are interlaced (eg MiniDV). It depends solely on the codec, in my view.

nm
30th June 2009, 19:28
I think that AVI has information of interlaced and pregressive, maybe I'm wrong, but there are many sources for AVI that are interlaced (eg MiniDV). It depends solely on the codec, in my view.
AVI can certainly contain interlaced video, both compressed and uncompressed, but there are no flags in the container to signal such content. Uncompressed video needs container-level signaling for automatic deinterlacing -- unless the player has some content-based detection scheme.

extra
30th June 2009, 19:35
AVI can certainly contain interlaced video, both compressed and uncompressed, but there are no flags in the container to signal such content. Uncompressed video needs container-level signaling for automatic deinterlacing -- unless the player has some content-based detection scheme.

Why don't we have FourCC's for interlaced uncompressed video? For example: IRGB, then we can put it in the biCompression field of the BITMAPINFOHEADER struct.

Actually, in http://www.fourcc.org/ there are YUV formats called IUYV and IY41 for interlaced YUV. But they are not commonly used as far as I know and I would doubt any player can play them.