NTSC <-> PAL framerate conversions

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Troed Offline
Junior Member
Posts: 21
Joined: Dec 2003
Reputation: 0
Post: #16
hi frodo, it's been a while.

going from 24 fps (film) to 25 (pal) by playing the movie faster and pitching the audio is the standard way of doing a film->pal conversion. it's done in theaters in europe.

going from 29.97 (ntsc) to 25 (pal) is done using a technique called inverse 3:2 pulldown.

http://www.dvdfile.com/news....own.htm

i knew of the jerky problems in xbmp - and i must confess i was surprised to learn that you used none of these techniques already Wink

so, yes - this is a good change for 24->25. it's not good for 29.97->25 - look into the method described above instead. don't the libraries you use implement these techniques?
find quote
SpacemanX Offline
Junior Member
Posts: 2
Joined: Dec 2003
Reputation: 0
Post: #17
thanks for the developers for their dedication.

99.5% of the pal movie dvd's use the 24->25fps conversion. that's the reason they are a bit shorter than their ntsc counterparts.

30->25fps conversion is too noticeable, but the pal60 should handle that. the great majority of the pal tv sets are capable of handling the 60hz mode.

so to the make it short the default behaviour should be:
24->25 = perfect, the best possible way to do this
30->25 = no use, switch xbox to pal60 instead

edit: fixed errors and typos. Smile
find quote
Frodo Offline
Team MediaPortal
Posts: 508
Joined: Sep 2003
Post: #18
yeah i saw that 30->25 is too noticable so i disabled that
it only works for 24<->25 @ the moment

however i'll look into this inverse 3:2 pulldown thing
pretty sure mplayer has a filter supporting this,
ifso i just need 2 enable it

