Best tool to view mpg info 

Use "mpgtx -i", every single piece of info that I need is there:

$ mpgtx -i test.mpg
test.mpg
  Mpeg 2 Program Stream File [Video/Audio]
  Muxrate : 10.08 Mbps
  Estimated Duration: 10:17:07.11s
  Aspect ratio 4/3 (TV)
  Interlaced, chroma format: 4:2:0
  Video Format: PAL
  Size [704 x 576]     25.00 fps    7.50 Mbps
  Audio : Mpeg 1 layer 2
  128 kbps  48000 Hz
  Stereo,  No emphasis

command line 

Package:dvbsnoop 

Version: 1.3.77-4
Description: DVB / MPEG stream analyzer
This sniffer program can monitor, analyze, debug, dump or view DVB / MPEG /
DSM-CC / MHP stream informations:

Input can be a live stream from a DVB card, or a recorded stream.

For DVB cards, it can also dump frontend informations and status, and make a PID scan.

Homepage: http://dvbsnoop.sf.net[]

Package:mpglen 

Description: scan through a MPEG file and count the number of GOPs and frames A simple tool to read in one or more mpeg files and report the number of frames and GOPs it finds.

E: Unable to find a source package for mpglen

Package:mjpegtools 

Version: 1:1.6.2-sarge0.8
Conflicts: dvb-mpegtools

Description: MJPEG video capture/editting/playback MPEG encoding The mjpeg programs are a set of tools that can do recording of videos and playback, simple cut-and-paste editing and the MPEG compression of audio and video under Linux. This package combines them with important supporting libraries required for their use.

The "lavrec" utility supplied supports capture from Zoran based MJPEG capture/playback cards like the Buz (Iomega), DC10 (MIRO, Pinnacle) and the LML33 (Linux Media Labs). Compatible MJPEG avi files can also be created using any frame-grabbing card supported by the xawtv tool.

Videos recorded in this can be filtered, editted, and converted to MPEG streams. The MPEG encoder is optimised for high quality results at medium to high bit-rates (1Mbps upwards) and supports MMX/SSE/3D-Now and SMP. A Duron 700 can deliver around 15-20 352x288 frames per second.

A key design objective of the tools is interoperability with other video tools: currently xawtv, bcast2000, nuppelvideo and vcdimager are known to interoperate. The MJPEG utilities can read AVI, Quicktime, and movtar streams. The MPEG encoder can produce streams suitable for buring to VCD/SVCD using vcdimager or similar tools. The software playback of MPEG streams works with almost every player and every OS. SSE/MMX and 3D-Now! are supported permitting a 700Mhz CPU to deliver arond 15-20 VCD frames/second.

GUI 

Package:avidemux 

 Version: 1:2.0.40-0.0
Description: a small editing software for avi (especially DivX)
With avidemux you can open divx, process the audio track with the included
filters and save a part of the avi (i.e. split).

De-multiplex audio & video is also possible, the audio track can be coming from the avi or an external Wav/MP3 file.

Package:linuxvideostudio 

Version: 0.1.7-1
 Description: MJPEG-tools GTK graphical user interface
Linux Video Studio is a small-'n-simple GUI for the MJPEG-tools
(http://mjpeg.sourceforge.net/).[] The MJPEG-tools can be used to record
video from a zoran-based capture card (DC10+, Buz, LML33), playback
video to the same card and encode video to MPEG.

Linux Video Studio tries to extend this with simple editing functions, like deleting frames, adding frames from new videos, moving frames, scene detection etc.

The Debian package of non-free/mjpegtools must be downloaded from http://download.sourceforge.net/mjpeg/ to run linuxvideostudio.

documented on: 2005.08.02

cmd:ProjectX 

Usage 

To start the non-gui version without a X server, try to call pjx with the 'headless' option

java -Djava.awt.headless=true -jar ProjectX.jar [options] <file>

Info 

Project X - DVB demux Tool

Source 

http://sourceforge.net/projects/project-x

voluntary Support for the official (non-modified) version http://forum.dvbtechnics.info/

Description 

European digital radio & television uses the DVB standard to broadcast its data. Project X gives you a look behind the transmissions and tries its best to handle & repair many stream types and shows what went wrong on reception.

Releases 

http://project-x.sourceforge.net/update/update.txt

ProjectX_Source_0.90.2.00;2005-11-05;00:00
ProjectX_Source_0.90.1.00;2005-09-30;00:00
ProjectX_Source_0.82.1.02;2005-05-07;00:00
ProjectX_Source_0.82.1.01;2005-04-18;00:00
ProjectX_Source_0.82.1.00;2005-03-31;00:00
ProjectX_Source_0.82.0.05;2005-03-12;00:00
ProjectX_Source_0.82.0.04;2005-01-29;00:00
ProjectX_Source_0.82.0.03;2005-01-21;00:00
ProjectX_Source_0.82.0.02;2005-01-18;00:00
ProjectX_Source_0.82.0.01;2005-01-16;00:00
ProjectX_Source_0.82.0.00;2005-01-15;21:33
ProjectX_Source_0.81.9.00;2004-10-30;21:03

Comments 

OS Independent (Written in Java)

Version 

Installation 

Extract all files from the received archive to a separate directory.

$ sh -x build.sh
+ '[' -e ./ProjectX.jar ']'
+ '[' -d ./build ']'
+ mkdir -p build
+ javac -encoding ISO-8859-1 -deprecation -O -g:none -classpath lib/commons-net-1.3.0.jar:lib/jakarta-oro-2.0.8.jar -d build @sources.lst
[...]
[... you'll encounter some 'warnings' about 'using a deprecated API' that's
not critical, as long as an actual JDK still supports these methods ...]
[...]
 Note: Some input files use unchecked or unsafe operations.
 Note: Recompile with -Xlint:unchecked for details.
21 warnings
+ jar cfvm ProjectX.jar MANIFEST.MF -C build .
added manifest
adding: edu/(in = 0) (out= 0)(stored 0%)
[...]
adding: RawRead.class(in = 1060) (out= 653)(deflated 38%)

converting mpeg to mpeg for DVD 

http://www.videohelp.com/forum/archive/t281705.html

> > I did read that note about ProjectX, and I even downloaded projectX, I just
> > never installed it. Thing is, it didn't say how to use projectX to fix it
> > (is it an automatic thing or a manual thing?)
>
> I downloaded and installed projectX, and I haven't a clue how to operate
> it. It appeared most the documentation is not in English.

Well, I'm still stumbling around blindly on this. I did find that ProjectX can also be run from the command line. Bizarre as it may sound, I am finding for doing something simple, the command line is far less intimidating.

My goal is to take a .mpg file, and edit it between the key frames. Thus far I have succeeded in using ProjectX to demux a .mpg file. … I'm hoping I can then take that output, together with a line number (for the cut) obtained from lve, and use m2vmp2cut (or avidemux) to cut the mpeg file where I want cut. .. AND keep audio synch. (As a note - I tried avidemux first on the original mpeg, but the file I am using has also given AVIDEMUX problems (with audio synch)).

At this point in time, that appears to be a rather "lofty" goal, and I'm not all that confident that I will succeed. Has anyone else tried and succeeded at this?

oldcpu posted 2005 Oct 28

converting mpeg to mpeg for DVD 

> At this point in time, that appears to be a rather "lofty" goal, and I'm not
> all that confident that I will succeed.

Well, it turns out I was too pessimistic. With ProjectX, from an input .mpg file, I generated an output .m2v and .mp2 files. I used these two ProjectX files as an input to Avidemux. I was then able to edit/remux the audio & video files with avidemux, and this time retain audio/video synchronisation. My edit/cut was successfully made in between two keyframes (where as before, using only avidemux on the original .mpg file gave me an audio/video desync problem). Impressive!

oldcpu posted 2005 Oct 28

cmd:GOPchop 

Basic Info 

Usage 

Info 

gopchop - MPEG2 GOP-accurate editor

Source 

http://gopchop.sourceforge.net/

old web http://outflux.net/unix/software/GOPchop/

Description 

This tool is used for people wanting to take sections out of MPEG2-PS files without re-encoding the resulting frames. The idea is to write specific "Group of Pictures" (GOP) sections to a new MPEG2-PS file. These GOPs will decode correctly (in theory), and the gaps won't be noticed.

Comments 

I wrote this tool to edit commercials out of MPEG2 files produced by my KFir MPEG2 capture card. Using this tool for anything else is really beyond the scope of its design.

This is a *LOSSY* process on MPEGs that have open GOPs. To close a GOP, I must toss B-Frames at the start of a GOP. If you were to mark each frame in an MPEG for splicing in gopchop, you would end up with fewer frames than you started with. To "close" an open GOP, I must toss those B-Frames. To stop this behavior, uncheck the "Drop Orphaned Frames" option in the "Preferences" window.

Help 

Using gopchop 

The basic way to use gopchop is like so:

  1. Run gopchop.

  2. Select an MPEG2 with "File / Open".

  3. Drag the slider to the first GOP you want to have in a clip. (You can disable "Edit / Preferences… / Auto Refresh" to seek faster, and then click "Refresh" to see where you are in the file.)

  4. Click "Start Mark".

  5. Drag the slider to the last GOP you want in the clip.

  6. Click "End Mark". (If you drag the slider somewhere before the first mark, "End Mark" will not do anything.)

  7. Repeat steps 3 through 6 to select all the clips you want saved.

  8. Drag clips up and down to reorder them in the Clip List window.

  9. To delete unwanted clips, select it, and hit Del or Backspace.

  10. Save the clips to a new MPEG2 with "File / Export".

If you want to save different clips, select "Edit / Clear" and start over at step 3. If you want to use a different source MPEG2, select "File / Close" and start over at step 1.

How it works 

I scan the MPEG2 for a full list of System packets, then examine the Program Element Stream packets they contain. In the video PES, I look for GOP headers (and Picture headers). Each GOP is then mapped back to the System packets that contain it (a full GOP can span multiple VES packets, and multiple System packets). When a GOP is saved to a new file, the entire System packet list for that GOP is written as a byte-for-byte copy from the source MPEG2. In theory, this will take any audio streams along for the ride. So far, so good. :)

