digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Bitrates: CqMatic Error (http://www.digitalfaq.com/archives/encode/13860-bitrates-cqmatic-error.html)

dlettau 10-05-2005 05:31 PM

CqMatic Error
 
When try to do a full encode with cqmatic I get the alam Illegal Stream Format. Here is my avisynth script

# -= AviSynth v2.5.5.0 script by FitCD v1.2.4 =-





Loadplugin("C:\unfilter\UnFilter_Avisynth_2.5_Alph a\UnFilter.dll")
Loadplugin("C:\mpeg2dec\MPEG2Dec3.dll")
Loadplugin("C:\temporalcleaner_25_dll\TemporalClea ner.dll")
Loadplugin("C:\Documents and Settings\Administrator\Desktop\Download\Filters\un dot\UnDot.dll")

mpeg2source("C:\Movie\VIDEO_TS\movie.d2v")

TemporalCleaner(5, 10)
UnDot()


BicubicResize(448,256,0,0.6,10,60,700,356)
AddBorders(16,160,16,160)
Trim(0,33929).FadeOut(150)

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

AddBorders(8, 9, 8, 9)
Limiter()

function fmin( int f1, int f2) { return ( f1<f2 ) ? f1 : f2}

I am new to this, I am not sure if I should have Tmepgenc open when I do a full encode with cqmatic or not. Let me know if there are problems or needed improvements to this script or if more info is needed.

THX

Dialhot 10-05-2005 05:39 PM

First you should use short pathname everywhere when you do KVCD.
Normally this is not a problem into a script but you should take the habit to never use long names. So this is too long :
Code:

"C:\Documents and Settings\Administrator\Desktop\Download\Filters\undot\UnDot.dll"
Put your Download directory elsewhere (preferably C:\Donwload).

Second : explain with all details when and what gives you the error. The "illegal stream alarm" speaks to you because you just had it but if I have to remember what gives this that I didn't have since, what, 12 months ?, then I can be wrong.

I'm quite sure so that you put your avs also on the desktop. Did you ?
If yes, then this is probably the source of your problem.

dlettau 10-05-2005 08:06 PM

I am working on getting the paths shortened. One other strange thing, No matter what I put in for avg. bitrate cqmatic comes back with 89.73 , I also opened another project and got the same value. I am now switching to dvd2avi version 1.76 to see if this helps.

dlettau 10-05-2005 08:10 PM

Also here is my updated script

Code:

# -= AviSynth v2.5.5.0 script by FitCD v1.2.4 =-





Loadplugin("C:\unfilter\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
Loadplugin("C:\mpeg2dec\MPEG2Dec3.dll")
Loadplugin("C:\temporalcleaner_25_dll\TemporalCleaner.dll")
Loadplugin("C:\undot\UnDot.dll")

mpeg2source("C:\Movie\VIDEO_TS\movie.d2v")

TemporalCleaner(5, 10)
UnDot()


BicubicResize(448,256,0,0.6,10,60,700,356)
Trim(0,253824).FadeOut(150)


ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

AddBorders(8, 9, 8, 9)
Limiter()

I got rid of the 1st border created by fitcd

Thx

kwag 10-05-2005 08:15 PM

Quote:

Originally Posted by dlettau
One other strange thing, No matter what I put in for avg. bitrate cqmatic comes back with 89.73

From the first post here: http://www.kvcd.net/forum/viewtopic.php?t=5145

Code:

Instructions and notes:
For CalcuMatic: If you want to run CalcuMatic from CQMatic, please put both files in the same directory. Then, when you click on the "Calculator" button of CQMatic, CalcuMatic will be launched.
*** TMPGEnc Project file must be saved as "text" project *** Exclamation CQMatic will not read TMPGEnc's propietary project files.
You must make sure that you save the project without source range selection, and "Cut editing" cleared (or reset), and start frame set to 0 and end frame set to -1. Normally, that is the default. But if you have done source editing, make sure you clear the list, and "Uncheck" source range. If you don't, CQMatic will run, but TMPEG will abort because of errors.

-kwag

dlettau 10-07-2005 06:44 PM

I was able to get cqmatic to run. The only problem is that when I mux the audio & video with mplex or with tmpenc the movie starts in sync but it looses sync more the farther along the film goes. I am using dvd2avi 1.76 to create d2v file extracting the audio to a wav file track #1, channel format auto select, dolby digital decode, mpeg audio demux, 48-44.1 off. Any help would be great. The vidoe portion turned out excellent. It's the Matrix.

Prodater64 10-07-2005 09:31 PM

Quote:

Originally Posted by dlettau
I was able to get cqmatic to run. The only problem is that when I mux the audio & video with mplex or with tmpenc the movie starts in sync but it looses sync more the farther along the film goes. I am using dvd2avi 1.76 to create d2v file extracting the audio to a wav file track #1, channel format auto select, dolby digital decode, mpeg audio demux, 48-44.1 off. Any help would be great. The vidoe portion turned out excellent. It's the Matrix.

Surely you are doing a system change and tmpgenc don't do that with audio if you don't include audio in your avs file, then, you have to reencode audio with besweet doing your mp2 by yourself.
You can't use original audio as extracted with dvd2avi if there is a system conversion.

dlettau 10-08-2005 04:42 AM

I used headache to create mp2 file from dvd2avi wav file. I am not sure what you mean by a system change.

rds_correia 10-08-2005 05:38 AM

By system change Prodater64 means going from 25 frames per second to 23.9xx frames per second or the opposite way around.
That is, if you do a system conversion with the video then you have to do the same with the audio ;-).
If you're not doing a system conversion then you're either doing something wrong with the muxing or the muxing utility is screwing it up.
Or last but not least, you're not using a DVD source and probably you are working with an AVI source (Mpeg4/DivX/XviD).
In case you think the problem is down to the muxing engine please try bbMpeg (if you are aiming for K(S)VCD) or Muxman (if you are aiming for KDVD).
An alternative to Muxman is DVDLab Pro but that one is not freeware...although it is the best DVD muxing studio that I know for Windoze :D.
These are prooven for keeping everything in sync.
If you are using an AVI instead of a DVD source...get rid of that AVI and try a DVD :P.
There is no way to tell if such AVI is 100% healthy and sometimes things like this out of sync can occur.
There are tools that try to repair it but these tools can fail too...
Cheers

Anerboda 10-08-2005 06:33 AM

You are using this:
Code:

Trim(0,253824).
in your script.

Are you trimming the audio aswell? If not that may be the reason for the muxed movie to go out of sync.

-Anerboda

Dialhot 10-08-2005 06:56 AM

Quote:

Originally Posted by Anerboda
You are using this:
Code:

Trim(0,253824).
in your script.

Are you trimming the audio aswell? If not that may be the reason for the muxed movie to go out of sync.

-Anerboda

Not at all. This trim select a part in the begining of the movie. The audio can't become out of synch because of that. In the worst case, the audio will be longer then the video, and you will have an unsuspected result at the end.

kwag 10-08-2005 10:26 AM

Quote:

Originally Posted by dlettau
I used headache to create mp2 file from dvd2avi wav file. I am not sure what you mean by a system change.

Have you tried TMPEG muxing (in the MPEG tools tab) instead of MPLEX :?:

-kwag

dlettau 10-08-2005 12:27 PM

Ok let me try to responde to all the help which I greatly appreciate. I am using a DVD source, I tried using tmpgenc to mux also. I think some of the problem may lie with my pc that I used let me know what you think. It is a PII 1 ghz with 512 ram, running win xp pro. When I took a close look at the video file (M1V File) I noticed that the video is messed up also, scenes repeat
2 or 3 times(2-3 second clips). I am following Dark Princes DVD to kvcd Tutorial. I heard mention that Kwag also had some tutorials. If I could have a look at them it would be great. Thanks for all the help.

kwag 10-08-2005 12:57 PM

Hi dlettau,

Try another DVD source, just to see if the problem is that particular movie.
This has happened to us in the past, so it could be the problem.

-kwag

dlettau 10-08-2005 02:54 PM

I am trying it another pc. If someone could give an example of a current avs script I would appreciate it. Some of the scripts that I have found are a bit old and am having a hard time finding the filters. I have already looked at the avs site which has quite alot. I have not been able to find asharp and a few others that are referred to.

THX

rds_correia 10-08-2005 05:28 PM

Hya dlettau
Then try some scripts from the optimal scripts sub-forum.
Here, take a link http://www.kvcd.net/forum/viewtopic.php?p=21878#21878.
Try using the For DVD and clean material ( for use ONLY with AviSynth 2.5x ).
But I would advise you to try a different source movie.
As Karl already said we've had some issues with some movies in the past.
Cheers

dlettau 10-09-2005 06:40 AM

Code:

## DLL Section ##
#
Loadplugin("C:\Filters25\TemporalCleaner.dll")
LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp.dll")
LoadPlugin("C:\Filters25\unfilter.dll")
LoadPlugin("C:\Filters25\undot.dll")
#
####
## Main section and static filters ###
#
Mpeg2Source("C:\Joe\joe.d2v")
#
undot()
asharp(1, 4)
#GripCrop(Your_GripCrop_Parameters_Here)
#GripSize(320,208,0,0.6,0,6,720,468)
#BicubicResize(320,208,0,0.6,0,6,720,468)
AddBorders(8, 9, 8, 9)
STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual )
# This will apply variable temporalsoften
# and variable blur.
# Both filters are active at all times, and work inversely proportional to the
# activity, measured from current frame to next frame.

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1)  ")
#

#GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!

#
#
## Functions ###

function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}
 
#


I am trying a different source now. But when I run avs file at the top of the video I get this message Eavaluate:Unrecognized exception([ScriptClip]),Line1
Not sure what this is and wasn't sure what to do with gripsize & gripcrop.

THX

rds_correia 10-09-2005 07:22 AM

Please make absolutely sure that you're running the latest Avisynth 2.5.5.
Go get it here http://prdownloads.sourceforge.net/a...5.exe?download.
Other users in the past had issues like the error message that you're talking about and they fixed it by either reinstalling Avisynth 2.5.5 or just by upgrading to Avisynth 2.5.5.
Oh, and forget about GripCrop()/GripResize()/GripBorders().
Just use the BicubicResize() line that you commented with the hash (#) and move the AddBorders() line to the place where you had GripBorders() line.
Now, I looked at your BicubicResize()/AddBorders() combination and something is strange in the figures you're using :?.
Where did you get those figures?
Please try FitCD here http://shh.sysh.de/files/FitCD_v128.zip.
Just input the figures in FitCD and let it do the calculations ;-).
If you are unsure how it works check this tuto in this post http://www.kvcd.net/forum/viewtopic.php?p=113035#113035.
Hope you make it :).
Cheers

dlettau 10-09-2005 08:29 AM

