Tux

...making Linux just a little more fun!

frame rate of VCD and DVD

Mulyadi Santosa [mulyadi.santosa at gmail.com]
Fri, 20 Oct 2006 17:34:54 +0700

Dear gang...

I face a trouble here. Does anyone know the frame rate of VCD and DVD? Also, what is the fps (frame per second) of movie trailers spreading on Internet? What is the right way to calculate the fps?

My another problem is, suppose I have a video clip which has 30 fps. What should I do if I want to double the fps (i.e 60 fps)? Is there any tool available to do this?

Any hints would be greatly appreciated... Thanks in advance.

regards,

Mulyadi


Top    Back


Pedro Fraile [pf at frailediaz.e.telefonica.net]
Fri, 20 Oct 2006 19:00:10 +0200

El Fri, 20 Oct 2006 17:34:54 +0700 Mulyadi Santosa <mulyadi.santosa at gmail.com> escribi?:

> Dear gang...
> 
> I face a trouble here. Does anyone know the frame rate of VCD and
> DVD? 

Hi there,

I think the following link may be of help

http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html

> Also, what is the fps (frame per second) of movie trailers
> spreading on Internet? What is the right way to calculate the fps? 
> 

If what you want to know is the fps of a video you have, you can use mplayer with the "-identify" option to obtain it (plus much more other info!)

> My another problem is, suppose I have a video clip which has 30 fps. 
> What should I do if I want to double the fps (i.e 60 fps)? Is there
> any tool available to do this?

I have never tried it, but the -ofps option of mencoder looks promising ...

> 
> Any hints would be greatly appreciated... Thanks in advance.
> 
> regards,
> 
> Mulyadi

Greetings,

Pedro.


Top    Back


Mulyadi Santosa [mulyadi.santosa at gmail.com]
Sat, 21 Oct 2006 01:13:27 +0700

Hi...

> I think the following link may be of help
> http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html

Thanks a lot! Hm, so mostly are using 24,25 and 30 fps. I wonder, is 60 fps a common one for video playback?

>
> > My another problem is, suppose I have a video clip which has 30
> > fps. What should I do if I want to double the fps (i.e 60 fps)? Is
> > there any tool available to do this?
>
> I have never tried it, but the -ofps option of mencoder looks
> promising ...

Thanks. I also tried Virtual Dub, seems it did what I need (increasing frame rate).

BTW, any of you have ever did a benchmark to find out the number of dropped/skipped frame on various hardware/software specification? Mind to share the way you do it?

regards,

Mulyadi


Top    Back


Karl-Heinz Herrmann [kh1 at khherrmann.de]
Fri, 20 Oct 2006 20:12:51 +0200

Hi,

On Fri, 20 Oct 2006 17:34:54 +0700 Mulyadi Santosa <mulyadi.santosa at gmail.com> wrote:

> I face a trouble here. Does anyone know the frame rate of VCD and DVD? 

that depends (what else?)

PAL uses 25 frames per second (European format) NTSC uses either 23.976 or 29.97 frames per sec. (US standard)

This is complicated by interlaced/non interlaced material.

TV is usually interleaved, i.e. every this frame contains every odd line, every other frame every even line of an image. That allows a 50Hz vertical rate of European TV's while only having 25 full images per second. If done right, the interleaved frames contain actual information at 50Hz i.e. you get the infamous stripes if you simplistically glue the two interleaved frames together.

> Also, what is the fps (frame per second) of movie trailers spreading on 
> Internet? What is the right way to calculate the fps? 

Usually the same as the source material (i.e. PAL or NTSC).

> My another problem is, suppose I have a video clip which has 30 fps. 
> What should I do if I want to double the fps (i.e 60 fps)? Is there any 
> tool available to do this?

None that I'm aware of, you would have to interpolate along the time axis.

Linux tools I'm aware of are dvdrip (perl gui frontend) and transcode which does all the work (used heavily by dvdrip). The CLI of transcode is horrible so dvdrip is strongly recommended.

If a tool can upsample from 30 to 60 fps it might be transcode.

mplayer/mencoder is also versatile player/encoder.

K.-H.


Top    Back


