Hi every one,
I'm new to video processing and would like some help on some challenges I have now. I want to display a yuv video of foreman (352x288) in virtualdub and I used the following avisynth code to display the video in virtualdub:
I'm getting the following error message: "DirectShowSource: could not open file C:\HEVC1\foreman_420_planar.yuv: Can not play back the file. The format is not supported." I need some help over this, plse.
+ Reply to Thread
Results 1 to 11 of 11
Thread: Display of raw yuv in virtualdub
DirectShow won't have a source filter which recognizes raw YUV. Use RawSource instead. But you will have to tell it width, height, frame rate, and video format; raw YUV does not have any header which could be read to determine these values (therefore no DirectShow filter could be able to read it reliably).
See RawSource releases on doom9 by chikuzen (read on to the end of the thread!) for your optimal version (for AviSynth 2.5.x or 2.6.x).
BTW: Your video is also available as Y4M (YUV4MPEG2, this is with header), which simplifies loading it; RawSource supports Y4M files and does not need extra parameters here, can read dimensions, frame rate and video format from its header. See Derf's collection, look for foreman (CIF = 352x288).
I wonder why 352x288 with 30000:1001 fps. I would swear it is PAL (25.0 fps) instead.
Last edited by LigH.de; 21st May 2014 at 03:56.
I appreciate your quick response to my challenges. Based on your hint, I used the following single line code to solve the problem but argument format flag was raised.
RawSource("C:\HEVC1\foreman_420_planar.yuv", 352, 288, 25, "yuv420")
Plse take a look at the code and give me some help; also I did not understand the last comment you made concerning PAL.
I believe the following should work for the raw YUV file:
RawSource("C:\HEVC1\foreman_420_planar.yuv", 352, 288, "I420", 25, 1)
And this should be enough for the Y4M file, if you downloaded it too; but it may contain a wrong frame rate in its header, which should be corrected:
The history of the CIF spec is derived from MPEG1 Full-Motion video research done WRT Philips' CD-i format (the precursor to VideoCD). This was not expected to be fully NTSC or PAL compliant, since it had more computer-oriented origins. The CD-i players would do the heavy lifting to make the work within the chosen TV system. Once demand for FMV started taking off, then they decided to differentiate the spec based on the 2 systems.
Why this particular file would be encoded that way NOW makes little sense, but do we know its history/provence?...oh, ok, now I see where that is coming from: many of those clips have been used as common references to test against. And many (not the opensource animations, mind) are likely old enough to be from that CD-i FMV era (c.1990). Didn't you all notice the goofy, outdated clothing & hair styles, much less the generally soft optical quality common to cameras of that era?
Somebody needs to do some reference clip updating - preferably using opensource & public domain in 4k, 3d, raw HDR, & HFR.
Scott"When will the rhetorical questions end?!" - George Carlin
1. Before working seriously with extremely complex material, it has to work with simple material as well, so you can quickly check for problems, instead of waiting hours or days before you can check. One step after another. For a first step, this small clip is fine; solving issues with this one is a prerequisite to advancing to bigger and longer clips.
2. As small and simple as it is, this clip reveals Psy-RD artefacts quite obviously, so it is good material for this purpose.
3. Yes, it is old, and the fact that several sources call it "Ossi" makes me wonder if the shown person is a Saxonian, from eastern Germany, previous GDR ("Ossi" and "Wessi" are cuss words for people who each lived "on the other side" of the border through Germany).
RawSource("C:\HEVC1\foreman_420_planar.yuv", 352, 288, "yuyv")
opened-up the video in virtualdub with lots of artifacts.
I upgraded my avisynth to 2.60 built in Jan 14 2013 in an attempt to line-up with yours.
I also downloaded foreman from Derf's collections then I used the second code with .y4m, the file could not open in virtualdub. The error message is: Avisyth open failure: Can not open video file.
My foreman came from http://trace.eas.asu.edu/yuv/
Plse take a look again to see if I'm omitting a plugin.
Thank you very much for all the assistance. if I can get rid of the artefacts, that would be fine. Actually I'm trying to experiment on HEVC codec with some sequences which I downloaded from the site I stated above. Foreman happens to be the first one in the line of my experimentation and it is giving me some rough ride.
The y4m file has all the information needed within the file. All you need is:
You did not read carefully; "yuyv" is the wrong FourCC. I wrote "I420" on purpose.
And yes, better use the *.y4m file with header. It is more reliable.
Hi Ligh.de, Jagabo and Cornucopia
I thank you guys very much for your help and guide. It has been informative, helpful and insightful. I will rely on the .y4m files since it's more useful as you pointed out. I think that this latest hints will give me a clearer picture unless I have a system problem which I doubt.
Thanks guys, you have been amazingly wonderful.