Thanks alot for the help I will check to see what versions I am running and let you know how I make out.

dlettau 10-09-2005 09:10 AM

I think this formula was giving me trouble I made it one line and cqmatic is going thru its moves, the only thing I am a little concerned about is the the cq value it is coming up with is about 57 and avg. bitrate of 548 , the movie concert length is 163min. I am curious as to how well the filters work. :roll:

Code:

function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}

       
Quote:

       
       
               
       
       

                       

                       
                                :roll:
                       
                       

               



rds_correia 10-09-2005 10:52 AM

Quote:

Originally Posted by dlettau
I think this formula was giving me trouble I made it one line and cqmatic is going thru its moves

Yes, you're right. Sometimes when we copy/paste the script into a text-file some weird spaces are added to the text and they could be the reason for the scriptclip error too.
Good job :).

Quote:

Originally Posted by dlettau
the only thing I am a little concerned about is the the cq value it is coming up with is about 57 and avg. bitrate of 548 , the movie concert length is 163min. I am curious as to how well the filters work. :roll:

Well 548 giving a CQ under 60 might not be enough for your eyes.
Anyway CQ=57 it's not enough to my eyes.
You'll make your own judgement on that ;-).
If you're not pleased with what you get, try to lower the resolution one step.
For instance, if you're encoding to 528x576(480) try to go for 480x576(480) instead.
That will immediatly rise your CQ on the next CQMatic run.
The other 2 possibilities are to spread your encode to 2 CDs instead of 1 CD or then you could try some more compressible script which I wouldn't recommend (my special taste...).
But good to see that you're already on track.
Cheers

dlettau 10-09-2005 01:40 PM

I am encoding at 352X240, the stramge thing is the video prtion of the file ended up at 579,167,994 bytes. I may have set something wrong?

Dialhot 10-09-2005 01:46 PM

What bitrate did you choose for the audio ?

dlettau 10-09-2005 02:01 PM

The audio bit rate is at 128 which makes the file around 123mb. The Video file ended up around 566mb but with a cq of 54.6 and an avg bitrate of 548. I can probably trim the video from 163 min down to about 143 getting rid of the interview. Should I use dvd2avi to clip the film length?

kwag 10-09-2005 02:54 PM

