digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Tmpgenc does not accept the Mp2 file? (http://www.digitalfaq.com/archives/encode/8408-tmpgenc-accept-mp2.html)

kev23m 03-01-2004 04:07 AM

Tmpgenc does not accept the Mp2 file?
 
I have the encoded m1v and mp2 files.
Not muxing with bbmpeg reaches 99% and stays there.
With Tmpgenc it does not accept the Mp2 file says Illegal Mpeg Audio.
Used Dvd2Avi to get the wav file and the Besweet to encode to Mp2.
Besweet Command: "C:\Program Files\Eazy VCD\BeSweet\BeSweet.exe" -core( -input "d:\Encoded\Namak Halal\nh AC3 T01 2_0ch 224Kbps 48KHz.wav" -output "d:\Encoded\Namak Halal\nh AC3 T01 2_0ch 224Kbps 48KHz.mp2" -logfilea "C:\Program Files\Eazy VCD\BeSweet\BeSweet.log" ) -ota( -hybridgain ) -mp2enc( -m s -b 192 -e ) -profile( ~~~~~ Default Profile ~~~~~ )

Here is the newbie Template
SOURCE:

- Filetype Mpeg2/DVD
- interlaced(means combing on fast moving scenes) or not interlaced ? : no
- Framerate (29.97, 23.976, 25.000) ? : 29.97
- Resolution ? : 720*480
- Audiosamplerate (44.1 khz, 48 khz)? : 224 kbps 48khz
- Audio Type (AC3, mp3, mp2) ?: Ac3
- Is Audio VBR or CBR ? Vbr
(some answers you get if using Gspot on the source!)


DESTINATION:

- KVCD, K(S)VCD or KDVD ?: K(S)VCD
- Mode (mpeg1 or mpeg2) ?: Mpeg2
- Framerate (29.97, 23.976, 25.000) ? : 29.97
- Resolution ? 480x480
- Audiosamplerate (44.1 khz or 48 khz) ? : 48khz
- Audio Enc Type (mp2, AC3) ?: Mp2
- Encoding Appl. (CCE or TmpgEnc) ?: Tmpgenc
- muxing Appl. (TmpgEnc, BBmpeg, etc.) ?: Tried with both no success
- Authoring Appl. (Vcdeasy, VCDgear, Nero) ?: Nero
- Burning Appl. (Vcdeasy, Nero, etc.) ?: Nero

If Avisynth is used: YEs

- Which Version of Avisynth Do you use? 2.5
- Post your last state of your script here!:
## DLL Section ##
#
#
####
## Main section and static filters ###
#

Mpeg2Source("D:\Encoded\Namak Halal\nh.d2v")

#
undot()
Limiter()
asharp(1, 4)
BilinearResize(448, 446, 0, 1, 720, 478)
AddBorders(16, 17, 16, 17)
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))
#
#

## 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) ")

#
#
#


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

#
#
## Functions ###

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

#
####

incredible 03-01-2004 04:32 AM

1. NEVER use DVD2AVI to generate WAVs from VOBs!
Just demultiplex the ac3s in DVD2AVI and use besweet to do a ac3 to mp2 conversion.

2. As you wnat to author a KVCD/KsVCD your audio HAS TO BE in 44.1 Khz! Sound within VOB sources is everytime 48 Khz as this is DVD legal.

kev23m 03-01-2004 04:46 AM

Thanks Incredible
I aint that familar with besweet , how do i change it to 44 mhz. I was using the besweet gui and just input and wav to mp2.
For a 3 hour video the mp2 file comes to 164 mb , can i compress it further.

One more thing i would like to know.

I used Tok for this was just doing the prediction myselft using ksvcd template and settled for cq 82.

This m1v i made is at cq 53, done by tok.

Dialhot 03-01-2004 05:02 AM

Quote:

Originally Posted by kev23m
I aint that familar with besweet , how do i change it to 44 mhz.

GO in the SSRC tab and put 44100 as resample frequencies, then return back to besweet tab(hte main one) and check the box "SSRC".

Quote:

For a 3 hour video the mp2 file comes to 164 mb , can i compress it further.
You use 224 as bitrate for audio. You can go down to 112 with no real loss. Just do it and your audio file will be half 82 Mb.

Quote:

This m1v i made is at cq 53, done by tok.
Not so bad with 224 as audio. Il will be near 60 with 112. You can have a little more if you limit the MAX video bitrate.

kev23m 03-01-2004 05:25 AM

This is the method i am using for prediction now rather than Tok.

I add this line to the script: Sampler(100,length=24)

No of frames/25/100 = x
File size of sample*.98*x=Predicted File size.

I am trying to fit this in one cd using mpeg-1 and limiting the max bitrate.

