Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th April 2015, 11:56   #2001  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Doh. Made a mistake in ffmsindex and avisynth ffindex that would make it unflag video tracks for indexing in many cases. Here's a fixed build:

test2
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 27th April 2015 at 11:59.
Myrsloik is offline   Reply With Quote
Old 27th April 2015, 12:31   #2002  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I tested 3-4 different source types, measured memory consumption, CPU usage and performance with AVSMeter against L-Smash, awesome work, perfect candidate to replace 2.20.
stax76 is offline   Reply With Quote
Old 2nd May 2015, 21:34   #2003  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Here's test3.

The main noticable change is the framerate "correction". It should now more reliably pick common framerates if the input is close to one.

Previously it would "correct" framerates to 30001/1001, 25020/1001 or worse.

Test it and report your findings.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 2nd May 2015 at 21:36.
Myrsloik is offline   Reply With Quote
Old 2nd May 2015, 21:50   #2004  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
I want to remove the SWScale() function from avisynth since swscale is so horrible in general and doesn't really add anything compared to already existing resizers.

Objections?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th May 2015, 11:17   #2005  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Thanks for the new build. Two PAL samples were ffms2 don't use 25 or 50:

https://www.dropbox.com/s/v6urrdq6ih...%20fps.ts?dl=0

https://www.dropbox.com/s/j5bwk0u205...rphic.mpg?dl=0
stax76 is offline   Reply With Quote
Old 4th May 2015, 12:08   #2006  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by stax76 View Post
Thanks for the new build. Two PAL samples were ffms2 don't use 25 or 50:

https://www.dropbox.com/s/v6urrdq6ih...%20fps.ts?dl=0

https://www.dropbox.com/s/j5bwk0u205...rphic.mpg?dl=0
The 50fps one is exactly 50fps and not changed at all. So that one works for me. No idea what you're getting for that one.

The other one is too far off from 25fps. ~24.9495 fps to be exact. Actually 25000/1001 (24.9750) is quite far off too, seen as a percentage. The current code will only adjust the framerate if it's within 0.05%. This small interval is needed since the difference between 25 and 25000/1001fps is only 0.1% and would otherwise cause more trouble than it solves.

The reason it's done at all is mostly to recover a normal fps from matroska files.

AssumeFPS() is your friend.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th May 2015, 12:39   #2007  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
My understanding of frame rates and field processing, especially NTSC is basic at best. 30000/1001 and 24000/1001 are obviously NTSC but were does 25000/1001 come from?

The 50 fps sample is reported as 25 fps by MediaInfo! I tried to deinterlace it and use AssumeFPS but couldn't find a way to properly process it, only thing that helped was using fpsnum, fpsden arguments for FFVideoSource.

What StaxRip and I believe MeGUI too do is read the frame rate with MediaInfo and then use AssumeFPS. With the Ski sample this didn't work so I switched to use fpsnum and fpsden arguments in the latest StaxRip release.
stax76 is offline   Reply With Quote
Old 4th May 2015, 12:51   #2008  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by stax76 View Post
The 50 fps sample is reported as 25 fps by MediaInfo! I tried to deinterlace it and use AssumeFPS but couldn't find a way to properly process it, only thing that helped was using fpsnum, fpsden arguments for FFVideoSource.
That can't be quite right. fpsnum/fpsden duplicates and/or deletes frames, it shouldn't help with deinterlacing.

The problem with the "SD - anamorphic.mpg" sample is probably initial delay. Delay makes an otherwise nice 25 fps cfr file into vfr with a peculiar average frame rate. Maybe delays should be handled differently? Does not really make sense to use them for the average fps calculation when we cannot map delays into AviSynth anyways (on account of being limited to cfr).