Quote:

Originally Posted by dlettau
Should I use dvd2avi to clip the film length?

No need for that :)
Just mux your streams with MPLEX using start time of 0 and end time in seconds at the point you want to cut.

-kwag

dlettau 10-09-2005 06:20 PM

I want to thank all that helped me in the past few days. I have learned a great deal and am well on my way. This isn't the easiest thing to do but you guys have helped alot. Thanks again. I will let you know how my first project turns out. :lol:

dlettau 10-09-2005 07:49 PM

OK I finished the project, sorrt of, I just wanted to see if audio was synced. It was. The file was too big though. I used the values from cqmatic it's a pitifull cd55.01 with an average bitrate of 384.75. The original is a dvd rip 4:3 and 137.5 min long. My question is, I am using the kvcd template cq 352X240 film ntsc plus, is this the best template for a 4:3 film. It seems you get higher quilty with 16:9 because you can cut off the black at top and bottom.

kwag 10-09-2005 08:08 PM

Quote:

Originally Posted by dlettau
It seems you get higher quilty with 16:9 because you can cut off the black at top and bottom.

Exactly :!:
And with a full screen movie, you can only get around 90 minutes on a CD, with reasonable quality.
Also an average bitrate of 384.75 is just WAY to low, unless you plan on viewing on a 9" CRT :D

-kwag

dlettau 10-10-2005 07:15 PM

Ok I have a finished kvcd I split the concert in to 2 discs. The only question I have is when I create my mp2 file should I convert from 48khz down to 44.1 & should I leave the framerate at 23.97. The video looks a little jerky. Also I think my stand alone dvd player (Sony) doesn't care for this particular project, The audio goes out of sync, but when I play it, (VCD), on the computer it looks fine and I also checked out the mpg file before I muxed it.

8)

kwag 10-10-2005 09:50 PM

Quote:

Originally Posted by dlettau
Ok I have a finished kvcd I split the concert in to 2 discs. The only question I have is when I create my mp2 file should I convert from 48khz down to 44.1 & should I leave the framerate at 23.97.

Downsample to 44.1Khz. Not all players are capable of 48Khz, so that could give you problems.
Quote:

The video looks a little jerky. Also I think my stand alone dvd player (Sony) doesn't care for this particular project, The audio goes out of sync, but when I play it, (VCD), on the computer it looks fine and I also checked out the mpg file before I muxed it.

8)
Same thing. Probably the audio sync issues are because of the 48Khz audio.
Reencode your original audio with HeadAC3he, and make sure you check the "resample" option and select 44.1Khz :)

-kwag

dlettau 10-11-2005 04:53 AM

Kwag what about the jerky video, is 23.97 the proper setting for an ntsc film?

Dialhot 10-11-2005 05:45 AM

Quote:

Originally Posted by dlettau
Kwag what about the jerky video, is 23.97 the proper setting for an ntsc film?

On a VCD, you can keep the 23.976. DVD needs 29.970 only.

dlettau 10-15-2005 04:48 AM

Well I have encoded a couple of movie so far all looks great, I was wondering if someone could take a look at my avs script and see if it looks good or may need better or more or less filters. I am not realy sure what the mergechroma & mergeluma do. Again thanks for all the help. I just finished encoding I Robot (115min 16X9 ntsc) looked pretty good.

Code:

## DLL Section ##
#
Loadplugin("C:\Filters25\TemporalCleaner.dll")
LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp.dll")
LoadPlugin("C:\Filters25\unfilter.dll")
LoadPlugin("C:\Filters25\undot.dll")
#
####
## Main section and static filters ###
#
Mpeg2Source("G:\I_Robot.d2v")
#
undot()
asharp(1, 4)
BicubicResize(352,176,0,0.6,0,58,720,360)
AddBorders(0,32,0,32)
STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual )
# This will apply variable temporalsoften
# and variable blur.
# Both filters are active at all times, and work inversely proportional to the
# activity, measured from current frame to next frame.

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1)  ")

## Functions ###

function fmin( int f1, int f2) {return ( f1<f2 ) ? f1 : f2}


Dialhot 10-15-2005 01:24 PM

move the addborders line after all the filters. The result will be better, and the encoding faster.
You can remove the Merge* if you plan to put the result on a DVD or on 2 CDs. Else keep them here. There reduce the filesize without affectig too much the quality of the picture.


All times are GMT -5. The time now is 07:43 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.