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.


All times are GMT -5. The time now is 05:49 AM  —  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.