Benjamin A. Okopnik [ben at linuxgazette.net]
Fri, 20 Oct 2006 14:13:32 -0600

On Fri, Oct 20, 2006 at 08:12:51PM +0200, Karl-Heinz Herrmann wrote:

> Mulyadi Santosa <mulyadi.santosa at gmail.com> wrote:
>  
> > My another problem is, suppose I have a video clip which has 30 fps. 
> > What should I do if I want to double the fps (i.e 60 fps)? Is there any 
> > tool available to do this?
> 
> None that I'm aware of, you would have to interpolate along the time axis. 

I don't know much about it, but that seems odd. One of the standard tweaks in camera work, in the old days, used to be overcranking and undercranking; ditto for playing the film. I'd have expected that digitizing would make all of that seamless as well as extending the range.

Looking at 'man mplayer', it seems like they've got several switches that are applicable:

  -fps <float value>
		 Override video framerate.  Useful if the original value is
			wrong or missing.
  -ofps <fps>
		 Specify a frames per second (fps) value for the output file,
			which can be different from that of the source ma?  terial.
			Must be set for variable fps (ASF, some MOV) and progressive
			(30000/1001 fps telecined MPEG) files.
  io=<ifps>:<ofps>
	   For each ifps input frames the filter will output ofps frames.
	   The ratio of ifps/ofps should match the -fps/-ofps ratio.  This
	   could be used to filter movies that are broadcast on TV at a
	   frame rate different from their original framerate.

> Linux tools I'm aware of are dvdrip (perl gui frontend) and transcode
> which does all the work (used heavily by dvdrip). The CLI of transcode
> is horrible so dvdrip is strongly recommended.

Oh, brother... no kidding. The last time I used 'transcode', I gave up trying to construct the command line on my own and just googled for someone else who had used it for the same thing. Mind you, it worked great - but a camel would die of dehydration if it had to traverse the length of that statement. I've taken months to write programs that were shorter.

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Rick Moen [rick at linuxmafia.com]
Fri, 20 Oct 2006 14:22:52 -0700

Quoting Benjamin A. Okopnik (ben at linuxgazette.net):

> Oh, brother... no kidding. The last time I used 'transcode', I gave up
> trying to construct the command line on my own and just googled for
> someone else who had used it for the same thing.

That guy I shave has relevant documentation -- except you shouldn't trust him. (He's Scandinavian, and Tante Bjorg always warns me not to trust those folk. Also, Epimenides said they're worse than Cretans, just before he went off to help Bertrand Russell find the set of all sets that don't contain themselves.)

See: "Transcode" on http://linuxmafia.com/kb/Apps/AV/

-- 
Cheers,             You can't lick the system -- but you can certainly
Rick Moen           give it a damned good fondling....
rick at linuxmafia.com


Top    Back


Karl-Heinz Herrmann [kh1 at khherrmann.de]
Sat, 21 Oct 2006 19:32:16 +0200

Hi,

On Fri, 20 Oct 2006 14:13:32 -0600 "Benjamin A. Okopnik" <ben at linuxgazette.net> wrote:

> On Fri, Oct 20, 2006 at 08:12:51PM +0200, Karl-Heinz Herrmann wrote:
> > Mulyadi Santosa <mulyadi.santosa at gmail.com> wrote:
> >  
> > > My another problem is, suppose I have a video clip which has 30
> > > fps. What should I do if I want to double the fps (i.e 60 fps)? Is
> > > there any tool available to do this?
> > 
> > None that I'm aware of, you would have to interpolate along the time
> > axis. 
> 
> I don't know much about it, but that seems odd. One of the standard
> tweaks in camera work, in the old days, used to be overcranking and
> undercranking; ditto for playing the film. I'd have expected that
> digitizing would make all of that seamless as well as extending the
> range.

What I meant was resampling without changing the speed -- i.e. if dvdrip changes from NTSC 29.97 Hz to 25Hz for a PAL TV set it recodes so the movie isn't slower. At least thats what I thought that particular filter in dvdrip, inverse something, was meant for, which supposedly can handle that without loosing audio sync.

If speed change is what you want of course, just go ahead and let mplayer play it faster.

And BTW -- 60fps for action games might be appropriate but 60Hz movies are not typical. 30Hz (or almost) are typical for NTSC on the other hand, usually interleaved to 60 half frames.

K.-H.


Top    Back


Benjamin A. Okopnik [ben at linuxgazette.net]
Sat, 21 Oct 2006 12:09:18 -0600

On Sat, Oct 21, 2006 at 07:32:16PM +0200, Karl-Heinz Herrmann wrote:

> Hi,
> 
> On Fri, 20 Oct 2006 14:13:32 -0600
> "Benjamin A. Okopnik" <ben at linuxgazette.net> wrote:
> 
> > On Fri, Oct 20, 2006 at 08:12:51PM +0200, Karl-Heinz Herrmann wrote:
> > > Mulyadi Santosa <mulyadi.santosa at gmail.com> wrote:
> > >  
> > > > My another problem is, suppose I have a video clip which has 30
> > > > fps. What should I do if I want to double the fps (i.e 60 fps)? Is
> > > > there any tool available to do this?
> > > 
> > > None that I'm aware of, you would have to interpolate along the time
> > > axis. 
> > 
> > I don't know much about it, but that seems odd. One of the standard
> > tweaks in camera work, in the old days, used to be overcranking and
> > undercranking; ditto for playing the film. I'd have expected that
> > digitizing would make all of that seamless as well as extending the
> > range.
> 
> What I meant was resampling without changing the speed -- i.e. if
> dvdrip changes from NTSC 29.97 Hz to 25Hz for a PAL TV set it recodes so
> the movie isn't slower.

Ah, now I see what you mean. I'm probably showing my ignorance here, but - if you separated the audio and the video tracks, then ran the video at a faster (29.97/25) rate, wouldn't that do the job? I'm probably opening a large can of worms, but... I like fishing, anyway. :)

> If speed change is what you want of course, just go ahead and let
> mplayer play it faster. 

I'd obviously misunderstood the original request; that's what I thought the question meant.

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Karl-Heinz Herrmann [kh1 at khherrmann.de]
Sat, 21 Oct 2006 22:23:37 +0200

Hi,

On Sat, 21 Oct 2006 12:09:18 -0600 "Benjamin A. Okopnik" <ben at linuxgazette.net> wrote:

> Ah, now I see what you mean. I'm probably showing my ignorance here,
> but- if you separated the audio and the video tracks, then ran the
> video at a faster (29.97/25) rate, wouldn't that do the job? I'm
> probably opening a large can of worms, but... I like fishing, anyway.
> :)

I guess something like that happens during the recode for PAL VCD. I had trouble from time to time that tcmerge (?) refused to integrate the audio and the VCD videostream or failed to synchronize for no (to me) apparent reason.

But without a TV I myself watch everything on a monitor attached to a PC anyway -- and mplayer doesn't care if its PAL or NTSC or 23.xx 25 or 29.xx fps.

> > If speed change is what you want of course, just go ahead and let
> > mplayer play it faster. 
> 
> I'd obviously misunderstood the original request; that's what I
> thought the question meant.

I'm not sure -- maybe he meant speeding things up -- but he didn't answer to the last mails. Maybe because he is not any longer in the cc fields? I reattach him just in case he is not on TAG after all.

K.-H.


Top    Back


Mulyadi Santosa [mulyadi.santosa at gmail.com]
Sun, 22 Oct 2006 11:43:25 +0700

Hi everyone...

I am still here on TAG...i was busy with the other stuffs, but now I am back :D

> > I'd obviously misunderstood the original request; that's what I
> > thought the question meant.
>
> I'm not sure -- maybe he meant speeding things up -- but he didn't
> answer to the last mails. Maybe because he is not any longer in the
> cc fields? I reattach him just in case he is not on TAG after all.

No, not speeding up. What I meant is like extrapolating (?) the existing frames. So, for example, currently a video clip has 30 fps and I need to convert it to 60 fps. I need the software to do something like: doubling the number of frames, creating in between frames, or anything else required to achieve 60 fps but NOT increasing the speed.

Also, what I want to ask, when doing this kind of upsampling, what should I do to keep the audio video sync'ed? Or the tool like transcode will automatically do it for me? So far, I only test with virtual dub for Windows and seems like it works fine.... but I welcome more ideas.

regards,

Mulyadi


Top    Back


Karl-Heinz Herrmann [kh1 at khherrmann.de]
Sun, 22 Oct 2006 15:27:28 +0200

On Sun, 22 Oct 2006 11:43:25 +0700 Mulyadi Santosa <mulyadi.santosa at gmail.com> wrote:

> Also, what I want to ask, when doing this kind of upsampling, what 
> should I do to keep the audio video sync'ed? Or the tool like transcode 
> will automatically do it for me? So far, I only test with virtual dub 
> for Windows and seems like it works fine.... but I welcome more ideas.

if virtual dub does what you want -- stick with it. I use it occasionally to create movies from photos which are supposed to run on AnyWindows(tm) for presentations (LaTeX/beamer/acrobat for me).

If you look for a linux only solution transcode can most probably handle it, it's just that the command line might be really ugly. You would strip vidoe and audio stream out of the original. Recode the video which shoul carry some time code. Then you would reinterlace audio and video data in a single stream hopefully keeping everything in sync (that would be tcmerge).

My I ask what you need 60fps for? Is that the US TV vertical refresh rate? But that would be interlaced I guess, so what you would look for is an interlaced stream with half frames. Hm... transcode can handle de-interlacing with about 15 filters, but not interlacing it seems.

On the other hand: From my experience dvdrip/transcode produce VCD output which has a internal 25Hz framerate (PAL). The interlacing and doubling of the apparent framerate is handled by the VCD-player to bring it on the TV screen.

K.-H.


Top    Back


Mulyadi Santosa [mulyadi.santosa at gmail.com]
Mon, 23 Oct 2006 16:49:20 +0700

Hi

> if virtual dub does what you want -- stick with it. I use it
> occasionally to create movies from photos which are supposed to run
> on AnyWindows(tm) for presentations (LaTeX/beamer/acrobat for me).

As far as I know, using Xine and mplayer "information" menu, i confirmed that the converted video clip has indeed 60 fps. It is AVI, and the size becomes approximately 50 times bigger ( ~500 MB) than the original MPEG's size. I don't know why, is it normal to see this big AVI?

> If you look for a linux only solution transcode can most probably
> handle it, it's just that the command line might be really ugly. You
> would strip vidoe and audio stream out of the original. Recode the
> video which shoul carry some time code. Then you would reinterlace
> audio and video data in a single stream hopefully keeping everything
> in sync (that would be tcmerge).

Thank you for pointing me out. I shall take a note about it and do further research. Once I read a bit about transcode, that when I want to create a screen capture movie of my X display ... but never really use it.

> My I ask what you need 60fps for? Is that the US TV vertical refresh
> rate? But that would be interlaced I guess, so what you would look
> for is an interlaced stream with half frames. Hm... transcode can
> handle de-interlacing with about 15 filters, but not interlacing it
> seems.

Actually it is for personal experiment, and the result/conclusion will be presented for my upcoming article. Generally, I observe the effects of changing kernel HZ (system clock resolution) towards the desktop programs such as video playback, games, office suite etc.

High frame rate video clip captured my attention since I think it certainly need higher precision timing in order to display the frames at the right moment as correctly as possible. So far, my simple test proved that high HZ helps in this case, but surprisingly HZ=1000 isn't always the best choice.

> On the other hand: From my experience dvdrip/transcode produce VCD
> output which has a internal 25Hz framerate (PAL). The interlacing and
> doubling of the apparent framerate is handled by the VCD-player to
> bring it on the TV screen.

Hmm .. again this is a new information for me. I shall keep it for my future reference.

Thank you for all the answers so far, it is really helpful. I don't know how to progress without the your and everyone else's help.

regards,

Mulyadi


Top    Back


Predrag Ivanovic [predivan at ptt.yu]
Mon, 23 Oct 2006 19:35:22 +0200

On Sun, 22 Oct 2006 11:43:25 +0700 Mulyadi Santosa wrote:

> No, not speeding up. What I meant is like extrapolating (?) the existing 
> frames. So, for example, currently a video clip has 30 fps and I need 
> to convert it to 60 fps. I need the software to do something like:  
> doubling the number of frames, creating in between frames, or anything 
> else required to achieve 60 fps but NOT increasing the speed. 

If you like Virtual Dub, you will love Avidemux :) I highly recommend it, it can do all that you want and probably more.

http://avidemux.berlios.de

Pedja

-- 
 Maintainer's Motto:
        If we can't fix it, it ain't broke.


Top    Back


Karl-Heinz Herrmann [kh1 at khherrmann.de]
Mon, 23 Oct 2006 20:09:41 +0200

On Mon, 23 Oct 2006 19:35:22 +0200 Predrag Ivanovic <predivan at ptt.yu> wrote:

> If you like Virtual Dub, you will love Avidemux :)
> I highly recommend it, it can do all that you want and probably more.
> 
> http://avidemux.berlios.de

I'll have a close look -- but my 'need' is an old M$ codec (Indeo 3.2) which runs Win95 to XP as far as I know[1]. And not just in Mediaplayer but from the "multimedia stack" -- whatever that is. It means however that acrobat/win can run movies inside its main window in full-screen presentations.

K.-H.

[1] Only Win2k/XP which is installed by our computing center do not run that -- but they don't run anything. I think they just skipped thw whole multimedia stuff.


Top    Back


Predrag Ivanovic [predivan at ptt.yu]
Tue, 24 Oct 2006 18:32:36 +0200

On Mon, 23 Oct 2006 20:09:41 +0200 Karl-Heinz Herrmann wrote:

> On Mon, 23 Oct 2006 19:35:22 +0200
> Predrag Ivanovic <predivan at ptt.yu> wrote:
> 
> > If you like Virtual Dub, you will love Avidemux :)
> > I highly recommend it, it can do all that you want and probably more.
> > 
> > http://avidemux.berlios.de
> 
> I'll have a close look -- but my 'need' is an old M$ codec (Indeo 3.2)
> which runs Win95 to XP as far as I know[1]. And not just in Mediaplayer
> but from the "multimedia stack" -- whatever that is. It means however
> that acrobat/win can run movies inside its main window in full-screen
> presentations. 

Judging by contents in lavcodec dir in avidemux source tree, Indeo 3 is supported (indeo3.c is a clue, I guess ;). You'll have to test it yourself, though.

Pedja

-- 
Never trust a man who can count to 1,023 on his fingers.
                      --TimC at ARK


Top    Back


Karl-Heinz Herrmann [kh1 at khherrmann.de]
Tue, 24 Oct 2006 22:16:35 +0200

On Tue, 24 Oct 2006 18:32:36 +0200 Predrag Ivanovic <predivan at ptt.yu> wrote:

> Judging by contents in lavcodec dir in avidemux source tree, Indeo 3 is supported
> (indeo3.c is a clue, I guess ;).
> You'll have to test it yourself, though. 

Ah-- that is encouraging as the website only listed rather major free and /or well enough documented codecs (mpeg4, divx, VCD, DVD foramt,..) which have a *nix library implementation.

K.-H.


Top    Back


Jimmy O'Regan [jimregan at tlen.pl]
Tue, 24 Oct 2006 21:44:51 +0100

Karl-Heinz Herrmann wrote:

> On Tue, 24 Oct 2006 18:32:36 +0200
> Predrag Ivanovic <predivan at ptt.yu> wrote:
> 
>> Judging by contents in lavcodec dir in avidemux source tree, Indeo 3 is supported
>> (indeo3.c is a clue, I guess ;).
>> You'll have to test it yourself, though. 
> 
> Ah-- that is encouraging as the website only listed rather major free
> and /or well enough documented codecs (mpeg4, divx, VCD, DVD foramt,..)
> which have a *nix library implementation. 

Nah... they don't really have a status page, but the changelog (http://ffmpeg.mplayerhq.hu/changelog.html) is the next best thing. MPlayer's status page (http://www.mplayerhq.hu/DOCS/codecs-status.html) lists codecs supported by ffmpeg (among others) if you really want a "proper" status page.


Top    Back