In the "Info" box, the "Offset" column shows the system packet offset (for GOPs) and the video packet offset (for Pictures). The "Bytes" column lists the bytes contained by all the system packets (for the GOP), and all the video packets in a Picture. You'll notice that the Offset plus the Bytes don't add up to the next Picture's Offset. This is because there is stuff between the video packets. :) The GOP "Bytes" and "Offset", however, should add up to the next GOP's "Offset" value.

The settings under the "Preferences" window are automatically saved to ".gopchop/options" in your home directory.

Version 1.1.7 

Installation 

dpkg -i /linux/linux_bin/deb-pkgs/gopchop_1.1.7-1_i386.deb; debfoster

converting mpeg to mpeg for DVD 

http://www.videohelp.com/forum/archive/t281705.html

> Back in Linux, I use gopchop to edit out the commercials. GOP-level editors
> are nice in that you don't need to reencode your edits. I save each segment
> to a separate mpeg, because I found if I combined them, I'd get sync issues
> later on. These separate files will simply become "chapters" on the dvd.

dvbcut is very good at chopping pieces out of .mpg files AND retaining audio-video sync. It can also splice between key frames. It is a very simple interface/gui. While what it does is limited - what it does do, it does extremely well.

oldcpu posted 2006 Aug 18

converting mpeg to mpeg for DVD 