Dialhot 03-01-2004 06:26 AM

Quote:

Originally Posted by kev23m
I add this line to the script: Sampler(100,length=24)

No of frames/25/100 = x
File size of sample*.98*x=Predicted File size.

That is known as "manual prediction" and it's far more accurate than Tok. But if you want to use an automatic tool for that, better than tok, you can try CQMAtic (see the related section of the forum).

What are your current min/max video bitrates ?

kev23m 03-01-2004 06:33 AM

Min Bit rate is 300 max now 1200 , using mpeg-1.

Sound i encoded like u said at 112 kbps , saved 20 mb.

Muxing worked too.

Dialhot 03-01-2004 06:46 AM

Quote:

Originally Posted by kev23m
Min Bit rate is 300 max now 1200 , using mpeg-1.

1200 starts to be low indeed. Try to lower your min to 64 and see if your standalone can support that (make a test on a 10 min sample taht's enought).

Quote:

sound i encoded like u said at 112 kbps , saved 20 mb.
???
From 224 to 112 ? Are you sure you weren't doing 128 ? 112 is exactly HALF of 224 so you must save HALF of the space.

kev23m 03-01-2004 09:53 AM

If i got it correct you want to try Min Bitrate 64 and see if my player supports it right.

The earlier mp2 was 164mb at 192kbps.

Dialhot 03-01-2004 10:03 AM

Quote:

Originally Posted by kev23m
If i got it correct you want to try Min Bitrate 64 and see if my player supports it right.

Right.

Quote:

The earlier mp2 was 164mb at 192kbps.
164/192*112 = 95 Mb !

For 167 min audio file size is :

- 140 MB at 112 Kbps
- 160 MB at 128 Kbps
- 200 MB at 160 Kpbs
- 240 at 192.

So your audio were 128.

kev23m 03-01-2004 10:23 AM

Right.

Just checked it .

Anything else i can do to get it to fit on one cd with the best quality.Right now using the kvcd - plus 352x288 pal template.Encoding the video at 352x240.Cq will be 56 with sound being 140mb.

Here is the script i am using.

## DLL Section ##
#
#
####
## Main section and static filters ###
#

Mpeg2Source("D:\Encoded\Humraz\humraaz.d2v")

#
undot()
Limiter()
asharp(1, 4)
DctFilter(1, 1, 1, 1, 1, 1, 0.5, 0)
FluxSmooth(7, 7)
Tweak(hue=0, sat=1.0, bright=0, cont=1.0)
GripCrop(352,480)
GripSize(resizer="BicubicResize")
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))
BlockBuster(method="noise", detail_min=1, detail_max=10, variance=1.0, seed=0)
#
#

## 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) ")

#
#
#


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

#
#
## Functions ###

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

#

#
####

kev23m 03-02-2004 06:12 AM

What did i do wrong in the prediction?

No of frames = 323068
Frame Rate = 29.97
So i got 323068/100/29.97=107.79

Sample Size 6.2
So 6.2*0.98*107.79=654.9mb

File size after encoding = 800mb.

Cq = 63.15
Min Bitrate= 270
Max Bitrate= 1500

jorel 03-02-2004 07:08 AM

Quote:

Originally Posted by incredible
1. NEVER use DVD2AVI to generate WAVs from VOBs!

:?
why don't incredible?!?!

i did lots of times and never got problems.
dvd2avi have some bug that i don't know :?:

Dialhot 03-02-2004 07:57 AM

Quote:

Originally Posted by kev23m
What did i do wrong in the prediction?

Nothing but the CQ result is very unpredictable.
Try CQMAtic, it will perhaps find a CQ more accurate for your work.

NOTE : WHY DO YOU USE 29.97 ? You should better do 23.976 MPEG2 with "3:2 pulldown during playback" set in tmpgenc.

Dialhot 03-02-2004 08:11 AM

Quote:

Originally Posted by jorel
why don't incredible?!?!

i did lots of times and never got problems.
dvd2avi have some bug that i don't know :?:

Never is a big word. But "it is not a very good thing to process like this" is better.

DVD2AVI is very bad at downmixing (going from 5.1 to stero WAV). Headac3che or besweet do that a lot better. That is why you shouldn't use DVD2AVI to produce the wav.

Now, if you are dealing with 2 channel audio (and not 5.1), DVD2AVI produces a good WAV.

jorel 03-02-2004 08:23 AM

yes,i see Phil!
of course,headac3he is better(my opinion too) and i use for kvcds.

<edited>
see the reason from dvd2avi faq:

Q20: Should I check Dolby Surround downmix?
A: Leaving it unchecked will only decode the two main front channels, left and right.
If it is checked, the center and surround channels will be encoded into the resulting wav file, but with 'pro logic' encoding.
-->This may distort the audio somewhat when played back on a non pro logic capable playback system.