frodo
find quote
Troed Offline
Junior Member
Posts: 21
Joined: Dec 2003
Reputation: 0
Post: #19
(i realised that some of the readers might get confused when i talk about inversed 3:2 pulldown but link to how the original 3:2 pulldown is performed - so here's a link to the actual inversion .. http://www.lukesvideo.com/telecining2.html )
find quote
kraqh3d Offline
Retired Developer
Posts: 7,172
Joined: Dec 2003
Reputation: 4
Location: New York City, USA
Post: #20
techincally, ivtc is not used to go from 29.97 to 25 fps. it's used to go from 29.97 to 24 fps in order to restore the original film framerate. i'll spare the gorey details since troed posted a very nice tutorial on 3:2 pulldown and itvc, but once the original 24fps are restored, you should be able to play it back at 25fps using the current method of speeding up the video.

for 24fps to 30fps, you should use the correct 3:2 pulldown method even though it results in some jaggies.

i'm not sure what's the correct way to get from 25->30. you could use the 25->24 conversion and then use 3:2 pulldown. or just repeat every 5th frame to get up to 30fps which is similar to what progressive scan dvd players do (but in a different pattern).

a progressive scan dvd player first uses itvc to restore the orignial 24fps film. the frames are then repeated in a 3:2 pattern, pushing the framerate up to 60 fps for progressive output. it's not perfectly smooth since each film frame is not displayed for an identical time (3/60,2/60,3/60,2/60,etc.) but it gets rid of the jaggies.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Troed Offline
Junior Member
Posts: 21
Joined: Dec 2003
Reputation: 0
Post: #21
kraqh3d: ouch that's right - in my head i did the 29.97->24->25 chain but looking back i didn't write it out. thanks for correcting me Smile
find quote
SpacemanX Offline
Junior Member
Posts: 2
Joined: Dec 2003
Reputation: 0
Post: #22
pal is nice... Smile

for euro users i see the following conversions needed:


30hz->25hz

far most direct way is not to do the conversion at all, but to switch the xbox to 60hz mode. also this provides the best possible end result. if the tv-companies are not able to do decent conversions off-line why use time to trying to fix this?

if switching is not possible the current method is good enough i.e. skipping every sixth field.

also it will be hard to know when to use inverse telecine and when the material is native 30fps. dvd players can always read the flags from the stream, but as far i know most of mpeg4 streams do not have these flags.

most 30fps mpeg4 content i have come across is native ntsc stuff i.e. tv series. ivtc cannot be used on these.


24->25fps

speeding up is absolutely the best way to deal with this.

(worst way is to telecine to ntsc and the convert to pal without inverse telecining. i have seen these too...)


30->24->25 (inverse telecining + speeding up)

i see this worthwhile for ntsc dvd playback. as most of the mpeg4 streams are ivtcd already it does not seem worth the effort for these only.
find quote
kraqh3d Offline
Retired Developer
Posts: 7,172
Joined: Dec 2003
Reputation: 4
Location: New York City, USA
Post: #23
no prob troed...

spacemanx is right. ivtc is probably not the right solution. it will only work in some situations. dvd players are able to read the flags in the mpeg2 stream and act accordingly. i dont believe this method will work if those flags are not available, like in the case of tv captures.

and yeah, you euro folks have it good. your tv's support both 50 and 60 fps. our crappy us tv's dont Sad

here are the four conversions which would be necessary...

24->25: i cant test this myself, but everyone else seems to be happy with just speeding up the video

30->25: if the xbox can switch the output on the fly to pal60, then thats the way to go. (what was the previous method - dropping every 6th frame to reduce the framerate to 25 fps?)

24->30: a 3:2 pulldown method can be used but it would mean that the video frames would need to be split into fields first. if mplayer supports this, it would be a the right way.

25->30: this is the tough one. just duplicating every 5th frame would probably be ok. whatever is used should be the inverse of the 30->25 if switching to pal60 isnt an option.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
nanite1000 Offline
Member
Posts: 69
Joined: Oct 2003
Reputation: 0
Location: Finland
Post: #24
hi,
i have pal xbox with pal tv (cabable of pal60)
subtitles becomes too early and the offsync raises while watching the movie.
when turning frame adj. off and pal60 on, the subtitles works fine.
i have 2 other avi files with subtitles at the moment and with these the subs works just fine with framerat adj on pla60 off. those files have the same fps 23.976! strange...
with y-button info the framerate is diffrent between these 3 files.
ac3 passtrough is on and have optical spdif cable to amp.
here are the info from gspot, first the faulty one, then the two that works:
using xbmc build 2004-1-2

subs offsync:
filename: underworld.dvdrip.cd1.xvid-deity.avi
stat: file length correct (click for more info...)
video 4cc: xvid codec name: xvid
ratio: 640x272 (2.35:1) [=40:17]
fps: 23.976   duration: 00:59:12 (85,173 fr)
interleave: 1 vid frame (42 ms)  split: yes  imrr: 1.00 qf: 0.287 bits/pixel
audiocodec: ac3 (0x2000) dolby laboratories, inc
audiobitrate: 448 kb/s (5 ch) cbr  freq: 48000 hz
subfile: .sub
xbox y-button shows: 24 fps (+- 0.20, mostly stays at 24)
start: 720x576 pal 16:9

subs in sync:
filename: once.upon.a.time.in.mexico.dvdrip.xvid.avi
stat: file length correct (click for more info...)
video 4cc: xvid codec name: xvid
ratio: 544x304 (1.79:1) [=34:19]
fps: 23.976   duration: 01:41:45 (146,374 fr)
interleave: 1 vid frame (42 ms), p=480  split: no  imrr: 1.00 qf: 0.208 bits/pixel
audiocodec: 0x0055(mp3) id'd as mpeg-1 layer 3
audiobitrate: 129 kb/s (64/ch, stereo) vbr lame3.90 freq: 48000 hz
subfile: .srt
xbox y-button shows: about 25 fps (24.6 - 25, mostly stays at 25)
start: 720x576 pal 16:9

subs in sync:
filename: ghost.in.the.shell.stand.alone.complex.25.[jap.raw].avi
stat: file length correct (click for more info...)
video 4cc: dx50/divx codec name: divx 5.0
ratio: 640x352 (1.82:1) [=20:11]
fps: 23.976   duration: 00:24:30 (35,246 fr)
interleave: 1 vid frame (42 ms)  split: yes  imrr: 1.00 qf: 0.198 bits/pixel
audiocodec: 0x0055(mp3) id'd as mpeg-1 layer 3
audiobitrate: 160 kb/s (80/ch, stereo) cbr  freq: 48000 hz
subfile: .smi   .ssa worked too
xbox y-button shows: about 30 fps (+-0.25)
start: 720x576 pal 16:9

Asus P5N7A-VM|Win7 32bit|Intel C2D E8400|2GB|integrated nVidia 9300-HDMI|Integrated Audio-Optical SPDIF| 50" plasma 3DTV (Samsung PS50C7705)
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Sad   
Post: #25
have you guys looked into ogo's reclock directshow filter code?, maybe it could give you some ideas, or use all it's code?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
MiqueFlesh Offline
Junior Member
Posts: 2
Joined: Jan 2004
Reputation: 0
Post: #26
is it possible to speed up the sub's so i don't have to convert them to 25 fps every time ?
find quote
Butcher Offline
Retired Developer
Posts: 761
Joined: Dec 2003
Reputation: 0
Post: #27
(kraqh3d @ dec. 31 2003,19:46 Wrote:no prob troed...
25->30: this is the tough one. just duplicating every 5th frame would probably be ok. whatever is used should be the inverse of the 30->25 if switching to pal60 isnt an option.
for the 30->25 and 25->30 conversion, you could try alpha blending the frames to try and aproximate the correct speed. i have no idea if this would look any good or not though.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
sergej Offline
Junior Member
Posts: 39
Joined: Jan 2004
Reputation: 0
Post: #28
what format is the subtitle format of the movie with the problem you are referring to? if it's vobsub (.sub and .idx file) it wouldn't make too much sense, because it's timecode-based as your working formats are (at least srt and ssa, not 100% sure about smi). however if it's just a txt-based .sub file (microdvd format), it would make sense indeed. microdvd format is framecode-based, so if you adjust the framerate of the movie, the framerate of the subs also have to be changed. as temporary solution you could try a subtitle tool like: http://www.divx-digest.com/software/subt...nvert.html
and change the fps to 25.
if this works, it would be nice of course if xbmc could do that on the fly Smile

let us know how it goes.
find quote
StoneRoses Offline
Junior Member
Posts: 25
Joined: Oct 2003
Reputation: 0
Post: #29
i asked for this feature on xbmp forum about a year ago, thanks dev team for this feature.

http://www.xboxmediaplayer.de/cgi-bin....neroses

let's summarize:


case 1. 29.97fps video (standard ntsc)
1.1 playback on ntsc box
just play it as is

1.2 playback on pal box
switch to pal60 and play it (if pal60 is available) or

do ivtc (inverse telecine or inverse 3:2 pulldown) to convert it to 23.976fps and speed up to 25fps (this will achieve smooth playback if the source video is 3:2 pulldown (telecine from film) but a bit jerky if the source is standard ntsc



case 2. 25fps video (standard pal)
2.1 playback on ntsc box
slowdown to 23.976fps and do 3:2 pulldown to go up to 29.97fps (quite complicate but this is the best way to go)

2.2 playback on pal box
just play it



case 3. 23.976fps video (ntsc film mode)
3.1 playback on ntsc box
do 3:2 pulldown to convert from 23.976

3.2 playback on pal box
speed up playback 23.976->25fps or

do 3:2 pulldown and switch to pal60 (prefered method if available)


please note: above methods is the correct ways to do framerate conversion in broadcast industry.
find quote
Post Reply