Log in

View Full Version : how to frameserve VC-1 elementary stream?


simps
7th October 2010, 10:42
So I have a xxx.vc1 elementary stream. I would like to frameserve it using avisynth.
What is the ideal way to do this?
I know DGDecNV does it, but I have an old GPU (G80) that won't work with it I guess. Is there a workarround?

Hagbard23
7th October 2010, 11:27
DSS2 or FFMS2

for DSS2 you have to grab the avss.dll from the Haali Media Splitter Package.

FFMS2 you can get here inside the forum (use search)

simps
7th October 2010, 11:32
I don't get it. I already have a VC-1 decoder installed. (sonic CinePlayer HD DVD Decoder)

I can play VC-1 files in any media player.

How come DirectShowSource() doesn't work?

sneaker_ger
7th October 2010, 11:44
I don't get it. I already have a VC-1 decoder installed. (sonic CinePlayer HD DVD Decoder)

I can play VC-1 files in any media player.

How come DirectShowSource() doesn't work?

You also need a filter that reads the file and passes the stream onto the decoder.

Hagbard23
7th October 2010, 11:53
You also need a filter that reads the file and passes the stream onto the decoder.

Thats's rrright.

DSS2 is not a codec and it is no codec involved in the plugin - it just reads transfers data from and to the decoder-plugin via DirectShow. You have to be sure, that the desired codec is really used. Sometimes the Windows decoder is used, which is not what you want. Use GraphStudio to change the merit of your installed codecs.

FFMS2 is either no codec, but something similar to DSS2 without DirectShow. BUT instead it uses FFMPEG libraries to decode the video. So with that solution, you can't use your favourite decoder-plugin, but that shouldn't be a problem, since FFMS2 does decoding veeeerrry well....

simps
7th October 2010, 12:04
Thanks Hagbard23 and sneaker_ger.
I got it now.

For DSS2 you said I need avss.dll, so is this correct for an avisynth script?

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\avss.dll")
DSS2("C:\a\a.vc1")

Can you please show me in detail how to use DSS2 and FFMPEG?

simps
7th October 2010, 13:06
So, I have Sonic CinePlayer HD DVD Decoder installed.
I can open VC-1 elementary stream (xxx.vc1) in any media player in my computer.

I want to frameserve xxx.vc1 with avisynth, so I created this script:

LoadPlugin("C:\Arquivos de programas\AviSynth 2.5\plugins\avss.dll")
dss2("C:\a\a.vc1")

And this is the error I get from virtualdub when I try to open the .avs file:

http://img822.imageshack.us/img822/2343/imagemqta.jpg

Can someone help?

Atak_Snajpera
7th October 2010, 13:13
Wouldn't be easier to just mux .vc1 into .mkv???

simps
7th October 2010, 13:15
As I write, I am trying this:

eac3to a.vc1 a.mkv

LoadPlugin("C:\Arquivos de programas\AviSynth 2.5\plugins\avss.dll")
dss2("C:\a\a.mkv")

I hope it works.

Hagbard23
7th October 2010, 13:36
it should ...

simps
7th October 2010, 13:39
HOLY ****! It didn't work.


eac3to v3.24
command line: eac3to c:\a\a.vc1 c:\a\b.mkv
------------------------------------------------------------------------------
VC-1, 1080p24 /1.001 (16:9)
Muxing video to Matroska...
Added fps value to MKV header.
Video track contains 187652 frames.
eac3to processing took 21 minutes, 45 seconds.
Done.


LoadPlugin("C:\Arquivos de programas\AviSynth 2.5\plugins\avss.dll")
dss2("C:\a\b.mkv")


http://img838.imageshack.us/img838/9224/imagemlps.jpg


I can't make the avisynth script work, but I can play the .mkv file or the .vc1 file normally in any media player on my computer.

So, can someone help?

rack04
7th October 2010, 13:46
HOLY ****! It didn't work.


eac3to v3.24
command line: eac3to c:\a\a.vc1 c:\a\b.mkv
------------------------------------------------------------------------------
VC-1, 1080p24 /1.001 (16:9)
Muxing video to Matroska...
Added fps value to MKV header.
Video track contains 187652 frames.
eac3to processing took 21 minutes, 45 seconds.
Done.


LoadPlugin("C:\Arquivos de programas\AviSynth 2.5\plugins\avss.dll")
dss2("C:\a\b.mkv")


http://img838.imageshack.us/img838/9224/imagemlps.jpg


I can't make the avisynth script work, but I can play the .mkv file or the .vc1 file normally in any media player on my computer.

So, can someone help?

Have you tried FFMS2?

simps
7th October 2010, 14:08
Have you tried FFMS2?

Not yet. I heard its not frame accurate and not as reliable as DSS2(). I was trying to avoid FFMS2, but looks like I will need to give it a try.

simps
7th October 2010, 14:21
Looks like DSS2() wasn't liking my Sonic VC-1 Decoder.
I unistalled the Sonic VC-1 Decoder, and installed WMP11 that comes with microsoft VC-1 decoder.
Everything works now.

LoadPlugin("C:\Arquivos de programas\AviSynth 2.5\plugins\avss.dll")
dss2("C:\a\b.mkv")

http://img43.imageshack.us/img43/1664/imagemswz.jpg

So, tell me about this WMP11 VC-1 decoder... Is it as good as the Sonic?

Hagbard23
7th October 2010, 15:16
I would say it is more or less native. A good/bad distinction is difficult for me, i would say:

If it works sufficiently and if you are pleased with the result it is GoOd. If not (Sonic Decoder) it is *BaD*.

I would recommend you to check FFMS2 out, maybe the result is a littlebit faster.

P.S. If you are using DSS2/FFMS2, then please set it up correctly (set the Framerate, to be exactly)

simps
7th October 2010, 15:23
I know this footage is 24000/1001, so if I put this on my script, will I be using DSS2() the right way?

LoadPlugin("C:\Arquivos de programas\AviSynth 2.5 plugins\avss.dll")
dss2("C:\a\b.mkv")
AssumeFPS(24000,1001)

Hagbard23
7th October 2010, 16:38
Nope...

do it this way:

dss2(C:\blah\b.mkv,FPS=23.976)

simps
7th October 2010, 16:48
But isn't 23.976 different from 24000/1001?
I know this footage is 24000/1001 for sure... Why should I put 23.976 there?

Hagbard23
7th October 2010, 16:54
Calculate it out... ;) it is the same...

24000/1001 = 23,976023976023976023976023976024

But if you are kind of paranoid ( ;) ) you can use the following:

dss2(C:\blah\b.mkv,FPS=24000/1001)

P.S.: I do not know if it works ;) ... But if we speak about FILM Material no one out there would speak of 24000/1001 Framerate - it is a general convention to speak about 23.976 Frames per Second, since the rounding error is disappearing small... no need to be super-exact.. ;)

Inspector.Gadget
7th October 2010, 16:54
In theory you don't need to AssumeFPS where your source filters work properly. If Avisynth's Info() appended after the source filter shows an accurate framerate, then you're good to go.

Hagbard23
7th October 2010, 16:55
In theory you don't need to AssumeFPS where your source filters work properly. If Avisynth's Info() appended after the source filter shows an accurate framerate, then you're good to go.

You misunderstood it - it was the point to fix the source filter to a special framerate - this *could* be damn necessary... ;)

simps
7th October 2010, 17:00
The difference between 24000/1001 and 23.976/1000 is 0.0000239 seconds or 0.0239ms.
x=24000/1001 = 23.9760239
y=23976/1000 = 23.9760000
x-y=0.0000239 seconds

In a 3 hour footage / movie, there will be 10800 seconds.
So 10800 x 0.0000239 = 0.25812 = 258ms

So by the end of the footage / movie, there will be a delay of 258ms and that is a HUGE delay, everyone can notice the audio/video sync issue.

I think I will keep AssumeFPS(24000, 1001).

Hagbard23
7th October 2010, 17:09
You misunderstood it.

The AssumeFPS() Function is to set up AviSynth correctly and that >indeed< is not necessary.

BUT:
It is important to set the source-filter correctly, since it is not always clear, that the Framerate is correctly stored inside the stream. I am no expert in this, but i DO know, that if you are in the need to use DirectShowSource(2) (which is not respected very high) you SHOULD set it - it is an important parameter AFAIK.

If you are in the need to set it up -overcorrect- then, please, use more digits after the comma:

DSS2("C:\blah\b.mkv", FPS=23.976023976023976023976023976024)

or

DSS2("C:\blah\b.mkv", FPS=24000/1001)


That should do the job - even if that sounds a bit ridiculous to me...:o

simps
7th October 2010, 17:15
But look at the script...

LoadPlugin("C:\Arquivos de programas\AviSynth 2.5 plugins\avss.dll")
dss2("C:\a\b.mkv")
AssumeFPS(24000,1001)

I think it doesn't matter what DSS2() thinks the frame rate is, since the next line will tell everybody forever and ever, that it is 24000/1001. I think I could even put dss2("C:\a\b.mkv",fps=25) there, and it won't matter because the next line (AssumeFPS(24000,1001) ) will be the one telling everybody that will ever read the .avs file, that this footage is 24000/1001.

So once you put some AssumeFPS line in your script, I don't think you need to especify the frame rate in the DSS2() parameter.

I could be wrong... maybe someone with more experience could help us here.

Hagbard23
7th October 2010, 17:21
do it like you want - i do not want to discuss it further - if you read the guides about dss2/dss/ffms2 you will see, that nearly everybody says the same...but do it like you want it...

Midzuki
7th October 2010, 17:37
Looks like DSS2() wasn't liking my Sonic VC-1 Decoder.

Not rarely, both DirectShowSource() and DSS2() don't try to build the graphs in the same way as the actual players, therefore they will fail sometimes.

So, tell me about this WMP11 VC-1 decoder... Is it as good as the Sonic?

For videos created with the Windows Media Format 11, the DMO decoder replaces the first frame of the video with a copy of the second frame, IF the stream contains B-frames. The same happens for many/most streams created by the VC-1 SDK or by MainConcept Reference, with or without B-frames.

simps
7th October 2010, 17:50
Hagbard23, hey man you helped me before in this thread and I am in no way trying to fight or prove you wrong or anything like that. We are just both trying to understand more about this subject.

This is what I think:

DSS() and its variants, will usually read countainers. Things like .MKV .MP4 .AVI, etc... And a container have its own fps flag. So there will be a video stream inside it (which already has its fps flag) and the container's fps flag. Sometimes they won't match and this can be a mess when using DSS() and its variants. And thats the reason people use to specify the frame rate.

More specific filters, like AVCSource, MPEGSource are a bit more reliable.

Since I know this, I make sure that my video stream and my container (mkv) have the same frame rate flag, in this case 24000/1001. So there is no way DSS() and its variants can go wrong.

And, just to make things ever safer, I am using AssumeFPS(24000,1001) at the end of the script.

This is the reason I don't think I need to specify the frame rate, in the DSS2() parameter.

But like I said, I could be wrong, I am no expert in this.
Maybe someone with more experience can come here and help us.

simps
7th October 2010, 18:02
Midzuki,

Good to know that. See if you can help me with the MISSING FRAME puzzle.

When I demuxed the blu-ray with "eac3to c:\a\prestige 1) -demux", eac3to told me the video stream had 187652 frames.

Then I muxed the .vc1 file into mkv (eac3to a.vc1 a.mkv)

Then when I open the mkv file with DSS() in virtualdub, it tells me there are 187652 frames, but when I use DSS2(), virtualdub tells me there are 187651 frames. LOL!

FROM EAC3TO LOG:
Video track 2 contains 187652 frames.

DSS()
http://img641.imageshack.us/img641/6334/17484712.jpg

DSS2()
http://img833.imageshack.us/img833/879/25172876.jpg

Gavino
7th October 2010, 19:24
...
or
DSS2("C:\blah\b.mkv", FPS=24000/1001)

That should do the job - even if that sounds a bit ridiculous to me...:o
24000/1001 won't work as it will do an integer division (giving 23). You need to write 24000.0/1001 to get a floating-point division.