PDA

View Full Version : Program to really edit/change a MPEG file?


Harm
12th February 2004, 16:32
I tried several searches in here or elsewhere but I don't seem to find what I'm looking for.

I'm looking for a tool/program with what I can easily insert/replace frames in a MPEG movie.
I got tools which can extract frames as BMPs but not the other way around....

My main reason for this search is wanting to change menu's which contain looping movies or just plain sequences.

This should be possible or not?

Like to hear from you experts....... :D

Kedirekin
12th February 2004, 18:44
Frames within an MPG file are interrelated. A P frames relies on the information in an I frame - in other words, the information stored in a P frame is only part of the data needed to reconstruct an image - the rest of the data needed is in the I frame. This is how MPG files save so much space - redundant data (parts of the image that don't change from one frame to the next) is not duplicated. Similar sharing goes on between B frames and P (and I) frames.

If you were to try to replace an I frame, it would mess up all the P and B frames that rely on it.

If you were to try to replace a P or B frame, you'd have real difficulty because the I frame it relies on is so very different.

That isn't to say that what you want to do isn't possible, just that's it's much more difficult to replace a frame than it is to extract one. And replacing all the frames (naively, without re-encoding) would probably end up with a series of unrelated (closed) I frames, which wouldn't look very good unless the bitrate were really high.

Chances are what you really want to do is replace an MPG stream with another MPG stream.

Harm
12th February 2004, 19:15
Well I didn't know it was that complicated....... thanks for the explanation..... I'll have to read up on those frametypes.

But..... let's say I want to change a line stating the sort of subtitle in a looping menu this can be done by replacing it by a home made MPG of the same length? Or can it be changed to a still menu without any problem?

Kedirekin
12th February 2004, 20:08
I think it's theoretically possible, but I don't know how to do it or what software to use. It's kind of an advanced question.

You might want to take a look at this thread - Need help to change pictures in an original DVD menu? (http://forum.doom9.org/showthread.php?s=&threadid=70674) - in the advanced authoring forum, and maybe even join the conversation.

Harm
12th February 2004, 20:45
Thanks again for the info.
I had a look at the thread you suggested.
This concerns the replacement of a still menu.
But I guess you can only replace a looping menu by a newly created one instead of editting it............ or does someone know how you can do that?

jggimi
12th February 2004, 20:52
There are a number of choices. I would think that almost all of us do some kind of MPEG editing, be that MPEG-1, MPEG-2, or MPEG-4.

As Kedirekin pointed out, MPEG frames are interdependant, in "Groups of Pictures," or GOPs. Initial frames (I-frames) are self contained, and are often called Key Frames. The other two frame types, Progressive and Bidirectional, are not.

Because of this, most editors must splice (cut or join) at keyframe boundaries. There are apparently some editors that will take GOPs into account, and and rebuild them for you. But your edit might produce "short" GOPs at the seams, which may or may not be a problem, depending on further post processing and playback requirements.

Most editors restrict you to making cuts at I-Frames.

A lot of folk who cut and paste frames prefer to use encoding systems where every frame is self-contained, so that splicing can be simply and easily done at any frame.

If using MPEG, they will set the GOP so that every frame is an I-Frame. But most of us do this kind of editing with nearly lossless codecs (like MJPEG) or completely lossless codec (like HuffYUV), so that creating new generations does not cause any degradation in quality. MPEG is lossy, so additional reencodings for editing purposes will degrade image quality.

This is of course, a discussion of linear editing (using virtual razor blades and virtual glue). There is an entire forum devoted to Non-Linear Editing, which you may be interested in, since it appears you want to do fancier stuff.

Lastly, many of us use Frameserving techniques to do a lot of our editing work. Due to ease of use, ease of testing, and broad application, most of us use AviSynth scripting for post-processing during the encoding process. Many of us do so without even knowing it, if we use encoding suites like DVD2SVCD or Gordian Knot. There is an AviSynth Usage forum if scripting an editing process appeals to you in any way.

Harm
12th February 2004, 21:20
Wow! That's a lot of information. As I still consider myself a newbie it's a bit difficult to grasp what you are talking about.
I'll enlighten myself in those forums you mention.

But to keep it simple. I got these looping menu's demuxed. So I got a M2V file for this menu. There is no simple way for me a newbie to get something editted in there?
I just save a frame as an BMP, edit it and replace the looping menu with a VOB containing the still menu I created myself from that BMP with for example Scenarist?

Pfeew I thought I would be copying DVDs in no time considering my experience in CD copying...... :cool: :D

jggimi
12th February 2004, 21:39
If you're describing DVD menus, then the discussion of video editing doesn't really come into play at all. (Subtitling, on the other hand, can be done very easily with AviSynth. I must have misread your earlier post.)

Instead, DVD control menu edit falls under DVD Authoring, or reauthoring, an extremely complex subject. Doom9 has a series of guides, which at the very least, will show you how complex it can be. Click on http://www.doom9.org/mpg/dvdauthoring.htm or perhaps one of Doom9's DVD backup guides, which often include some menu manipulation with IfoEdit.

Harm
12th February 2004, 23:48
I already read a lot of those guides you mention.
I also came across ifoedit but I seem to remember that in that guide it only concerned skipping menu's and/or selecting different subtitles.

I already know (hey not bad for a newbie) how to add (or even better replace) my own subtitle, how to change or deactivate menu buttons, how to demux, encode and reauthor the lot (hopefully in sync ;) ) but what is lacking is really making changes to the pictures or videos shown in the menu's.
The DVD I am currently working on has both still and looping menu's. I know how to save the picture from the still menu, edit it with Photo Shop and think I can recreate a VOB out of that so I can put it in there again with Menuedit. I also know how to demux the looping menu so I have a M2V of let's say 12 seconds. But how to change this? Seeing the discussion I get the idea that there is nothing (yet) to do that easily. Maybe I should read up on the guides that tell you how to create your own menu's and go from there...... ?