Last edited by sneaker_ger; 4th May 2015 at 12:56.
sneaker_ger is offline   Reply With Quote
Old 4th May 2015, 13:06   #2009  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
The ski sample is 50i right? MediaInfo reporting it as 25 fps should be a bug then.
stax76 is offline   Reply With Quote
Old 4th May 2015, 13:15   #2010  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
It looks ok: frame rate 25, (implied) field rate 50
sneaker_ger is offline   Reply With Quote
Old 4th May 2015, 14:11   #2011  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
When I query the frame rate from AviSynth I get 50 fps from ffms2, something is wrong here, I've never seen a sample like this. How would a full script handling this properly look like?
stax76 is offline   Reply With Quote
Old 4th May 2015, 14:26   #2012  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Oh, you're right. ffms2 duplicates all frames for some reason. So fpsnum=25 (or similar like selecteven()/selectodd() or changefps()) might be valid after all
sneaker_ger is offline   Reply With Quote
Old 4th May 2015, 14:51   #2013  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by sneaker_ger View Post
Oh, you're right. ffms2 duplicates all frames for some reason. So fpsnum=25 (or similar like selecteven()/selectodd() or changefps()) might be valid after all
It's interlaced h.264. It's a known and annoying issue and even in FFmpeg it's handled differently (inexplicably doubled framerate and stuff).
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th May 2015, 15:02   #2014  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Oh, you're right. ffms2 duplicates all frames for some reason. So fpsnum=25 (or similar like selecteven()/selectodd() or changefps()) might be valid after all
Ahh, now I understand what's wrong, maybe Myrsloik can fix it. I didn't know that fpsnum, fpsden mostly is about dropping frames so I'll go back to using AssumeFPS.
stax76 is offline   Reply With Quote
Old 4th May 2015, 15:05   #2015  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by stax76 View Post
Ahh, now I understand what's wrong, maybe Myrsloik can fix it. I didn't know that fpsnum, fpsden mostly is about dropping frames so I'll go back to using AssumeFPS.
Go annoy the FFmpeg developers until they begin to see common sense.

Not going to add a workaround unless money is involved. There may be some other TS issues lurking in that file too.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th May 2015, 15:08   #2016  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by Myrsloik View Post
It's interlaced h.264. It's a known and annoying issue and even in FFmpeg it's handled differently (inexplicably doubled framerate and stuff).
l-smash-works fixes it, maybe workaround ffmpeg problem? Maybe ffmpeg could be fixed by reporting it?
stax76 is offline   Reply With Quote
Old 4th May 2015, 18:42   #2017  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by stax76 View Post
l-smash-works fixes it, maybe workaround ffmpeg problem? Maybe ffmpeg could be fixed by reporting it?
We (the union of disgruntled source filter writers of doom9) had a quick discussion about this. We all think FFmpeg sucks and that the behavior/API should be fixed in it.

Btw, interlaced fields is frame murder.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th May 2015, 19:04   #2018  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Thanks for investigating. I've done a small workaround, StaxRip includes 40 tools and plugins and since no software is perfect GUI authors constantly end up doing workarounds, I'm used to this. Most tools are pretty good, only mp4box sucks big time, I've every week a new problem with it, last week I discovered it's the only tool requiring VC++ 2010 runtime being present, not a big deal on it's own but after 20 more issues it starts to bother.

Last edited by stax76; 4th May 2015 at 19:47.
stax76 is offline   Reply With Quote
Old 4th May 2015, 23:25   #2019  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Quote:
Originally Posted by stax76 View Post
last week I discovered {mp4box is} the only tool requiring VC++ 2010 runtime being present
I believe jb_alvarado's media-autobuild_suite can compile MP4Box with GCC too. When it succeeds...

Well, that's not related to FFMS2.

No native AviSynth source plugin is perfect yet. Fortunately, we have a choice in many cases.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 5th May 2015, 14:33   #2020  |  Link
RRD
Registered User
 
RRD's Avatar
 
Join Date: Nov 2009
Location: France
Posts: 20
Hello,
When I use ffmsindex.exe -k on a 59.94 (60000/1001) fps .mkv file (MediaInfo 0.7.73 report), “fps 0” appears in the output (keyframe numbers are then listed properly). Why? Is this normal?


Other occurrences found with Google:
http://forum.doom9.org/showthread.php?p=1559483#1503
http://forum.selur.de/post7638.html#p7638
http://www.amara.org/en/videos/O0RyzUaR43Oe/ru/596359/
http://www.vidqt.com/id/leeIUjHh8aE?lang=ru
http://lj.blargh.info/mckf04.txt
RRD is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.