TV Thumbnailer - Custom Rec TV Thumbs / Better h264 support (1 Viewer)

Jay_UK

Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Ok...

    Last attempt for today....

    New version - This time I dont use ImageMagic :D

    So the install is a lot easier.

    Simply copy/extract the files in the attached ZIP file into the same folder as the original MTN.EXE (overwriting it)

    J.
     

    Attachments

    • MTN_Replacement.zip
      7.6 MB

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Ok...

    Last attempt for today....

    New version - This time I dont use ImageMagic :D

    So the install is a lot easier.

    Simply copy/extract the files in the attached ZIP file into the same folder as the original MTN.EXE (overwriting it)

    J.

    I tested your attachment but got a window popup about mtn.exe right after starting an episode from TVSeries plugin. I could click OK and it goes away but still why does it show in TVSeries? I need no thumbnails there! :)

    Thank you!
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi,

    I'll post the command when I'm at my pc.

    Not sure why my mtn pops up - unless tvseries uses it??

    J.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Updated TV Thumbnailer Script

    1.2 ALPHA
    - Fixed interlacing artifacts in thumbnails (Thanks @morpheus_xx)
    - Added a Setup GUI so user no longer needs to edit files in notepad
    - Added ability to drag + drop folders to generate thumbnails
    - Removed dependency on installation folder location
    - Now creates a single log file \TV Thumbnailer\Files\tvThumbnailer.log
    - Update wiki to reflect new changes

    Download link in first post of thread
     
    Last edited:

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Holzi,

    What was the popup message?? MTN should run silent (unless there is an error)

    Can you post the log file?

    Cheers,

    J.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Holzi,

    What was the popup message?? MTN should run silent (unless there is an error)

    Can you post the log file?

    Cheers,

    J.
    Here is the part of mediaportal.log (notice that log verbosity was Information and not Debug)

    2012-11-01 20:29:44.027916 [Info.][MPMain(1)]: RefreshRateChanger.SetRefreshRateBasedOnFPS: using internal win32 method for changing refreshrate. current is 50hz, desired is 50
    2012-11-01 20:29:44.042917 [Info.][MPMain(1)]: g_Player.Play(H:\Bauer sucht Frau Österreich - Staffel 9\Bauer sucht Frau Österreich_S09E11.SDTV.mp4 Video)
    2012-11-01 20:29:44.046917 [Info.][MPMain(1)]: VideoPlayer:play H:\Bauer sucht Frau Österreich - Staffel 9\Bauer sucht Frau Österreich_S09E11.SDTV.mp4
    2012-11-01 20:29:44.093920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: DLL Version : MediaInfoLib - v0.7.54
    2012-11-01 20:29:44.093920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: Inspecting media : H:\Bauer sucht Frau Österreich - Staffel 9\Bauer sucht Frau Österreich_S09E11.SDTV.mp4
    2012-11-01 20:29:44.093920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: Parse speed : 0.3
    2012-11-01 20:29:44.093920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: FrameRate : 25
    2012-11-01 20:29:44.093920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: Width : 528
    2012-11-01 20:29:44.093920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: Height : 298
    2012-11-01 20:29:44.094920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: AspectRatio : widescreen
    2012-11-01 20:29:44.094920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: VideoCodec : AVC [ "avc.png" ]
    2012-11-01 20:29:44.094920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: Scan type : progressive
    2012-11-01 20:29:44.094920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: IsInterlaced : False
    2012-11-01 20:29:44.094920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: VideoResolution : SD
    2012-11-01 20:29:44.094920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: VideoDuration : 4347880
    2012-11-01 20:29:44.094920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: AudioRate : 44100
    2012-11-01 20:29:44.095920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: AudioChannels : 2 [ "stereo.png" ]
    2012-11-01 20:29:44.095920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: AudioCodec : AAC LC [ "aac lc.png" ]
    2012-11-01 20:29:44.095920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: HasAudio : True
    2012-11-01 20:29:44.095920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: HasVideo : True
    2012-11-01 20:29:44.095920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: HasSubtitles : False
    2012-11-01 20:29:44.095920 [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: NumSubtitles : 0
    2012-11-01 20:29:44.096920 [Info.][MPMain(1)]: VideoPlayer9: Enabling DX9 exclusive mode
    2012-11-01 20:29:44.450940 [Info.][MPMain(1)]: VMR9: added EVR Renderer to graph
    2012-11-01 20:29:44.606949 [Info.][MPMain(1)]: VideoPlayer9: found H264 video out pin
    2012-11-01 20:29:44.763958 [Info.][MPMain(1)]: Added filter: CoreAVC Video Decoder to graph
    2012-11-01 20:29:44.773959 [Info.][MPMain(1)]: DirectShowUtils: First try to insert new audio renderer Default DirectSound Device
    2012-11-01 20:29:44.773959 [Info.][MPMain(1)]: DirectShowUtils: Found audio renderer
    2012-11-01 20:29:44.775959 [Info.][MPMain(1)]: VideoPlayer9: found AAC LAVF Audio out pin
    2012-11-01 20:29:44.775959 [Info.][MPMain(1)]: VideoPlayer9: found AAC Audio out pin
    2012-11-01 20:29:44.818961 [Info.][MPMain(1)]: Added filter: ffdshow Audio Decoder to graph
    2012-11-01 20:29:45.021973 [Info.][MPMain(1)]: VideoPlayerVMR7: AudioLanguage CultureInfo de
    2012-11-01 20:29:45.067976 [Info.][MPMain(1)]: VideoPlayer:Duration:4347,899751
    2012-11-01 20:29:45.068976 [Info.][MPMain(1)]: g_Player.OnStarted() H:\Bauer sucht Frau Österreich - Staffel 9\Bauer sucht Frau Österreich_S09E11.SDTV.mp4 media:Video
    2012-11-01 20:29:45.159981 [Info.][(80)]: PlaneScene: video WxH : 528x298
    2012-11-01 20:29:45.159981 [Info.][(80)]: PlaneScene: screen WxH : 1920x1080
    2012-11-01 20:29:45.160981 [Info.][(6)]: PlaneScene: Crop: top:1, bottom:1, left:1, right:1
    2012-11-01 20:29:45.170982 [Info.][(6)]: PlaneScene: Crop: top:2, bottom:2, left:2, right:2
    2012-11-01 20:29:45.171982 [Info.][(80)]: PlaneScene: video WxH : 528x298
    2012-11-01 20:29:45.171982 [Info.][(80)]: PlaneScene: screen WxH : 1920x1080
    2012-11-01 20:29:45.180982 [Info.][(6)]: PlaneScene: Crop: top:3, bottom:3, left:3, right:3
    2012-11-01 20:29:45.209984 [Info.][(80)]: PlaneScene: video WxH : 528x298
    2012-11-01 20:29:45.209984 [Info.][(80)]: PlaneScene: screen WxH : 1920x1080
    2012-11-01 20:29:55.030545 [Warn.][(34)]: Picture: Fast loading of thumbnail H:\Bauer sucht Frau Österreich - Staffel 9\Bauer sucht Frau Österreich_S09E11.SDTV.jpg failed - trying safe fallback now
    2012-11-01 20:29:55.063547 [Warn.][(34)]: Failed to extract thumb for H:\Bauer sucht Frau Österreich - Staffel 9\Bauer sucht Frau Österreich_S09E11.SDTV.mp4, trying another method.
    2012-11-01 20:29:55.178554 [Warn.][(34)]: Could not create thumbnail for H:\Bauer sucht Frau Österreich - Staffel 9\Bauer sucht Frau Österreich_S09E11.SDTV.mp4 [Unknown error 0x8004B200]


    I think it would be nice if the thumbnailer would not act on TVSeries but instead only on stuff which is in RecordedTV.
    Thank you for your work! =)
     
    Last edited:

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    I found a bug (told you I wasnt a developer) - Need to fix it!! :O

    In relation to TVSeries/Moving Pictures.... This is controlled by MePo (and not MTN). I need to investigate futher, but it appears there is a link between TVSeries/MovPic and Mepo (TVSeries and MovPic still rely on MEPo's database/code). So it appears its the MePo code that is running MTN when you launch a series or movie (probably the launching of MTN is linked to the internal player of MePo?).

    I can see when I launch an episode via TVSeries - it runs MTN.

    My MTN generates its own log file in:

    c:\program files (x86)\Team Mediaportal\MovieThumbNailer\MTN_Replacement.log

    or

    c:\program files\Team Mediaportal\MovieThumbNailer\MTN_Replacement.log

    I am puzzled to see how MTN/Mepo knows where to save the thumbnail. There is nothing passed to MTN (or within MTN itself) that specifies where to save the thumb.... so I can only think MePo moves/copies it to the right location after MTN has generated it? (will need to check the MePo code)

    J.
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Right then....

    I think I have figured out the (strange) logic MePo uses for thumb creation/moving/duplication of thumbs.

    Please try this attached MTN.EXE file :)

    J.
     

    Attachments

    • mtn.zip
      14.3 KB

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    Try this FFmpeg command:

    ffmpeg.exe -ss BEGINNINGPOSITION -i SOURCEFILE -vf "select=isnan(prev_selected_t)+gte(t-prev_selected_t\,20),yadif=0:-1:0,scale=TILEWIDTH:TILEHEIGHT,setsar=1:1,tile=TILEROWSxTILECOLUMNS" -vframes 1 -vsync 0 -an OUTPUTFILE

    Where the CAPITALISED words are values I pass.

    There is a slight issues with the division by 20 (ont very short movies), I need to tinker with and probably avoid the select on really short stuff.

    You could try the thumbnail filter too.

    The values MePo passes to MTN vary, but MTN supports (taken from MTN source code):

    -a aspect_ratio : override input file's display aspect ratio
    -b %.2f : skip if %% blank is higher; 0:skip all 1:skip really blank >1:eek:ff
    -B %.1f : omit this seconds from the beginning
    -c %d : # of column
    -C %d : cut movie and thumbnails not more than the specified seconds; <=0:eek:ff
    -D %d : edge detection; 0:eek:ff >0:eek:n; higher detects more; try -D4 -D6 or -D8
    -E %.1f : omit this seconds at the end
    -f %s : font file; use absolute path if not in usual places
    -F RRGGBB:size[:font:RRGGBB:RRGGBB:size] : font format [time is optional]
    -g %d : gap between each shot
    -h %d : minimum height of each shot; will reduce # of column to fit
    -i : info text off
    -I : save individual shots too
    -j %d : jpeg quality
    -k RRGGBB : background color (in hex)
    -L info_location[:time_location] : location of text 1=lower left, 2=lower right, 3=upper right, 4=upper left
    -n : run at normal priority
    -N info_suffix : save info text to a file with suffix
    -o %s : output suffix
    -O directory : save output files in the specified directory
    -p : pause before exiting; default on in win32
    -P : dont pause before exiting; override -p
    -r %d : # of rows; >0:eek:verride -s
    -s %d : time step between each shot
    -t : time stamp off
    -T text : add text above output image
    -v : verbose mode (debug)
    -w %d : width of output image; 0:column * movie width
    -W : dont overwrite existing files, i.e. update mode
    -z : always use seek mode
    -Z : always use non-seek mode -- slower but more accurate timing
    When thumbnailing Recorded TV, MePo uses:

    " -D 6 -B {0} -E {1} -c {2} -r {3} -b {4} -t -i -w {5} -n -P \"{6}\"", preGapSec, postGapSec, PreviewColumns, PreviewRows, blank, 0, aVideoPath

    Hope this helps...

    J.
     

    Users who are viewing this thread

    Top Bottom