:wink:

kev23m 03-02-2004 01:45 PM

If i encode the video at 23.76, i will have to encode the mp2 also right , select ntsc>29.97 to 23.76.
It increased the mp2 file to 200mb , bitrate 96kbps.

Here is besweet command.
"D:\My Downloads\BeSweetv1.4\BeSweet.exe" -core( -input "d:\Encoded\nh.ac3" -output "d:\Encoded\nh.mp2" ) -azid( -c normal -g 0.95 -L -3db ) -ota( -r 29970 23976 ) -ssrc( --rate 44100 ) -toolame( -m s -b 96 -e )

Dialhot 03-02-2004 04:24 PM

No you don't have to do that has using 23.976 with 3:2 pulldown won't change the length (in minute) of your video, so the length of the audio shouldn't be modifeid either, and in other words, you don't have to change it's fps (changing the fps actually change the length, that is why your file size increase).

In fact what I find strange is that your source is 29.97. Are you sure about that ? What kind of source is that ? A blockbuster movie ? A TV show ? What exactly ?

kev23m 03-02-2004 04:31 PM

It shows 29.97 in DVD2AVI and MovieStacker both.
Its a Dvd of an old Indian Film.

Ok i have rencoded the sound now with headache without changing the fps at 96kbps to accomdate better quality video.

Gonna encode it with Cqmatiq and give it a go. Hopefully this time the size will not exceed.

Thanks for the help.

Dialhot 03-02-2004 04:42 PM

Quote:

Originally Posted by kev23m
It shows 29.97 in DVD2AVI and MovieStacker both.
Its a Dvd of an old Indian Film.

Okay, so you have to stay in 29.97.

kev23m 03-03-2004 04:40 AM

Thanks a Lot!

I have successfully made my first kvcd.
It's 180 mins fit onto one cd.
352x240 , the quality is not bad.

Though my script worked with tok , cqmatic just did not work , would open empty windows and then encode the video at default cq 60.

Dialhot 03-03-2004 04:50 AM

Quote:

Originally Posted by kev23m
Though my script worked with tok , cqmatic just did not work , would open empty windows and then encode the video at default cq 60.

You surely have an audio source defined in your tmpgenc project; You must let this field empty for CQM to work.

kev23m 03-03-2004 05:08 AM

Will try cqmatic in the next file i try.

This movie which i have encoded is 774mb , but showing track length as 88.09 and nero would not burn it , any way out.

Edit:

It's done, multiplexed it with bbmpeg and track length 79m.

Thanks dialhot , my kvcd guru.

WOWIEGURL 06-05-2004 12:32 AM

Quote:

Originally Posted by kev23m
Min Bit rate is 300 max now 1200 , using mpeg-1.

Sound i encoded like u said at 112 kbps , saved 20 mb.

Muxing worked too.

what did you use to calculate your min and max rates?

Dialhot 06-05-2004 02:59 AM

Quote:

Originally Posted by WOWIEGURL
what did you use to calculate your min and max rates?

Nothing; Only experience and experiment are talking there.

WOWIEGURL 06-05-2004 05:42 AM

... great its taking forever to do this one movie.I've been encoding 5 times today and each time with different results. None are the ones I want. Can someone show me how to calculate the min and max for movies that I am trying to back up? cqmatic only gives the avg. But not the min and max. HELPP!!!!

Prodater64 06-05-2004 06:25 AM

Quote:

Originally Posted by WOWIEGURL
... great its taking forever to do this one movie.I've been encoding 5 times today and each time with different results. None are the ones I want. Can someone show me how to calculate the min and max for movies that I am trying to back up? cqmatic only gives the avg. But not the min and max. HELPP!!!!

What is your encoder, please?
If you would use MencodeMe, you could forget these kind of question. But if you want to learn advanced techniques, you will encode again and again, this is the way to learn.
Answering your question, you don't need usualy, to change min and max bitrates. If your encoder is TMPGEnc, first select the adapted template (according with movie time). If your wish is to fit your movie in a X media, play with CQ values, not with bitrates. You can use CQMatic wich will take care of CQ, prediction and encoding.


--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

http://www.digitalfaq.com/archives/error.gif

WOWIEGURL 06-05-2004 09:34 AM

I've switched to cqmatic and my file is the same as the guy who originally made this post, but my file is 83 mins long and can't directly burn it n nero. the cqmatic keeps changing the cq and its taking forever. my encoder is tmpgenc. Tmpgenc keeps saying it can't mak e the m1v file... don't understand y because I have at least 3 gigs of memory avaliable in that drive

kwag 06-05-2004 11:34 AM

@WOWIEGURL,

Post your CQMatic log.

