Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
From 29.97fps to 25fps in mplayer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Sat Jul 16, 2005 12:39 pm    Post subject: From 29.97fps to 25fps in mplayer Reply with quote

This question is totally unrelated to the fact that Battlestar Galactica just started screening Season 2 in the US and I live in Australia.

Australian TV is in PAL format: video is 25 frames per second, and TVs refresh at 50Hz. (Or 100Hz, if they're more upmarket.) American TV is NTSC, with 29.97fps and 60Hz TVs.

I have a HTPC. Mostly I watch PAL video, but occasionally I find myself in possession of a video file in NTSC. The HTPC can play this just fine, and my TV can display it. However, while 25fps goes neatly into 50Hz or 100Hz, 29.97 does not. The result is a slight but regular jerkiness or hiccuping, which is particulary noticeable during panning shots (steady horizontal motion).

So what is the solution? I feel like there must be an mplayer option to deal with this, but I can't find it.


Last edited by parsim on Thu Jul 21, 2005 1:14 am; edited 1 time in total
Back to top
View user's profile Send private message
Aries-Belgium
l33t
l33t


Joined: 08 Jul 2005
Posts: 730
Location: Willebroek, Belgium

PostPosted: Sat Jul 16, 2005 4:32 pm    Post subject: Reply with quote

Maybe this helps:

open a video with following command: mplayer -fps 25 -srate 50 filename

Good luck :wink:
Back to top
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Mon Jul 18, 2005 1:46 am    Post subject: Reply with quote

Thanks, but no good, I'm afraid. The -fps option simply speeds up or slows down the playback, so forcing a file that's been encoded at 29.97fps to play back at 25fps just slows the video down by 16.5%. The -srate 50 option produced an error ("srate option must be >= 1000") and -srate 50000 didn't make a noticeable difference.
Back to top
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Wed Jul 20, 2005 11:39 pm    Post subject: Reply with quote

C'mon, I know somebody out there has the answer to this! :)
Back to top
View user's profile Send private message
dystopianray
n00b
n00b


Joined: 23 Mar 2005
Posts: 35

PostPosted: Thu Jul 21, 2005 12:59 am    Post subject: Reply with quote

Any modern australian TV should be able to play a regular 60Hz NTSC signal perfectly fine. Any reason why you can't just output in NTSC?
Back to top
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Thu Jul 21, 2005 1:13 am    Post subject: Reply with quote

Thanks for the reply.

Yep, my TV can display 60Hz NTSC. However, I've configured X to refresh at 50Hz, since most of the time I'm playing PAL.

I suppose I could plug a keyboard into the HTPC, quit X, edit xorg.conf, and restart it every time I want to switch between PAL and NTSC, but that's pretty messy. Is there a way for mplayer to tell X to switch refresh rates based on video format?
Back to top
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Mon Jul 25, 2005 10:00 pm    Post subject: Reply with quote

*hopeful bump*
Back to top
View user's profile Send private message
dystopianray
n00b
n00b


Joined: 23 Mar 2005
Posts: 35

PostPosted: Tue Jul 26, 2005 12:48 am    Post subject: Reply with quote

Perhaps outputting in PAL60 will help? It's PAL resolution at 60Hz, although I don't know what the 25fps PAL will be like.
Back to top
View user's profile Send private message
Marinmo
n00b
n00b


Joined: 26 Jul 2005
Posts: 13

PostPosted: Tue Jul 26, 2005 6:58 pm    Post subject: Reply with quote

An alternative way would just to create a bashscript (or two, if you're like me and need to be certain that you're not switching from what-you-want-to-have to the opposite) that toggles between xorg configs? I'm thinking having 2 configs, say "xorgPAL.conf" and "xorgNTSC.conf" somewhere on your system and then just make two small scripts, "xorgPAL" and "xorgNTSC" that copies the config file to become xorg.conf and restarts your xserver (or have a script that toggles between the two)? Probably there's a much easier way but that's how I would solve it.
Back to top
View user's profile Send private message
parsim
Guru
Guru


Joined: 12 Aug 2004
Posts: 347
Location: Melbourne, Australia

PostPosted: Wed Jul 27, 2005 12:06 am    Post subject: Reply with quote

Thanks for the responses. Initially I thought this would be a simple mplayer setting--after all, it must be the same problem US people have when trying to play 24 fps (movie-style) content on NTSC 29.97 fps systems--but I guess not.

If I need to change the X refresh rate, there's actually a way that doesn't require restarting X, isn't there? In Gnome you can go to Desktop -> Preferences -> Screen Resolution and do it. Is there a command I could put into a script? Because that would be perfect.
Back to top
View user's profile Send private message
tom61
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2005
Posts: 111

PostPosted: Wed Jul 27, 2005 12:33 am    Post subject: Reply with quote

Are the PAL and NTSC typically encoded at different resolutions? If so, you could tell XOrg that the PAL res syncs at 50Hz, and the NTSC res syncs at 60Hz. Then when Mplayer launches full screen, it switches to the correct refresh.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum