Log in

View Full Version : Changing Data Rates on MS MPEG-4 V2


Starduster
30th January 2008, 21:25
I know Microsoft's MPEG-4V2 codec is not real MPEG-4 but I wonder if anyone knows the answer and I didn't know where else to ask.

I need to use the MS MPEG-4 encoder and I'd like to change the data rate programatically. I can open the codec's configure dialog box and change the values from what appears to be a default of 1500 with a slider. I'd like to be able to change that with a program.

Does anyone know if there an API, message, or whatever that can be sent to the codec to change the data rate?

Any direction very much appreciated,

Steve

Sagekilla
30th January 2008, 23:08
Erm, I don't know why you'd use something like the MS MPEG-4 V2 codec.. But anyway, as far as I know I don't think what you would like to do is possible.

Unless you somehow hack into it and gain access into it's internals, but I have no idea how you would go about that.

nm
30th January 2008, 23:34
How about using libavcodec's msmpeg4v2 encoder, if you absolutely must have video in that format (why?). It is probably much more efficient and adjustable than Microsoft's implementation. You can use libavcodec's encoders through ffmpeg, MEncoder, and many other tools, or link libavcodec to your program and call it directly (it's licensed under LGPL).

Starduster
8th February 2008, 01:34
Thanks for the replies, sorry so long to get back.

I'm using this codec because I haven't found anything better when it comes to quality vs. bandwidth requirements. This is for a live video feed and I'm running 640x480 at 15fps and on the average it's taking under 90kbs. Everything else I've tried requires a much higher data rate.

I'll look into the libavcodec codec and give it a try. Any other suggestions for a codec that will give good quality at this frame rate and takes around 100kb bandwidth would be appreciated.

Thanks again,

Steve

akupenguin
8th February 2008, 02:04
You're posting in a H.264 forum about how an obsolete draft of MPEG-4 Simple Profile is the best quality you can find? Prepare to get flamed.

Dark Shikari
8th February 2008, 02:11
Any other suggestions for a codec that will give good quality at this frame rate and takes around 100kb bandwidth would be appreciated.I would hate to see what your video with a butchered version of MPEG-4 SP looks like.

Try x264.

setarip_old
8th February 2008, 03:31
@Starduster

You may find the following information useful:HEX edit hack of default value !
for those who want to make direct graphedit DivX ;-) AVIs

In the codec file DivXc32.DLL (low-motion)
The Bit Rate at AC6
The Quality at 1EA8
The Keyframes at 1EAF

In the codec file DivXc32f.DLL (fast-motion)
The Bit Rate at AC6
The Quality at 1EA8
The Keyframes at 1EAF


In the Decoder file DivX_c32.AX
The default CPU at 20B3

Starduster
8th February 2008, 16:11
akupenguin:
lol... Yes, I was holding my breath when I clicked Post! Unfortunately, I was out of options and everyone in this forum really knows their stuff! I was willing to take some crap if there was a tidbit of knowledge thrown my way.

Dark Shikari:
I'm sure you would be shocked at how good it really is. The live video is crystal clear. Fast movement creates some mosaic effects momentarily but quickly normalizes and provides a good picture again. On top of that, I'm actually having to transport it with TCP rather than UDP so the quality is an extra surprise. I will try the x264. Thanks very much for the suggestion.

Setarip_old:
I've tried the DivX codec but I'll try it again and tweak the bit rate, quality, and keyframs as suggested. Sounds promising.

All:
My apologies and thanks for putting up with a wayward post... but like I said, you all know your stuff!!

Steve

nm
8th February 2008, 16:31
I'd like to be surprised. Could you upload a sample source video and corresponding MS MPEG-4v2 encode? Then we can easily compare it to alternatives.

Sagekilla
8th February 2008, 20:58
Starduster, if you're impressed by the MS MPEG-4 SP codec, then I'm sure you'll be very surprised by x264. You should be able to get much higher quality from the same bitrate, or the same quality at lower bitrates using x264.

Starduster
8th February 2008, 21:20
nm,

I'll see what I can do, but I'll have to figure out how to upload or post a link. The problem is, the video is live so conversations can be held and distributed among the participants in a training session with the instructor's audio (which is why I need: 1. fast encoding/decoding, 2. reasonable quality, and 3. low bandwidth). The session can be recorded, but to do that I'm writing the frames as .avi's and then encoding resulting file into a streaming format (.wmv) for playback after the session so you wouldn't see the exact results.

I can monitor the bandwidth usage during a session and if the instructor is not moving a lot it runs about 30-40kbs and moving about 80-90kbs. I'll try to do some tests over the weekend and post a link.

Steve

Starduster
8th February 2008, 21:24
Sagekilla,

I'd love to be surprised too!! I've been looking for the x264 codec but have only found x264.exe but haven't had much chance to look... pesky work keeps getting in the way of my searching! ;-)

Thanks, can't wait to try it.

Steve

bond
2nd March 2008, 14:43
it is possible to convert ms mpeg-4 to real mpeg-4 with a patched ffmpeg build (:search:)

maybe some real mpeg-4 tools can do what you are asking for, but i heavily doubt it

moved, as posted in the wrong forum

nm
2nd March 2008, 15:42
it is possible to convert ms mpeg-4 to real mpeg-4 with a patched ffmpeg build (:search:)
I don't think that would be rational in this case. Why not encode with an MPEG-4 ASP codec in the first place?

maybe some real mpeg-4 tools can do what you are asking for, but i heavily doubt it
All he was asking for was a good streaming video codec for video conferencing, so why wouldn't some MPEG-4 ASP or AVC implementation (that can encode in real time and with low latency) work much better.

setarip_old
3rd March 2008, 09:13
@Starduster

The reason I provided you with the memory locations regarding DivX v.3.11 alpha is because it is a hack of the codec you inquired about - and the locations may be the same...