Log in

View Full Version : Tool to determine GOP length


mocham
22nd April 2009, 08:52
Is there any tool in Linux to analyze the GOP length of a video file?

The only way I know of doing this is to load the video in avidemux and step through frame by frame until I hit the I frame. Thanks for any tips.

disturbed1
23rd April 2009, 11:16
GOPchop can. It has an info window that displays all the GOP info. It's picky about mpg's though. Doesn't play well with transport streams. Needs libmpeg2 and GTK2.

dvbCut (QT3 + ffmpeg) is another one. dvbcut handles transport streams just fine. Versions prior to 0.6 had an info windows, for some reason these newer ones from svn do not.

mocham
24th April 2009, 04:02
gopchop crashes with all the files I tried to load. I use dvbcut for MPEG2 TS already.

disturbed1
24th April 2009, 04:41
Try using a clean libmpeg2 and gopchop instead something from a distro package. Distro packagers don't always do the best job ;) Ubuntu has a 1.4MB patch file against gopchop. The entire source is only 2.4MB. Looks like they attempted to rewrite at least half the source code.

When you launch gopchop from a terminal what is the error that's given? And what type of source stream are you feeding it? As I noted above, gopchop does not work correctly with transport streams.

mocham
25th April 2009, 09:26
It just seg faults after reading/loading the file. I'm not feeding it MPEG2-TS, I'm feeding it MPEG2-PS from a PVR-250 card. Older packaged versions of it used to work, I'll try compiling from source.