-kwag

bazzy2004 06-05-2004 04:28 PM

Hey!
 
Is it u kev, from desitorrents.com!?!?

:D

thought so wen u sed, old indian movie, n u making kvcd...

hows the quality?

safe...

laterz

Dialhot 06-05-2004 06:35 PM

English please :!:

WOWIEGURL 06-05-2004 08:41 PM

can't copy the log in cqmatic, but after using cqmatic my file has gone from 150570 frames to 120576 frames. It is now 352*240 @ 23.976, cq 79.52.

When I used tok I got this log min 300 max 2300




-------------------------------------------------------------
New Faster Prediction
-------------------------------------------------------------

Full Sample
Next CQ: 70.000. Sample Size: 10,199,815
Small Sample
Next CQ: 70.000. Sample Size: 902,975
Predicting...
NextCQ: 101.760 >=90, so check is needed
Next CQ: 90.000
Sample Size: 13,831,049


Final CQ: 90.000
Total Time For Predicition: 00:06:50


-------------------------------------------------------------
Encoding E:\movie.avs
-------------------------------------------------------------

Encoding... CQ : 90.000
Final Encoded Size: 28,094,039
Muxing ...


Total Time (all operations): 00:13:15

Finished


I really need help

kwag 06-05-2004 08:59 PM

Quote:

Originally Posted by WOWIEGURL
can't copy the log in cqmatic

I should have been more specific.
A double click on the log window of CQMatic, copies the log to the clipboard :roll:

-kwag

WOWIEGURL 06-05-2004 09:13 PM

http://www.kvcd.net
CQMatic Version 1.2.06
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 10:41:14 Date: 06/06/2004
Ready!
Project: E:\movie.tpr

Creating: CQMatic.tpr

E:\movie.mpg
Project resolution: 352x240
Execute.
Movie Time: 83
Average Bitrate: 1177
Full Encode mode
Executing Prediction Phase...
Process started at 10:41:52
On 06/06/2004
Setting up initial sampling.
Using CQ of 70.00
Prediction cycle #1
Encoder started...
Process time: 3.82 minutes.
Encoder end.
File size difference = 1.263873
Low fence: 70.000000
High fence: 90.000000
Last CQ = 70.00
Current CQ = 88.47
CQ difference = 18.471123
Using CQ of 88.47
Prediction cycle #2
Encoder started...
Process time: 3.82 minutes.
Encoder end.
File size difference = 0.807970
Low fence: 70.000000
High fence: 88.471123
Last CQ = 88.47
Current CQ = 79.24
CQ difference = 9.235558
Using CQ of 79.24
Prediction cycle #3
Encoder started...
Process time: 4.87 minutes.
Encoder end.
File size difference = 1.005316
Low fence: 79.235565
High fence: 88.471123
Last CQ = 79.24
Current CQ = 83.85
CQ difference = 4.617783
Using CQ of 83.85
Prediction cycle #4
Encoder started...
Process time: 10.78 minutes.
Encoder end.
File size difference = 0.818771
Low fence: 79.235565
High fence: 83.853348
Last CQ = 83.85
Current CQ = 81.54
CQ difference = 2.308891
Using CQ of 81.54
Prediction cycle #5
Encoder started...
Process time: 9.97 minutes.
Encoder end.
File size difference = 0.870929
Low fence: 79.235565
High fence: 81.544456
Last CQ = 81.54
Current CQ = 80.39
CQ difference = 1.154442
Using CQ of 80.39
Prediction cycle #6
Encoder started...
Process time: 4.95 minutes.
Encoder end.
File size difference = 0.925868
Low fence: 79.235565
High fence: 80.390015
Last CQ = 80.39
Current CQ = 79.81
CQ difference = 0.577225
Using CQ of 79.81
Prediction cycle #7
Encoder started...
Process time: 3.30 minutes.
Encoder end.
File size difference = 0.962527
Low fence: 79.235565
High fence: 79.812790
Last CQ = 79.81
Current CQ = 79.52
CQ difference = 0.288612
Using CQ of 79.52
Prediction cycle #8
Encoder started...
Process time: 3.32 minutes.
Encoder end.
File size difference = 0.984078
Low fence: 79.235565
High fence: 79.524178
Last CQ = 79.52
Current CQ = 79.38
CQ difference = 0.144310
Final CQ value is 79.52
Encoding set to Full encode.
Full encode start...
CQMatic complete!
Total minutes of process: 44.82
Process ended at 11:26:41
On 06/06/2004

Dialhot 06-05-2004 09:39 PM

I don't see what is your problem : CQMatic does its job, find the CQ (79.52) and laucnh the real encode.

Where is your problem :?:


All times are GMT -5. The time now is 06:37 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.