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 5th May 2015, 14:37   #2021  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by RRD View Post
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
It's normal. It always says 0 fps for some historical reason I can't remember. The notion of a keyframe list having a framerate is itself quite absurd.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 6th May 2015, 01:20   #2022  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
FFMS2 C-plugin r1015+85

Optimized for Pentium-III and SSE.

ffmpeg version r71895 git-0eec40b Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.1.0 (GCC)
Code:
  libavutil      54. 23.101 / 54. 23.101
  libavcodec     56. 36.100 / 56. 36.100
  libavformat    56. 31.102 / 56. 31.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100

  configuration:
    --prefix=/home/qyot27/win32_build
    --cross-prefix=i686-w64-mingw32-
    --enable-gpl
    --enable-version3
    --disable-w32threads
    --enable-avresample
    --disable-encoders
    --disable-decoder=utvideo
    --enable-libutvideo
    --disable-decoder=dca
    --enable-libdcadec
    --disable-muxers
    --disable-doc
    --disable-debug
    --disable-devices
    --disable-avdevice
    --disable-filters
    --disable-avfilter
    --enable-avisynth
    --cpu=pentium3
    --extra-cflags='-mfpmath=sse -march=pentium3 -msse -mtune=pentium3'
    --target-os=mingw32
    --arch=x86
EDIT 2015-06-26: Newer build available here.

Last edited by qyot27; 26th June 2015 at 08:52. Reason: fix year; that was ffprobe's copyright info
qyot27 is offline   Reply With Quote
Old 7th May 2015, 10:48   #2023  |  Link
RRD
Registered User
 
RRD's Avatar
 
Join Date: Nov 2009
Location: France
Posts: 20
Quote:
Originally Posted by Myrsloik View Post
It's normal. It always says 0 fps for some historical reason I can't remember. The notion of a keyframe list having a framerate is itself quite absurd.
OK, thanks. I am reassured.
The framerate mention may be there to allow easier timecode calculation for people who want to parse the .txt log that -k creates. As #1513 mentioned, it would be nice to have a built-in function that displays both the keyframe numbers and the corresponding timecodes.
Quote:
Originally Posted by Selur View Post
btw. would be nice to have something like -kc which would output the keyframe and the time belonging to it to an output file,..

Basically, integrating https://github.com/SAPikachu/VFRHelper (which uses FFMS2.dll for MKV, MP4 and FLV) for FFMS2's supported input formats.
(I cannot use VFRHelper 1.3.1 (2012-08-24) on my .mkv file, it returns an error. Also, for some reason ffmsindex.exe manages to find keyframes 10 times faster than ffmpeg/ffprobe. )
RRD is offline   Reply With Quote
Old 8th May 2015, 17:23   #2024  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by RRD View Post
OK, thanks. I am reassured.
The framerate mention may be there to allow easier timecode calculation for people who want to parse the .txt log that -k creates. As #1513 mentioned, it would be nice to have a built-in function that displays both the keyframe numbers and the corresponding timecodes.



Basically, integrating https://github.com/SAPikachu/VFRHelper (which uses FFMS2.dll for MKV, MP4 and FLV) for FFMS2's supported input formats.
(I cannot use VFRHelper 1.3.1 (2012-08-24) on my .mkv file, it returns an error. Also, for some reason ffmsindex.exe manages to find keyframes 10 times faster than ffmpeg/ffprobe. )
Not going there. Maybe one day I'll add output of everything as text so you can parse it yourself.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 8th May 2015, 21:29   #2025  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
We're too lazy to improve ffinfo() so contributions would be appreciated. The changes we want are described in the issue below. Only average avisynth scripting skills needed. The values should obviously be displayed with the fancy names as text.

The issue is here:
https://github.com/FFMS/ffms2/issues/61
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 9th May 2015, 21:16   #2026  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Code:
function FFColorSpace(int i) {
    i=(i<0||i>10) ? 2 : i
    return Select(i,"RGB","BT709 (ITU-R Rec.709)","Unspecified","Unspecified","FCC","BT470BG (ITU-R Rec.601)","SMPTE170M (ITU-R Rec.601)","SMPTE240M","YCOCG","BT2020_NCL","BT2020_NC")
}

function FFColorRange(int i) {
    i=(i<0||i>2) ? 0 : i
    return Select(i,"Unknown/Unspecified","Limited range (usually 16-235)","Full range (0-255)")
}

function FFCropping(int l,int t, int r,int b) {
    return "Left="+String(l)+" Top="+String(t)+" Right="+String(r)+" Bottom="+String(b) 
}

function FFSampAR(int num,int den) {
    return String(num)+":"+String(den)+((num<=0 || den<=0)?"":string(Float(num)/den," (%.3f)"))
}