> Can it save the segments without reencoding the video? That's the main
> reason I'm using gopchop. The video wil get resized and reencoded in
> mplayer, so I want to avoid transcoding more often than necessary

yes.

oldcpu posted 2006 Aug 22

dvdauthor and gopchop 

http://sourceforge.net/mailarchive/forum.php?thread_id=7847270&forum_id=32602

Date: 2005-07-29 01:16
> Has anyone successfully used gopchop generated files with dvdauthor ?

Yes, but I use a heavily patched gopchop. And I extract the audio and video separately.

My gut feel is that your problem is due to gopchop-1.1.7"s inability to snip exactly at frame boundaries. I sent Kees Cook a patchset a while ago that included a patch that can do this (and he forwarded it to the mailing list, but it looks like you can"t retrieve the patchset from sourceforge), but it probably _still_ won"t work for you since my patchset didn"t leave 2048-byte DVD-complient frames, nor was it smart it enough to snip the audio in the same way, too, nor did it handle DVD NAV packs.

I"m still trying to figure out if the audio is a big issue or not. I do think the 2048-byte packets, as well as the code"s ignorance of NAV packs will ultimately break it.

If you want to try my patchset (it"s against gopchop-1.1.3, some, but not all of the patches were included in 1.1.7) you can get it at:

http://www.freesoft.org/~baccala/gopchop-patches.tgz

But like I said, I don"t expect it to work (sorry).

> The short version of my problem is this :
>
> ERR:  Cannot infer pts for VOBU if there is no audio or video and it is the
> ERR:  first VOBU.
>
>
> I get this _almost_ all the time.  Every once in a while gopchop seems
> to generate a file that works.

Brent Baccala

dvdauthor and gopchop 

> If anyone could take the time to forward-port the un-committed patches
> to the current CVS, I"d really appreciate it.  That would get the CVS
> caught up with Brent"s changes.  I haven"t had much time lately to try
> to get some of those other patches into it.

I finally found something out that probably explains why I"m about the only person on this list that seems concerned about the frame boundaries problem. I just read that DVD pads its video at NAV pack boundaries, so if you"re working with DVD, and there"s a one-to-one correspondence between NAV packs and GOPs, then your video is already padded and you don"t need to worry about this.

The same source (mpucoder"s DVD-Video pages) says that audio is only padded at cell boundaries, so I still wonder about the effects of chopping the audio packets.

Brent Baccala

cmd:mpeg2dec 

Info 

libmpeg2 - a free MPEG-2 video stream decoder

Source 

http://libmpeg2.sourceforge.net/

MJPEG HOWTO - An introduction to the MJPEG-tools, v1.48 https://sourceforge.net/docman/display_doc.php?docid=3456&group_id=5776

MJPEG HOWTO - An introduction to the MJPEG-tools, v1.37 http://linuxmafia.com/faq/Apps/AV/mjpegtools_overview.html

Comments 

December 23, 2003: new mpeg2dec release ! It now supports 4:2:2-profile decoding, robustness has been enhanced to the point that we dont know how to crash it anymore despite trying hard, it supports concatenated streams with different sizes, the color conversion routines are now in a reuseable helper library.

VK Tools 

Basic Info 

Info 

Suite of MPEG Analysis tools — text mode parser and description generator, visual analysis tools for MPEG Program Streams and MPEG Transport Streams.

Source 

http://ardmore.net/~thepaces/vk_tools/vk_tools_index.html

http://osx.freshmeat.net/projects/vktools/

http://www.linux.org/apps/AppId_8658.html

Description 

The VK Toolset is intended to aide MPEG developers and hobbyist in understanding and creating conformant MPEG streams. The current version focuses on the MPEG system layer (MPEG-1 System, MPEG-2 Program Stream), and MPEG-2 Transport bitstreams).

The tool set consists of three separate programs. The dump program which validates the syntax of the MPEG Program/System Stream file and outputs header information. The second program, the vk_viewer, parses an MPEG Program/System Stream file and provides a graphical interface for stream analysis. The third program, VK Tafe parses and analyzes an MPEG Transport Stream.

Version 0.8c 

File size 

Dependencies 

debfoster libguile9
dependency 

dpkg: dependency problems prevent configuration of vktools: vktools depends on libguile9; however: Package libguile9 is not installed.

documented on: 2005.08.03

mpeg & ffmpeg 

http://zebra.fh-weingarten.de/~transcode/docs/export_ffmpeg.txt

Based on mplayers DOCS/tech/libavc-option.txt

Links:

short intro to mpeg coding: http://www.eecs.umich.edu/~amarathe/mpeg.html

longer intro to jpeg/mpeg coding: http://www.cs.sfu.ca/undergrad/CourseMaterials/CMPT479/material/notes/Chap4/Chap4.2/Chap4.2.html

ftp://ftp.tek.com/mbd/manuals/video_audio/25W_11418_4.pdf

cmd:mpgtx 

Examples 

http://mpgtx.sourceforge.net/#Examples

Suppose you want to split matrix-trailer.mpg into 166 playable chunks with the basename mychunk

mpgtx -166 matrix-trailer.mpg -b mychunk
Now processing Chunk 1/166 ...  100.00%
Now processing Chunk 2/166 ...  92.79%
[...]

You will then have 166 files named mychunk-001.mpg to mychunk-166.mpg

Now suppose you want to join file1 and file2 and to append the first 30 Megs of file3 followed by 30 mins of the same file starting at 1hour 10 mins, you want all these chunks into one file materoffactly called thejoinedfile.mpg (yeah suppose you're crazy enough to want to do so)

mpgtx -j file1 file2 file3 [-30M] [1:10:00-1:40:00] -o thejoinedfile.mpg
Now processing Chunk 1/4 ...  100.00%
Now processing Chunk 2/4 ...  100.00%
Now processing Chunk 3/4 ...  100.00%
Now processing Chunk 4/4 ...  100.00%

And there it is.

Hey why not deleting this annoying 5 minutes intro from movie.mpg?

mpgtx -s movie.mpg [5:00-] -b without_intro
Now processing Chunk 1/1 ...  100.00%

And you've got your without_intro.mpg file

I want to split this file at 699 Megs so that it can fit on my Video CD!

mpgtx -s file {699M}
Now processing Chunk 1/2 ...  100.00%
Now processing Chunk 2/2 ...  45.31%

Here are chunk-1.mpg and chunk-2.mpg (default basename is chunk)

I wonder about the display size and the duration of this mpegfile

mpgtx -i mpegfile
mpegfile:
  Mpeg 2 System File [Video/Audio]
  Estimated Duration: 01:38:29.51s
  Aspect ratio 4/3 (TV)
  Not interlaced, chroma format: 4:2:0
  Video Format: PAL
  Size [352 x 288]     25.00 fps    1.15 Mbps
User Data:
------------
encoded by TMPGEnc b12a
------------
Audio : Mpeg 1 layer 2
192 kbps  44100 Hz
Stereo,  No emphasis

What's inside this weird MPEG file?

mpginfo weird.tx
weird.tx:
  Mpeg 2 Transport Stream [2 programs]
    Program  2 contains 2 Elementary Streams:
      Stream 1: MPEG 2 audio [pid: 59]
        audio version 2
      Stream 2: MPEG 2 video [pid: 58]
        video version 1
    Program  1 contains 2 Elementary Streams:
      Stream 1: MPEG 2 audio [pid: 57]
        audio version 2
      Stream 2: MPEG 2 video [pid: 56]
        video version 1

Let's demux this transport file.

mpgdemux ../mmedia/teracom_3/Teracom_3 -b weird
 Demultiplexing : [Programs 02 audio 02  video 02] [100.00%]

and you will find four mpeg files :

weird-2-1.mp3 (Program 2 stream 1)
weird-2-2.m2v (Program 2 stream 2)
weird-1-1.mp3 (Program 1 stream 1)
weird-1-2.m2v (Program 1 stream 2)

what about this wagner.mp3 ?

mpgtx -i wagner.mp3
wagner.mp3
  Audio : Mpeg 2 layer 3
  Estimated Duration: 03:00.70s
  32 kbps  24000 Hz
  Frame size: 96 bytes
  Mono,  No emphasis,  original
  ID3 v1.1 tag
     ----------------
     title   : Der fliegende Hollander
     genre   : Other
     ----------------
  ID3 v2.3.0 tag (more info on http://www.id3.org/)
     ----------------
     TRCK : 01
     COMM : (lang: eng) : (empty)
     PCNT : (skipped)
     TLEN : 180000
     TCON : Richard Wagner
     TIT2 : Richard Wagner - Der fliegende Hollander
     ----------------

Basic Info 

Info 

mpgtx — an MPeG ToolboX

Source 

http://mpgtx.sourceforge.net/ http://sourceforge.net/projects/mpgtx/

Description 

mpgtx a command line MPEG audio/video/system file toolbox.

mpgtx was designed with the good old Unix philosophy in mind : do few but do it well and provide end user an austary yet powerfull command line interface.

Features 

Comments 

mpgtx1.3 August 29, 2002

ii mpgtx_1.3-1

Help 

Support 

Quick Help 

Usage    : mpgtx [command] [options] [mpegfile [mpegfile | range]...
Commands :
  -i              print infos about following files.
  -s              split following files according to the specified ranges.
  -j              join  following files (ranges may be specified).
  -d              demultiplex elementary streams from following file
  -T              modify id3 tag.
  -h              print this help screen.
  -v              print version informations.
  -#              where # is a number, split the following file in #.
Options  :
  -N              Do not print out excessive information while processing
                  If you use MacOS Classic, this is RECOMMENDED
                  Otherwise mpgtx will be dead slow!
  -f              force overwriting of files, don't ask for confirmation
  -P              keep headers of mpegs which sometimes is usefull
  -X              Try to search for a valid PACK header in the whole file
                  This may result in an endless loop if not successfull!
  -An             While joining or splitting, aspect ratio will be forced to:
                  n=1 -> 1:1, n=2 -> 4:3, n=3 -> 16:9, n=4 -> 2.21:1
  -b NAME         set the basename for the output files
  -o FILE         set the output file name (join implied)
                  if FILE is - , standard output will be used
  --force         force joining of incompatible files
  --no-parachute  don't try to catch SIGSEGV (usefull for debugging)
Ranges   :
  Ranges must follow an mpeg file
  [a-b]           from 'a' inclusive to 'b' inclusive. If you want half opened
                  ranges, you may want to use ]a-b], [a-b[ or ]a-b[ instead
  [num/total]     the 'num' part if the mpeg file was split in 'total'.
                  [1/4] would result in the first quarter of the mpeg file.
  {a-b-...}       where 'a', 'b', ... are in ascending order. Split the file
                  at given values. {700M} is therefore equivalent to ranges
                  [-700M] ]700M-]
Values   :
  Values can be time or offsets in the mpeg file
  Time Format     HH:MM:SS where the HH: part can be omited
  Offset Format   a number optionally followed by:
                    M : offset is in Megabytes
                    k : offset is in Kilobytes
  An empty value means the corresponding file boundary:
                  [-10M]  the first 10 Megabytes of file
                  [500M-] from 500 Megabytes to the end of file

Quick Help 

$ mpgtx movie1.mpg [-0:32] -o joined.mpg
You must choose one options between -i -s -j
Type mpgtx -h for help
$ mpgtx -j movie1.mpg [-0:32] -o joined.mpg
Now processing movie1.mpg 1/1 ...  100.00%
$ rm joined.mpg; mpgtx -j movie1.mpg [8k-10k] -o joined.mpg
Now processing movie1.mpg 1/1 ...  100.00%
$ rm joined.mpg; mpgtx -j movie1.mpg [-0:32] [8k-10k] -o joined.mpg
[8k-10k] is not a valid mpeg file
$ mpgjoin movie1.mpg [-0:32] [15M-25M] -o joined.mpg
[15M-25M] is not a valid mpeg file
$ mpgjoin movie1.mpg [-0:32] [15M-25M] movie2.mpg -o joined.mpg
[15M-25M] is not a valid mpeg file

documented on: 2004.09.22

cmd:avidemux 

Basic Info 

Usage 

Info 

Avidemux is a graphical tool to edit video. It can open AVI, openDML, MPEG, Nuppelvideo, and BMPs. Most common codecs are supported (M-JPEG, MPEG, DivX, Xvid, huffyuv, WMA, etc.) thanks to libavcodec and libmpeg2. Video can be edited, cut, appended, filtered (resize/crop/denoise), and re-encoded to either AVI (DivX/Xvid) or MPEG 1/2.

Source 

http://fixounet.free.fr/avidemux/

http://avidemux.sourceforge.net/ http://freshmeat.net/projects/avidemux/

http://fixounet.free.fr/avidemux/download.html

avidemux2 RPM packages for Red Hat/Fedora http://dag.wieers.com/packages/avidemux2/

Features 

Comments 

Help, Editing mpeg files 

1. Introduction 

Avidemux can read (indexed) mpeg file, both elementary stream and program stream (i.e. vob files for example) thanks to mpeg2dec

Internally, the mpeg are seen as frames with a fake codec (MPEG).

If you save the file in copy mode, you will end up with mpeg inside avi, but since it is non standard, only avidemux will be able to read it back.

2. Splitting, external muxing 

General

As usual, define the section you are interested in using and . You should read cutting if you did not already.

Audio

No special care to take here. Just save the audio in copy mode using File->Save audio menu entry. You will end-up with either foo.mp2 or foo.ac3.

Video

For video, we will use File->Save raw stream. This menu entries will ask the demuxer the raw data, bypassing the mpeg decoding step. It will also reconstruct the PTS/DTS logic to have a compliant mpeg stream.

Now you have a foo.m1v or foo.m2v mpeg1/2 elementary stream which should be synced with foo.mp2.
System

Now it is time to remultiplex both stream to end-up with foo.mpg. The first seq_header has the timestamp of the fist frame (uncut). It may confuse mplex and you will end up with tons of error/warning message.

The best is to use tcmplex from transcode to mux them back together.

3. Splitting, internal muxing 

General

As usual, define the section you are interested in using and . You should read cutting if you did not already. In that mode, avidemux will write a mpeg2 PS stream (lvemux lower part from lvempeg. This mpeg2 PS contains NAV packet and is suitable to DVD authoring. Even my pionner accepts them :).

Audio

Audio must be 48 kHz and either MP2 or AC3 (as of today it means libavcodec AC3 or libavcodec MP2). It can be either from copy and/or process mode (for example editing a PVR capture file).

Video

The video must be mpeg (that seems obvious). As for audio, it can be in copy mode (edited PVR or DVD) or process mode (converted avi or converted nuv).

Saving

Now, it is time to use File-save mpeg PS. If audio is in copy mode, you will be asked the A/V shift to correct. For DVD it ranges from 0 to about 200 ms. For PVR captured stream it can be anything.

Important
There is two importants things to consider here :
  • The muxing will introduce by default a 40 ms shift. Can be neglected if the sync was perfect.

  • When saving as mpeg PS, the GOP timestamp will be recomputed to avoid jump in case of edited PVR streams.

Version 2-2.0.22-0 

rpmih avidemux2-2.0.22-0.rh90.dag.i386.rpm

documented on: 2004.06.02