Replacement MTN (Thumbnailer) for H264 content (1 Viewer)

Holzi

Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Same problem within MP:
    Code:
    1.11.2012 15:07:12 - ######################### Starting MTN Replacement (1.0.0.75) - By Jay_UK ###########################
    21.11.2012 15:07:12 - Commandline arguments:  -D 6 -B 420 -E 600 -c 2 -r 2 -b 0,60 -t -i -w 0 -n -P D:/Aufnahmen/Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    21.11.2012 15:07:12 - Number of rows: 2
    21.11.2012 15:07:12 - Number of columns: 2
    21.11.2012 15:07:12 - Thumbnail width: (Same as source)
    21.11.2012 15:07:12 - Beginning position: 420
    21.11.2012 15:07:12 - Skip end position: 600
    21.11.2012 15:07:12 - Output Suffix: _s.jpg
    21.11.2012 15:07:12 - Output directory: (Same as source)
    21.11.2012 15:07:12 - Source file/directory: D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    21.11.2012 15:07:12 - Aspect ratio mode: Thumb
    21.11.2012 15:07:12 - JPEG Quality: 100
    21.11.2012 15:07:12 - Internal border size: 0
    21.11.2012 15:07:12 - Extenal border size: 0
    21.11.2012 15:07:12 - FFmpeg process priority: Normal
    21.11.2012 15:07:12 - Batch mode: No
    21.11.2012 15:07:12 - -----------------------------------------------------------------------------------
    21.11.2012 15:07:12 - Movie file (with path): D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    21.11.2012 15:07:12 - ...Found movie
    21.11.2012 15:07:12 - ...Movie filename: Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    21.11.2012 15:07:12 - ...Movie output path (without filename): D:\Aufnahmen
    21.11.2012 15:07:12 - ...Movie filename without extension: Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20
    21.11.2012 15:07:12 - ...Extracting details about the movie using FFMpeg
    21.11.2012 15:07:12 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:07:12 - .........Waiting for the process to finish or timeout of: 10
    21.11.2012 15:07:12 - ......Video width is: 720
    21.11.2012 15:07:12 - ......Video height is: 576
    21.11.2012 15:07:12 - ......Length is: 42772
    21.11.2012 15:07:12 - ...Thumbnail interval is: 10438
    21.11.2012 15:07:12 - ...No custom thumbnail width specified - setting dimension to match source video
    21.11.2012 15:07:12 - ......Thumb dimensions:
    21.11.2012 15:07:12 - .........Width: 720
    21.11.2012 15:07:12 - .........Heigth:576
    21.11.2012 15:07:12 - ......Tile dimensions:
    21.11.2012 15:07:12 - .........Width: 360
    21.11.2012 15:07:12 - .........Height:288
    21.11.2012 15:07:12 - ...Generating frame grab(s)
    21.11.2012 15:07:12 - ...Processing Thumbnail
    21.11.2012 15:07:12 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:07:12 - ...Generating the frame grab(1 - 420): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20_1.jpg
    21.11.2012 15:07:12 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:07:12 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:07:13 - ......Successfully generated the frame grab: 1 - 420
    21.11.2012 15:07:13 - ......Checking the frame is not blank
    21.11.2012 15:07:13 - .........Frame is not blank
    21.11.2012 15:07:13 - ......Tiled frame. Deleting frame file
    21.11.2012 15:07:13 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:07:13 - ...Generating the frame grab(1 - 10858): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20_2.jpg
    21.11.2012 15:07:13 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:07:13 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:07:13 - ......ERROR - Failed to generate the frame grab: 2 - 10858
    21.11.2012 15:07:13 - ################################### Finished MTN Replacement #####################################

    And with Drag & Drop:
    Code:
    21.11.2012 15:10:01 - ######################### Starting MTN Replacement (1.0.0.75) - By Jay_UK ###########################
    21.11.2012 15:10:01 - Commandline arguments:  -c 2 -r 2 -B 720 -w 500 "D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts"
    21.11.2012 15:10:01 - Number of rows: 2
    21.11.2012 15:10:01 - Number of columns: 2
    21.11.2012 15:10:01 - Thumbnail width: 500
    21.11.2012 15:10:01 - Beginning position: 720
    21.11.2012 15:10:01 - Skip end position: 0
    21.11.2012 15:10:01 - Output Suffix: _s.jpg
    21.11.2012 15:10:01 - Output directory: (Same as source)
    21.11.2012 15:10:01 - Source file/directory: D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    21.11.2012 15:10:01 - Aspect ratio mode: Thumb
    21.11.2012 15:10:01 - JPEG Quality: 100
    21.11.2012 15:10:01 - Internal border size: 0
    21.11.2012 15:10:01 - Extenal border size: 0
    21.11.2012 15:10:01 - FFmpeg process priority: Normal
    21.11.2012 15:10:01 - Batch mode: No
    21.11.2012 15:10:01 - -----------------------------------------------------------------------------------
    21.11.2012 15:10:01 - Movie file (with path): D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    21.11.2012 15:10:01 - ...Found movie
    21.11.2012 15:10:01 - ...Movie filename: Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    21.11.2012 15:10:01 - ...Movie output path (without filename): D:\Aufnahmen
    21.11.2012 15:10:01 - ...Movie filename without extension: Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20
    21.11.2012 15:10:01 - ...Extracting details about the movie using FFMpeg
    21.11.2012 15:10:01 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:10:01 - .........Waiting for the process to finish or timeout of: 10
    21.11.2012 15:10:01 - ......Video width is: 720
    21.11.2012 15:10:01 - ......Video height is: 576
    21.11.2012 15:10:01 - ......Length is: 42772
    21.11.2012 15:10:01 - ...Thumbnail interval is: 10513
    21.11.2012 15:10:01 - ......Thumb dimensions:
    21.11.2012 15:10:01 - .........Width: 500
    21.11.2012 15:10:01 - .........Heigth:400
    21.11.2012 15:10:01 - ......Tile dimensions:
    21.11.2012 15:10:01 - .........Width: 250
    21.11.2012 15:10:01 - .........Height:200
    21.11.2012 15:10:01 - ...Generating frame grab(s)
    21.11.2012 15:10:01 - ...Processing Thumbnail
    21.11.2012 15:10:01 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:10:01 - ...Generating the frame grab(1 - 720): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20_1.jpg
    21.11.2012 15:10:01 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:10:01 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:10:01 - ......Successfully generated the frame grab: 1 - 720
    21.11.2012 15:10:01 - ......Checking the frame is not blank
    21.11.2012 15:10:01 - .........Frame is not blank
    21.11.2012 15:10:01 - ......Tiled frame. Deleting frame file
    21.11.2012 15:10:01 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:10:01 - ...Generating the frame grab(1 - 11233): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20_2.jpg
    21.11.2012 15:10:01 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:10:01 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:10:01 - ......ERROR - Failed to generate the frame grab: 2 - 11233
    21.11.2012 15:10:01 - ################################### Finished MTN Replacement #####################################

    I tested another recording with Drag & Drop and this works:
    Code:
    21.11.2012 15:12:59 - ######################### Starting MTN Replacement (1.0.0.75) - By Jay_UK ###########################
    21.11.2012 15:12:59 - Commandline arguments:  -c 2 -r 2 -B 720 -w 500 "D:\Aufnahmen\Wer wird Millionär_ - RTL - 2012-09-10.ts"
    21.11.2012 15:12:59 - Number of rows: 2
    21.11.2012 15:12:59 - Number of columns: 2
    21.11.2012 15:12:59 - Thumbnail width: 500
    21.11.2012 15:12:59 - Beginning position: 720
    21.11.2012 15:12:59 - Skip end position: 0
    21.11.2012 15:12:59 - Output Suffix: _s.jpg
    21.11.2012 15:12:59 - Output directory: (Same as source)
    21.11.2012 15:12:59 - Source file/directory: D:\Aufnahmen\Wer wird Millionär_ - RTL - 2012-09-10.ts
    21.11.2012 15:12:59 - Aspect ratio mode: Thumb
    21.11.2012 15:12:59 - JPEG Quality: 100
    21.11.2012 15:12:59 - Internal border size: 0
    21.11.2012 15:12:59 - Extenal border size: 0
    21.11.2012 15:12:59 - FFmpeg process priority: Normal
    21.11.2012 15:12:59 - Batch mode: No
    21.11.2012 15:13:00 - -----------------------------------------------------------------------------------
    21.11.2012 15:13:00 - Movie file (with path): D:\Aufnahmen\Wer wird Millionär_ - RTL - 2012-09-10.ts
    21.11.2012 15:13:00 - ...Found movie
    21.11.2012 15:13:00 - ...Movie filename: Wer wird Millionär_ - RTL - 2012-09-10.ts
    21.11.2012 15:13:00 - ...Movie output path (without filename): D:\Aufnahmen
    21.11.2012 15:13:00 - ...Movie filename without extension: Wer wird Millionär_ - RTL - 2012-09-10
    21.11.2012 15:13:00 - ...Extracting details about the movie using FFMpeg
    21.11.2012 15:13:00 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:13:00 - .........Waiting for the process to finish or timeout of: 10
    21.11.2012 15:13:00 - ......Video width is: 720
    21.11.2012 15:13:00 - ......Video height is: 576
    21.11.2012 15:13:00 - ......Length is: 4442
    21.11.2012 15:13:00 - ...Thumbnail interval is: 930
    21.11.2012 15:13:00 - ......Thumb dimensions:
    21.11.2012 15:13:00 - .........Width: 500
    21.11.2012 15:13:00 - .........Heigth:400
    21.11.2012 15:13:00 - ......Tile dimensions:
    21.11.2012 15:13:00 - .........Width: 250
    21.11.2012 15:13:00 - .........Height:200
    21.11.2012 15:13:00 - ...Generating frame grab(s)
    21.11.2012 15:13:00 - ...Processing Thumbnail
    21.11.2012 15:13:00 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:13:00 - ...Generating the frame grab(1 - 720): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Wer wird Millionär_ - RTL - 2012-09-10_1.jpg
    21.11.2012 15:13:00 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:13:00 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:13:00 - ......Successfully generated the frame grab: 1 - 720
    21.11.2012 15:13:00 - ......Checking the frame is not blank
    21.11.2012 15:13:00 - .........Frame is not blank
    21.11.2012 15:13:00 - ......Tiled frame. Deleting frame file
    21.11.2012 15:13:00 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:13:00 - ...Generating the frame grab(1 - 1650): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Wer wird Millionär_ - RTL - 2012-09-10_2.jpg
    21.11.2012 15:13:00 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:13:00 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:13:00 - ......Successfully generated the frame grab: 2 - 1650
    21.11.2012 15:13:00 - ......Checking the frame is not blank
    21.11.2012 15:13:00 - .........Frame is not blank
    21.11.2012 15:13:00 - ......Tiled frame. Deleting frame file
    21.11.2012 15:13:00 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:13:00 - ...Generating the frame grab(2 - 2580): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Wer wird Millionär_ - RTL - 2012-09-10_3.jpg
    21.11.2012 15:13:00 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:13:00 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:13:00 - ......Successfully generated the frame grab: 3 - 2580
    21.11.2012 15:13:00 - ......Checking the frame is not blank
    21.11.2012 15:13:00 - .........Frame is not blank
    21.11.2012 15:13:00 - ......Tiled frame. Deleting frame file
    21.11.2012 15:13:00 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    21.11.2012 15:13:00 - ...Generating the frame grab(2 - 3510): C:\Users\SEBAST~1\AppData\Local\Temp\mtn_replacement\mtn_replacement.Wer wird Millionär_ - RTL - 2012-09-10_4.jpg
    21.11.2012 15:13:00 - ......Starting process: C:\Program Files (x86)\Team MediaPortal\MediaPortal\MovieThumbnailer\ffmpeg.exe
    21.11.2012 15:13:00 - .........Waiting for the process to finish or timeout of: 12
    21.11.2012 15:13:00 - ......Successfully generated the frame grab: 4 - 3510
    21.11.2012 15:13:00 - ......Checking the frame is not blank
    21.11.2012 15:13:00 - .........Frame is not blank
    21.11.2012 15:13:00 - ......Tiled frame. Deleting frame file
    21.11.2012 15:13:00 - ......Successfully generated the thumbnail: D:\Aufnahmen\Wer wird Millionär_ - RTL - 2012-09-10_s.jpg
    21.11.2012 15:13:00 - ################################### Finished MTN Replacement #####################################

    So could it be the filename from the first one? Character ! in it.
    One more question: Why is the thumb 500x400. This looks strange. :p
     
    Last edited:

    Jay_UK

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

    Can you try and run FFmpeg manually against that movie/video - there might be an issue where ffmpeg can not handle it?

    Try and run the following (I think its right):

    ffmpeg.exe -ss 11233 -i "D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts" -s 250x200 -an -vsync 0 -vf "yadif=0:-1:0,setsar=1:1" -vframes 1 -y "D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.jpg"

    I know there are times where a corrupt TS file will prevent FFMpeg from seeking to the required place, hence the first frame grab worked (might have been before the corruption), but the second failed.

    In relation to the "weird" thumbnail size, by default the AR of the whole thumb is set to match the AR of the source video, so the AR of the tiles will be changed to make the tiles fit inside the thumbs AR (hence distorted tiles). If you specify "keeptilear" in the registry, it keeps the AR of the tile, to the detriment of the thumbnail AR.

    J.
     
    Last edited:

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Hello!
    I did run your command and here is what happened:
    2.jpg


    Where exactly in the registry?
    Strange thing is if i use @kiwijunglist version it works and thumbs were generated with that recording. I need to test a bit more...
    Thanks! =)


    PS:
    Here is the data from the recording:
    --------------------
    [Datei-Info]
    --------------------
    D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    General #4
    ID : 4
    Complete name : D:\Aufnahmen\Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.ts
    Format : MPEG-TS
    File size : 4.61 GiB
    Duration : 2h 6mn
    Overall bit rate : 5 230 Kbps
    Video #48
    ID : 48 (0x30)
    Menu ID : 137 (0x89)
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings, Matrix : Default
    Duration : 2h 6mn
    Bit rate mode : Constant
    Bit rate : 4 675 Kbps
    Nominal bit rate : 4 500 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 fps
    Standard : PAL
    Colorimetry : 4:2:0
    Scan type : Interlaced
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.451
    Stream size : 4.12 GiB (89%)
    Audio #64
    ID : 64 (0x40)
    Menu ID : 137 (0x89)
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 2
    Duration : 2h 6mn
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Resolution : 16 bits
    Video delay : -142ms
    Stream size : 173 MiB (4%)
    Language : German
    Language, more info : Clean effects
    Text #97
    ID : 97 (0x61)
    Menu ID : 137 (0x89)
    Format : Teletext
    Language : German
     
    Last edited:

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    kiwijunglist version works. I use this parameters.

    call "%LocalDir%Files\ffmpeg.exe" -loglevel quiet -ss 980 -i "%TSRecording%" -vf "select=not(mod(n\,8000)),yadif=0:-1:0,scale=iw*sar:ih","setsar=1:1","scale=iw/3:-1,tile=2x2" -vframes 1 -vsync 0 -an "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%.jpg"


    To be honest this version is very slow (because of how long the pictures are apart from each other?) but has a nice aspect ratio (see screen). Your version is incredibely fast but does not work on this file + has the wrong aspect ratio (which I'm sure is my fault).
    Goodbye Deutschland! Die Auswanderer - VOX - 2012-11-20.jpg


    Is there a wiki somewhere about how to configure all the settings?
    I see.. this is all in the changelog? :)
    Thank you!
     
    Last edited:

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    To be honest this version is very slow (because of how long the pictures are apart from each other?)
    Yes, it calculates 8000 frames in between the thumbs. If you lower the not(mod(n\,8000)) to 1000 for example, it should dramatically speed up ;)
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    I know, you can even set it to 50 but I thought it would be nice if the used thumbs are more far away from each other. ;)
    Btw, which value does Jay_UK's version use?

    Anyway, the main problem is that Jay's version did not work at all on this file. :p
     
    Last edited:

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Holzi (super tester) ;)

    I think kiwijunglist works because it has not reached the "corruption"??

    His version takes the first thumb 720 seconds in and then every 8000 frames (irrlevant of the length of the movie).

    My version starts at 720 seconds too (as defined by MePo), and then misses 500 seconds off the end (as specified by MePo), and then divides the middle/remaining time by the number of thumbs and then grabs them.

    Can try kiwijunglist's on the file by changing the 720 to 11233 (where mine has failed)?

    Thanks,

    J.

    ps - No Wiki as I never envisaged my program going "live" (but glad the changelog helps. You could always run MTN and specify -help as a commandline option)... I've started to merge the code into MePo tonight...Hopefully have it finished this weekend. :)
     

    Users who are viewing this thread

    Top Bottom