Mpeg-2 encoding

If you have questions about compression/encoding/converting look here.
User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Mpeg-2 encoding

Post by HalOfBorg » Tue Jun 29, 2010 12:18 pm

I want to enter my new video into Nekocon, and they want the files encoded Mpeg-2.

I don't know much about that, and the few utilities that I have that say they can do it all seem to be messing up.

Mostly they letterbox the file, or change it to square. The square file SAYS it is 720x480, so I assume the pixels shape has changed.

The original file is from Sony Vegas Pro. It is 720x480 Lagarith with PCM audio.

I have no trouble making a Q1 Xvid from this.

Can someone tell me the best way to make an Mpeg-2.

(I do not have the AMVApp installed as Vegas won't run with it installed for some reason).

:cry:
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: Mpeg-2 encoding

Post by Qyot27 » Tue Jun 29, 2010 2:12 pm

Firstly, write a script to load the video. AVISource("yourvideo.avi") should be all that's required.

The latest version of HCenc 0.24 is here:
http://forum.doom9.org/showthread.php?p ... ost1389678

You can use that to encode to MPEG-2. Experiment with the settings to get a handle for which ones affect quality, or if you'd rather skip that part, copy and paste the following into Notepad and save it with an .ini extension. Then, load the .ini into HCenc, give it your AviSynth script, and set where you want the output .m2v file saved.

Code: Select all

*BITRATE          7000
*MAXBITRATE          7500
*2PASS
*PROFILE          best
*ASPECT          4:3
*GOP              12 2
*DC_PREC          10
*PROGRESSIVE
*INTRAVLC          2
*CLOSEDGOPS
*LASTIFRAME
*MPEGLEVEL        MP@ML
*MATRIX           mpeg
*WAIT             0
Going from the specifications on the contest entry page, it forbids using AC3 for the audio, which means you have to use MP2. Make sure the audio is at 48kHz, and then use twolame (probably through BeLight or something, I don't know of any GUIs for it since I use it through the command line on those rare occasions I need MP2) to encode the WAV to MP2.

I'm also assuming that the file you have is already 29.97fps and is supposed to be viewed as 4:3.

You can use the free trial version of TMPGEnc to mux the video and audio together*. File->MPEG Tools. The Simple Multiplex tab should already be selected. Just give it the video and audio and tell it to go. Said trial version can be used to encode MPEG-2 for 30 days, but A) I have no way of knowing whether you've ever used the trial, which means the trial period is probably expired, and B) HCenc is free, and has pretty much equivalent - if not superior - quality.


*I don't mux them this way, but this is the only trustworthy, simple GUI-based solution I know of. I once again use the command line for this part, just like I do for the video and audio encoding.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Re: Mpeg-2 encoding

Post by HalOfBorg » Tue Jun 29, 2010 5:03 pm

I don't use AVISynth, but I use Xvid4PSP to make simple scripts when I do need it for programs like this. (I know JUST enough to know what you meant!)

I didn't know about MP2, so thanks a LOT for that!

As for muxing - no problem. Xvid4PSP. Free. Just select video, then import the audio. Set both to COPY and your all done.

We'll see how well I do.
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Re: Mpeg-2 encoding

Post by HalOfBorg » Tue Jun 29, 2010 5:30 pm

OK, the .ini is accepted, loaded the .avs I made through xvid4psp (default), rendering.
Then I encode the audio WAV file as an MP2, mux that and the MV2, change extension to .mpg and it should all be good. I hope. :)
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Re: Mpeg-2 encoding

Post by HalOfBorg » Wed Jun 30, 2010 6:35 am

I did the render, and it still played back square. G-Spot still insists that it is 720x480.

So...... I had MediaPlayer Classic save an image - and THAT opens in normal, correct 720x480!!

G-Spot always DID say "Codec Not Installed" (even though it IS and it plays same on 3 PCs), so I DLd and installed Stinky's codec. G-Spot STILL says it's not installed, but now it plays in MPC correctly. :)

So maybe the output files were OK all along. Now I've got to make the audio track and mux it.

Thanks for the help!
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Mpeg-2 encoding

Post by mirkosp » Wed Jun 30, 2010 7:23 am

GSpot is bad, use MediaInfo instead, it's already more reliable. Also, for the filetypes that it opens, you might want to go for avinaptic. And for MKV it can't get better than MKVInfo, I guess.
Image

User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Re: Mpeg-2 encoding

Post by HalOfBorg » Wed Jun 30, 2010 8:10 am

mirkosp wrote:GSpot is bad, use MediaInfo instead, it's already more reliable. Also, for the filetypes that it opens, you might want to go for avinaptic. And for MKV it can't get better than MKVInfo, I guess.
I will look into those.

As to the encoding success - scratch that. Nothing plays once I've muxed it - and I use xvid4psp to mux a LOT. The file opens, it SAYS it's playing, but nothing happens, scroll bar won't move. Rebooted, uninstalled codec pack, installed latest, nothing. Tried 2nd machine as well.

Xvid4PSP has Mpeg-2 in it, so I made a Lagarith with PCM audio with Sony Vegas (so I have nice new with it's own audio) and I'm letting it make it with default settings. We shall see.

I'd just say 'screw it' and not enter Nekocon, but I want to try to win 2 in a row upbeat/Comedy. :jester:
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Re: Mpeg-2 encoding

Post by HalOfBorg » Wed Jun 30, 2010 8:20 am

Nope, that won't play either. Something is wrong here, and I suppose it's PEBKAC. :cry:
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Re: Mpeg-2 encoding

Post by HalOfBorg » Wed Jun 30, 2010 8:21 am

Can't even do THAT correctly!

PEBCAK.
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

User avatar
HalOfBorg
Joined: Wed May 14, 2008 7:19 pm
Org Profile

Re: Mpeg-2 encoding

Post by HalOfBorg » Wed Jun 30, 2010 10:03 am

OK - It seems that TMPGEnc Plus 2.5 was able to do it. 720x480, plays AND with sound. .MPG file, codec is Mpeg-2, IS installed, even got the audio correct (MP2 @ 48,000). :) Yay.
Help HalOfBorg fight his cancer - http://www.gofundme.com/21ygdk

ImageImageImage
ImageImageImage

Locked

Return to “Conversion / Encoding Help”