function FFPictType(int ch) {
    s=chr(ch)
    s = s + (
        \ ch==73?" (Intra)":ch==80?" (Predicted)":ch==66?" (Bi-dir predicted)":ch==83?" (S(GMC)-VOP MPEG4)"
        \ : ch==105?" (Switching Intra)":ch==112?" (Switching Predicted)":ch==98?" (FF_BI_TYPE [no good explanation available])"
        \ : " (Unknown)")    
    return s
}

function FFInfo(clip c, bool "framenum", bool "frametype", bool "cfrtime", bool "vfrtime", string "varprefix",
    \ bool "colorspace",bool "colorrange",bool "cropping",bool "sar",bool "version",bool "showprefix") {

    framenum    = default(framenum,true)
    frametype   = default(frametype,true)
    cfrtime     = default(cfrtime,true)
    vfrtime     = default(vfrtime,true)
    varprefix   = default(varprefix, FFVAR_PREFIX)
    colorSpace  = default(colorspace,true)
    colorrange  = default(colorrange,true)
    cropping    = default(cropping,true)
    sar         = default(sar,true)
    version     = default(version,true)
    showprefix  = default(showprefix,false)

    c.frameevaluate("""
        fftempstring = "" 
        varprefix = """" + varprefix + """"
    """)

    version    ? frameevaluate("""fftempstring = fftempstring + "Version: " + FFGetVersion + "\n" """, after_frame=true) : nop() 
    framenum   ? frameevaluate("""fftempstring = fftempstring + "Frame Number: " + string(current_frame) + " of " + string(framecount()) + "\n" """, after_frame=true) : nop()
#   frametype  ? frameevaluate("""fftempstring = fftempstring + "Picture Type: " + chr(eval(varprefix + "FFPICT_TYPE")) + "\n" """, after_frame=true) : nop()
    frametype  ? frameevaluate("""fftempstring = fftempstring + "Picture Type: " + FFPictType(eval(varprefix + "FFPICT_TYPE")) + "\n" """, after_frame=true) : nop()
    cfrtime    ? frameevaluate("""fftempstring = fftempstring + "CFR Time: " + FFFormatTime(round((current_frame * 1000) / framerate())) + "\n" """, after_frame=true) : nop()
    vfrtime    ? frameevaluate("""fftempstring = fftempstring + "VFR Time: " + FFFormatTime(eval(varprefix + "FFVFR_TIME")) + "\n" """, after_frame=true) : nop()
    colorspace ? frameevaluate("""fftempstring = fftempstring + "ColorSpace: " + FFColorSpace(eval(varprefix + "FFCOLOR_SPACE")) + "\n" """, after_frame=true) : nop() 
    colorrange ? frameevaluate("""fftempstring = fftempstring + "Color Range: " + FFColorRange(eval(varprefix + "FFCOLOR_RANGE")) + "\n" """, after_frame=true) : nop() 
    cropping   ? frameevaluate("""fftempstring = fftempstring + "Cropping: " + FFCropping(eval(varprefix + "FFCROP_LEFT"),eval(varprefix + "FFCROP_TOP"),eval(varprefix + "FFCROP_RIGHT"),eval(varprefix + "FFCROP_BOTTOM")) + "\n" """, after_frame=true) : nop() 
    sar        ? frameevaluate("""fftempstring = fftempstring + "SAR: " + FFSampAR(eval(varprefix + "FFSAR_NUM"),eval(varprefix + "FFSAR_DEN")) + "\n" """, after_frame=true) : nop() 
    showprefix ? frameevaluate("""fftempstring = fftempstring + "Prefix: '" + varprefix + "'\n" """, after_frame=true) : nop() 

    return scriptclip("subtitle(fftempstring, lsp = 1)", after_frame=true)
}
UPDATED. Did not realize that varprefix could change with clip (I dont often use ffpegsource).
You might want to remove 'showprefix' stuff.
Alter as you will.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 13th May 2015 at 03:30. Reason: update
StainlessS is offline   Reply With Quote
Old 13th May 2015, 02:08   #2027  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Myrsloik,
take another peek at previous post, not (I hope) quite a lousy as previous.
(incidentally I'm sitting in/on a chair too, FYI).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 13th May 2015 at 02:20.
StainlessS is offline   Reply With Quote
Old 13th May 2015, 09:39   #2028  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by StainlessS View Post
Myrsloik,
take another peek at previous post, not (I hope) quite a lousy as previous.
(incidentally I'm sitting in/on a chair too, FYI).
Glorious work my chair based comrade! You efforts have now been merged with minimal changes.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 17th May 2015, 13:13   #2029  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
I am here to inform you of the glorious new 2.21 release. Go and update because it actually is a lot better than the previous one.

Those of you who still care about Avisynth and have minor coding skills may want to help with this small improvement (replace ffms2.avsi with real code):
https://github.com/FFMS/ffms2/issues/209
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 17th May 2015, 13:32   #2030  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by Myrsloik View Post
I am here to inform you of the glorious new 2.21 release.
ありがとう、よっ。 Many
filler56789 is offline   Reply With Quote
Old 17th May 2015, 15:49   #2031  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Quote:
Originally Posted by Myrsloik View Post
I am here to inform you of the glorious new 2.21 release.
I saw the email update and was most pleased!
Thanks for the update.

__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)

Last edited by Sparktank; 17th May 2015 at 17:23.
Sparktank is offline   Reply With Quote
Old 17th May 2015, 16:17   #2032  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Thanks for the new version!
stax76 is offline   Reply With Quote
Old 17th May 2015, 16:24   #2033  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Quote:
Originally Posted by Sparktank View Post
I don't always use FFMS2, but when I do I like using good versions.
imagines the beer drinking meme guy
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 18th May 2015, 20:30   #2034  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
.. The new 2.21 seems to make a mess ('behave differently') when opening my AVCHD files.

I always remuxed my .mts AVCHD files into .mkv with mkvtoolnix, and then opened the .mkv file with ffms2, and specifying the fpsnum / fpsden parameters. That was the way to get the video/audio sync OK in those files for me.

(The video + audio tracks don't always aline perfectly, my camera seems to start recording audio the moment you press record, but the video track starts less than a second later when the first pictures are actually coming in or something like that).

With the new 2.21 version, it seems to open OK, but after the first 20 frames or so (it varies file to file) it jumps back and the first 20 frames (or so) repeat.
If I try to open the .MTS file directly it creates garbage / artifacted frames around the 20 frames mark for a few frames and then it continues OK again. (Tested this only with Vapoursynth r27 x64 btw, but with both the 2.21-msvc and 2.21-icl x64 builds)

Reverting back to 2.20 fixes it.
dipje is offline   Reply With Quote
Old 18th May 2015, 20:32   #2035  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by dipje View Post
.. The new 2.21 seems to make a mess ('behave differently') when opening my AVCHD files.

I always remuxed my .mts AVCHD files into .mkv with mkvtoolnix, and then opened the .mkv file with ffms2, and specifying the fpsnum / fpsden parameters. That was the way to get the video/audio sync OK in those files for me.

(The video + audio tracks don't always aline perfectly, my camera seems to start recording audio the moment you press record, but the video track starts less than a second later when the first pictures are actually coming in or something like that).

With the new 2.21 version, it seems to open OK, but after the first 20 frames or so (it varies file to file) it jumps back and the first 20 frames (or so) repeat.
If I try to open the .MTS file directly it creates garbage / artifacted frames around the 20 frames mark for a few frames and then it continues OK again. (Tested this only with Vapoursynth r27 x64 btw, but with both the 2.21-msvc and 2.21-icl x64 builds)

Reverting back to 2.20 fixes it.
Always provide a sample if you want us to try debugging things.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 18th May 2015, 20:41   #2036  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I'm also interested in such a sample.
stax76 is offline   Reply With Quote
Old 18th May 2015, 22:44   #2037  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
been a (long) time since I asked something here, what is the preferred method of sharing a sample? Got like a 6 second file, 16.4 mb. It's of my little son so I won't really like throwing it out there public, but to a few trusted devs is no problem.

If a shorter ok-to-go-public example is requested, I need to shoot a second or 3 with something to sync audio to tomorrow (it's night here now).
dipje is offline   Reply With Quote
Old 19th May 2015, 07:33   #2038  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by Myrsloik View Post
I am here to inform you of the glorious new 2.21 release. Go and update because it actually is a lot better than the previous one.

Those of you who still care about Avisynth and have minor coding skills may want to help with this small improvement (replace ffms2.avsi with real code):
https://github.com/FFMS/ffms2/issues/209
Greetings Myrsloik. Many thanks for sharing the update.

Would you also kindly advise if whatever lingering issues with interlaced contents and ts files have been resolved?

Many thanks and best regards.
mariner is offline   Reply With Quote
Old 19th May 2015, 07:59   #2039  |  Link
speedyrazor
Registered User
 
Join Date: Mar 2003
Posts: 194
I would love to use this, but I open very large HD Quicktime movies (120GB) and indexing kills, taking way too long to even start working on the file. Is there a way to disable the indexing and cut the the chase?
speedyrazor is offline   Reply With Quote
Old 19th May 2015, 09:14   #2040  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by speedyrazor View Post
I would love to use this, but I open very large HD Quicktime movies (120GB) and indexing kills, taking way too long to even start working on the file. Is there a way to disable the indexing and cut the the chase?
Sure, just use something else to open files instead.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   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 14:08.


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