INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 14   Go Down

Author Topic: "Swag of Tools" : Collection of Utilities for MC  (Read 99289 times)

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #350 on: March 31, 2021, 04:31:08 am »

Errrrgggg.  I'm sure It will be my escaping of special chars.  What version are you using (on the About Tab)?  Is it  the "8 March 2012 - Test Build" as I made some changes around this?

edit - can you run it with the "Turn on verbose logging" and cut and paste the log?  I'm 99% certain I'm not escaping the "&" but I may not get a chance to look at the code (I'm hopefully going on Holidays for a week .... pending COVID lockdowns that is).
Logged
JRiver CEO Elect

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #351 on: April 03, 2021, 06:09:43 am »

it's march 8 test build. SoT seems to parse media info correctly but then inserting to MC field over API the data is cut when handling "&" character


Code: [Select]
Finished
MC Video Codec updated with AVC
--- MC already has the same information for the above results ---
MC Subtitles updated with English; Finnish
--- MC already has the same information for the above results ---
MC Extras updated with Isolated Music & Effects Track; Audio Commentary with Writer-Director Steve Kloves and Film Historians Julie Kirgo and Nick Redman; Audio Commentary with Director of Photography Michael Ballhaus
MC Audio Tracks RAW updated with FLAC; DTS
--- MC already has the same information for the above results ---
MC Audio Language updated with English
--- MC already has the same information for the above results ---
Language track info found and MC Language Field Updated
--- MC already has the same information for the above results ---
Logged

lello

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 552
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #352 on: April 16, 2021, 01:58:23 am »

@jmone
I don't know if you've read this post, https://yabb.jriver.com/interact/index.php/topic,119385.msg896632.html#msg896632 where the good lepa thinks my request can be solved by adding a script to your SoT.

Ideally, this script, in addition to detecting the black bars, also cropped, but even if it could only change the aspect ratio tag, that would be a great thing.

Everything comes from my desire to be able to automatically cropping the black bars directly with JRiver, as I said in my post https://yabb.jriver.com/interact/index.php/topic,128769.0.html as with madvr and my RX580 I can only do it with HD files while for those a UHD I would have to change VGA and these days it is very complicated.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #353 on: April 16, 2021, 02:05:03 am »

I need to open the code up to look at lepa's issue so at the same time I'll have a look at how to get the actual aspect ratio info an aspect ratio tag.  I hope to have a look this weekend.
Logged
JRiver CEO Elect

lello

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 552
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #354 on: April 16, 2021, 05:02:00 am »

Thank you  :)
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #355 on: April 16, 2021, 07:23:07 pm »

I've had a bit of a play using ffmpeg's cropdetect from a windows batch file to see what it produces but I'm not getting to far:

Here is what I'm running over a letterboxed movie
Code: [Select]
ffmpeg.exe -i "\\MAIN\Media\Discs\AQUAMAN\BDMV\stream\00058.m2ts" -vf cropdetect=24:16:0 -vframes 10 dummy.mp4
pause

Here is part of the output looking at the cropdetect
Code: [Select]
[Parsed_cropdetect_0 @ 0000024cea623240] x1:0 x2:3839 y1:0 y2:2159 w:3840 h:2160 x:0 y:0 pts:7507 t:0.083411 crop=3840:2160:0:0
It is reporting the full 3840x2160 frame from what I can see.

Any suggestions on the FFMPEG command?

Thanks
Nathan
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #356 on: April 16, 2021, 08:48:59 pm »

it's march 8 test build. SoT seems to parse media info correctly but then inserting to MC field over API the data is cut when handling "&" character

Here is a 64-Bit test build that should fix the MediaInfo issue when trying to update the data in a Field Name that contain an "&".

Let me know how it goes.

Thanks
Nathan
Logged
JRiver CEO Elect

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3961
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #357 on: April 17, 2021, 02:20:10 am »

Any suggestions on the FFMPEG command?
I think vframes 10 means you're just looking at the 1st 10 frames only which is not so much and the content might be different to the actual target content

on my copy of the same file, if I switch to looking at 2s worth of content via

ffmpeg -i 00058.m2ts -t 2 -vf cropdetect -y dummy.mp4

then I see the following after about a second

Code: [Select]
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:3839 x2:0 y1:2159 y2:0 w:-3824 h:-2144 x:3834 y:2154 pts:97597 t:1.084411 crop=-3824:-2144:3834:2154
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:3839 x2:0 y1:2159 y2:0 w:-3824 h:-2144 x:3834 y:2154 pts:101351 t:1.126122 crop=-3824:-2144:3834:2154
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:3839 x2:0 y1:2159 y2:0 w:-3824 h:-2144 x:3834 y:2154 pts:105105 t:1.167833 crop=-3824:-2144:3834:2154
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:2996 x2:3084 y1:2159 y2:0 w:80 h:-2144 x:3000 y:2154 pts:108858 t:1.209533 crop=80:-2144:3000:2154
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:2930 x2:3287 y1:276 y2:769 w:352 h:480 x:2934 y:284 pts:112612 t:1.251244 crop=352:480:2934:284
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:1628 x2:3439 y1:276 y2:1883 w:1808 h:1600 x:1630 y:280 pts:116366 t:1.292956 crop=1808:1600:1630:280
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:674 x2:3672 y1:276 y2:1883 w:2992 h:1600 x:678 y:280 pts:120120 t:1.334667 crop=2992:1600:678:280
[Parsed_cropdetect_0 @ 0x55bf81bacc00] x1:0 x2:3839 y1:276 y2:1883 w:3840 h:1600 x:0 y:280 pts:123873 t:1.376367 crop=3840:1600:0:280

it then sticks at 3840:1600:0:280 for a prolonged period of time

fwiw I found that attempting to use input seeking (-ss before -i) with these files gave v strange results, different output depending on the ss value basically, not sure what is going on there but might be something to watch out for if you were attempting to seek past some initial screens. I guess you could do something like parse the output for the 1st 20s, reduce to the unique detected crop sizes and then either pick one that looks right (e.g. full width and y position indicates equal size bars is surely actual black bar size) or let the user select?

Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #358 on: April 17, 2021, 02:42:02 am »

Thanks Matt, that works nicely! 

As a trade off between speed (esp if you are scanning lots of files in one pass) and a good result, I may try 4sec.  I too did not have a lot of luck with -ss and dropping the "suggested"  cropdetect=24:16:0 seemed to also be key.  Anyway, the plan would then to be to just copy the final "crop=" values into a MC Field.
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #359 on: April 17, 2021, 03:28:43 am »

I think it's important to skip a couple of minutes due to all the logos that may not be cropped.
You can try skipping to the nearest keyframe with -noaccurate_seek, and you can also discard the output with -f null.

This works nicely for me (note the dash at the end):
Code: [Select]
ffmpeg -ss 00:05:00 -noaccurate_seek -i input.mp4 -t 5 -vf cropdetect -f null -
I'm testing on an MP4 with black bars, but should work for BluRay too.
"Kursk (2018)" - Unusual format, the first 17 minutes are at 4:3 with side bars, then the rest is at 24:10...
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #360 on: April 17, 2021, 03:32:28 am »

....actually I do have some questions of what to store and in what field.

In MC playback we have
- Crop Options listed as 1.33 (4:3), 1.78 (16:9), 1.85, 2.35, and 2.40
- Aspect Ratio Field that can contain any string and is in a ratio format such as 1:1, 4:3, 16:9 etc (I even have weird stuff like 4400:3285)

So in the above example we have a 3840 x 1600 which I could store as:
- 3840:1600
- 2.4
- 21.6:9 (or as it is commonly and incorrectly called 21:9)

Also is the idea to overwrite the existing "Aspect Ratio" field or add the data to a new field such as "Aspect Ration (Actual)"?
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #361 on: April 17, 2021, 03:38:14 am »


Code: [Select]
ffmpeg -ss 00:05:00 -noaccurate_seek -i input.mp4 -t 5 -vf cropdetect -f null -

I agree that it would be good to skip into the video first, but when trying this I get a bunch of errors:

Code: [Select]
M:\Video Editing\transcodes\ffmpeg\bin>ffmpeg.exe -ss 00:05:00 -noaccurate_seek -i "\\MAIN\Media\Discs\AQUAMAN\BDMV\stream\00058.m2ts" -t 5 -vf cropdetect -f null -
ffmpeg version N-91434-gcced03dd66 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 21.104 / 58. 21.104
  libavformat    58. 17.101 / 58. 17.101
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 25.100 /  7. 25.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
[hevc @ 000001ae8c64b440] Skipping NAL unit 62
[mpegts @ 000001ae8c649c00] start time for stream 24 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 25 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 26 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 27 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 28 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 29 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 30 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 31 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 32 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 33 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 34 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 35 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 36 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 37 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 38 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 39 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 40 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 41 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 42 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 43 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 44 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 45 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 46 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 47 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 48 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 49 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 50 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 51 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 52 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 53 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 54 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] start time for stream 55 is not set in estimate_timings_from_pts
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 24 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 25 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 26 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 27 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 28 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 29 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 30 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 31 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 32 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 33 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 34 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 35 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 36 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 37 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 38 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 39 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 40 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 41 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 42 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 43 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 44 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 45 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 46 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 47 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 48 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 49 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 50 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 51 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 52 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 53 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 54 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ae8c649c00] Could not find codec parameters for stream 55 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 000001ae8c6714c0] missing picture in access unit
[NULL @ 000001ae8c64b440] missing picture in access unit
[NULL @ 000001ae8c6714c0] missing picture in access unit
[NULL @ 000001ae8c64b440] missing picture in access unit
Input #0, mpegts, from '\\MAIN\Media\Discs\AQUAMAN\BDMV\stream\00058.m2ts':
  Duration: 02:23:19.40, start: 11.641667, bitrate: 81975 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
    Stream #0:1[0x1015]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
    Stream #0:2[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
    Stream #0:3[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:4[0x1101]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), s16p
    Stream #0:5[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:6[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:7[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:8[0x1105]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
    Stream #0:9[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:10[0x1106]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), s16p
    Stream #0:11[0x1107]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:12[0x1108]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:13[0x1109]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:14[0x110a]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:15[0x110b]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:16[0x110c]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:17[0x110d]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:18[0x110e]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:19[0x110f]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:20[0x1110]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:21[0x1111]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:22[0x1112]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:23[0x1113]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:24[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:25[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:26[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:27[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:28[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:29[0x12a5]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:30[0x12a6]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:31[0x12a7]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:32[0x12a8]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:33[0x12a9]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:34[0x12aa]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:35[0x12ab]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:36[0x12ac]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:37[0x12ad]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:38[0x12ae]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:39[0x12af]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:40[0x12b0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:41[0x12b1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:42[0x12b2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:43[0x12b3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:44[0x12b4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:45[0x12b5]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:46[0x12b6]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:47[0x12b7]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:48[0x12b8]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:49[0x12b9]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:50[0x12ba]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:51[0x12bb]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:52[0x12bc]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:53[0x12bd]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:54[0x12be]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:55[0x12bf]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> wrapped_avframe (native))
  Stream #0:2 -> #0:1 (truehd (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[hevc @ 000001ae8ff6aa80] Could not find ref with POC 51
[hevc @ 000001ae8ff6aa80] Could not find ref with POC 54
Too many packets buffered for output stream 0:1.
Conversion failed!
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #362 on: April 17, 2021, 03:44:16 am »

...and if I use this to output to a dummy file

Code: [Select]
ffmpeg.exe -ss 00:05:00 -noaccurate_seek -i "\\MAIN\Media\Discs\AQUAMAN\BDMV\stream\00058.m2ts" -t 5 -vf cropdetect -y dummy.mp4
I don't get the error but the Crop Detect aspect ratio is wrong that I think is from using -ss

Code: [Select]
[Parsed_cropdetect_0 @ 0000025a0e72a740] x1:0 x2:3839 y1:0 y2:2159 w:3840 h:2160 x:0 y:0 pts:440721 t:4.896900 crop=3840:2160:0:0
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #363 on: April 17, 2021, 03:49:17 am »

Try "-map 0" to select just one stream. Those errors are likely caused by ffmpeg trying to seek into empty/invalid subtitle streams.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #364 on: April 17, 2021, 03:52:28 am »

Code: [Select]
ffmpeg.exe -ss 00:05:00 -noaccurate_seek -i "\\MAIN\Media\Discs\AQUAMAN\BDMV\stream\00058.m2ts" -t 5 -vf cropdetect -map 0 -codec copy -f null -
Code: [Select]
Filtergraph 'cropdetect' was defined for video output stream 0:0 but codec copy was selected.
Filtering and streamcopy cannot be used together.

....and

Code: [Select]
ffmpeg.exe -ss 00:05:00 -noaccurate_seek -i "\\MAIN\Media\Discs\AQUAMAN\BDMV\stream\00058.m2ts" -t 5 -vf cropdetect -map 0 -f null -
Code: [Select]
Automatic encoder selection failed for output stream #0:24. Default encoder for format null (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:24

Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #365 on: April 17, 2021, 03:58:07 am »

What about selecting the first video stream with "-map 0:v" ? Place it after the -i arg.
You can also try excluding subtitle streams with "-map 0 -map -0:s"
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #366 on: April 17, 2021, 04:01:02 am »

works but the aspect ratio info is wrong

Code: [Select]
[hevc @ 00000212edce4280] Skipping NAL unit 62
[Parsed_cropdetect_0 @ 00000212eab7d340] x1:0 x2:3839 y1:0 y2:2159 w:3840 h:2160 x:0 y:0 pts:440721 t:4.896900 crop=3840:2160:0:0
[Parsed_cropdetect_0 @ 00000212eab7e040] x1:0 x2:1919 y1:0 y2:1079 w:1920 h:1072 x:0 y:4 pts:440721 t:4.896900 crop=1920:1072:0:4
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #367 on: April 17, 2021, 04:10:55 am »

Strange that it outputs 2 different values for the same timestamp. The @address/value is different, but I don't know what that means.
Is this a 3D movie?

edit: can you please paste the whole output to see what streams it's processing?
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #368 on: April 17, 2021, 04:18:14 am »

Not 3D but 2 video streams.  The real issue is that the aspect ratio is just wrong when you use -ss, it is reporting the full frame and not detecting the black bars.  I've attached the output.
Logged
JRiver CEO Elect

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3961
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #369 on: April 17, 2021, 04:18:34 am »

seems to be related to the hevc decoder, same commands behave normally when used on a BD as opposed to a UHD
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #370 on: April 17, 2021, 04:23:36 am »

I think Matt is correct.
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #371 on: April 17, 2021, 04:27:44 am »

OK, after googling I think this is what is called "picture in picture" (PIP). It's a feature of M2TS where you can have 2 video tracks in a single stream, or multiple different bounding boxes per frame.
https://forum.makemkv.com/forum/viewtopic.php?t=15253

I'm sure there's a way to select which one of them you want, but there's no way to know which is the correct one.
I suggest you go with this last command/output and just select the highest x*y value from the output. This is usually what is wanted.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #372 on: April 17, 2021, 04:29:41 am »

Sorry, I missed your reply above.
If it's detecting the wrong resolution with -ss then it's bad :/
What about selecting substream with -map 0:v:0 ?
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #373 on: April 17, 2021, 04:31:21 am »

Yup -ss is bad when combined with cropdetect on these files.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #374 on: April 17, 2021, 04:32:42 am »

.... so back to the question of what to do with the data anyway,

In MC playback we have
- Crop Options listed as 1.33 (4:3), 1.78 (16:9), 1.85, 2.35, and 2.40
- Aspect Ratio Field that can contain any string and is in a ratio format such as 1:1, 4:3, 16:9 etc (I even have weird stuff like 4400:3285)

So in the above example we have a 3840 x 1600 which I could store as:
- 3840:1600
- 2.4
- 21.6:9 (or as it is commonly and incorrectly called 21:9)

Also is the idea to overwrite the existing "Aspect Ratio" field or add the data to a new field such as "Aspect Ration (Actual)"?
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #375 on: April 17, 2021, 04:46:17 am »

I think it's useful to have both the declared and the detected ratios (meaning, new field for the detected ratio).
Or what about entering the fieldname in SWOT?
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #376 on: April 18, 2021, 04:57:52 pm »

Here is a 64-Bit test build that should fix the MediaInfo issue when trying to update the data in a Field Name that contain an "&".

Let me know how it goes.

Thanks
Nathan
Still the same with test build. MC field is cut. Test property "Isolated Music & Effects Track"
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #377 on: April 18, 2021, 05:04:44 pm »

Odd - It is working for me (see pic).  In the About tab does it say 17 April 2021 - Test Build?
Logged
JRiver CEO Elect

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #378 on: April 18, 2021, 05:44:10 pm »

My MC field is called Extras and I will read the value for it from Mediainfo's Audio:Title/s so in this case

MediaInfo Audio:Title value is  "Isolated Score & Effects"
After running SoT MC [Extras] value will have "Isolated Score " when it should be "Isolated Score & Effects"

So the value of the field will be cut not the field name

I'm using 17 April build
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #379 on: April 18, 2021, 05:51:35 pm »

Ahhh got you.  I thought your MC Field was ""Isolated Score & Effects" not that the Data was being read was "Isolated Score & Effects"
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #380 on: April 18, 2021, 06:07:50 pm »

Here is another Test Build.
Logged
JRiver CEO Elect

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #381 on: April 18, 2021, 06:08:14 pm »

Yup, got that from your picture. Says more than 1000 words as they say  8)

E: Now working fine thank you
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #382 on: April 18, 2021, 06:14:11 pm »

Great!

FYI - I'll need to go through the code and change a bunch of different areas to this URI encode method.... so there will be another test build when I've done that.....
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #383 on: April 18, 2021, 06:40:01 pm »

19 April 2021 - Test Build 2 (64-Bit only)

MediaInfo module:  Made some URI encoding changes to handle MC Field Names and Data with characters like "&".

Let me know if I broke anything! :) 
Logged
JRiver CEO Elect

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #384 on: May 15, 2021, 08:54:59 am »

.... so back to the question of what to do with the data anyway,

In MC playback we have
- Crop Options listed as 1.33 (4:3), 1.78 (16:9), 1.85, 2.35, and 2.40
- Aspect Ratio Field that can contain any string and is in a ratio format such as 1:1, 4:3, 16:9 etc (I even have weird stuff like 4400:3285)

So in the above example we have a 3840 x 1600 which I could store as:
- 3840:1600
- 2.4
- 21.6:9 (or as it is commonly and incorrectly called 21:9)

Also is the idea to overwrite the existing "Aspect Ratio" field or add the data to a new field such as "Aspect Ration (Actual)"?
My only motivation is to see real aspect ratio for the actual image content and I myself don't need to do any cropping or anything like that based on it. So I would only use it to select correct aspect ration icon based on the calculation. I wouldn't probably override MC's own aspect ratio field
Logged

lello

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 552
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #385 on: May 15, 2021, 11:18:12 am »

Sorry, but I have understood little, indeed nothing, of what you have written: by chance have you been able to fulfill my request?
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #386 on: May 15, 2021, 12:18:06 pm »

19 April 2021 - Test Build 2 (64-Bit only)

MediaInfo module:  Made some URI encoding changes to handle MC Field Names and Data with characters like "&".

Let me know if I broke anything! :)
Filenames probably still have "& problem"
ref: The Doctor, The Tornado & The Kentucky Kid (2006).mkv
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #387 on: May 15, 2021, 06:24:08 pm »

Thanks - seen the "&" on file name issue so I'll take a look and also at storing the actual image ratio in a new Field
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #388 on: May 16, 2021, 03:02:48 am »

Test Build: 17 May 2021

Fixed the "&" Issue on file names that contain it

Added a Crop Detect, but this is for testing only at this stage
- You will need to run SOT --> Configuration --> Save Configuration and it will add a new Field called "Crop"
- Run SOT --> MediaInfo and it will download a copy of FFmpeg and then it will run over the selected files
- At this stage it will only work on single files like MP4, MKV, MOV etc and not on BD, UHD BD, DVD's etc
- At this stage there is no way to "turn it off" so it will run regardless if you want that data or not
- It may take a fair bit of time given it is analysing the first 30 sec of every video file and then storing the value from the last frame

Let me know if this is useful and I'll
- make it more integrated so it works on BD, UHD, DVD's
- make it optional

Also this is the ffmpeg cmd I'm using, so any ideas on improvements would also be worth discussing:

Code: [Select]
ffmpeg.exe -ss 300 -i "%MC_FileNameExt%" -t 5 -vf cropdetect -f null dummy > ffmpg.txt 2>&1
EDIT:  If the ffmpeg build is not downloading and extracting correctly into your [SOT]\ffmpeg folder (blocked by Windows Defender etc), then you can just download the this ffmpeg build manually and extract it to the [SOT Folder]\ffmpeg folder.

Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #389 on: May 16, 2021, 03:07:50 am »

So I'm grabbing all the text from the end of the last Crop Line that ffmpeg outputs, and it looks like this at this stage.  I don't really know what the 4 different values are for or how you would use them.  I've also attached a sample of the output from one of the files.

Logged
JRiver CEO Elect

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10712
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #390 on: May 16, 2021, 03:18:29 am »

The values are w/h and x/y, enough to describe the active image inside the frame.

So 3840:2160:0:0 means the image is 3840x2160 starting at 0:0 - ie. no cropping was detected.

1920:1072:0:4 means the image is 1920x1072, starting at 0:4 .. ie. it wants to crop off 8 lines in total, and the image starts at line 4 from the top (and the second set of 4 lines to crop would be at the end then)
Logged
~ nevcairiel
~ Author of LAV Filters

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #391 on: May 16, 2021, 03:25:59 am »

ffmpeg is downloaded again for each run for me. there is a folder called ffmpeg but it its empty
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #392 on: May 16, 2021, 03:34:41 am »

Thanks Hendrik, makes sense when it is explained!

So the next question is how to store the data in MC for the intended purpose for those wanting to change the aspect ratio on playback?  Should it be:
- As it is now
- Less the "crop=" text
- Just the first two #'s (eg 3840:2160 or 3840 x 2160)
- As an Decimal Aspect Ratio to xxx number of places from the first two numbers (eg 1.77 for 3840/2160)
- "Round" to some known Fractional Aspect Ratio based on the first two numbers (I don't like this one).

I've now run it over some more random files and compared it to what MC holds already.


Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #393 on: May 16, 2021, 03:41:59 am »

ffmpeg is downloaded again for each run for me. there is a folder called ffmpeg but it its empty

I just tested by deleting my downloaded ffmpeg folder (in the SOT folder) and it download and unzipped the file just fine for me.

Do you see a download progress indicator in the SOT log followed by windows unzipping the file? 

Other wise you could just download the this ffmpeg build manually and extract it to the [SOT Folder]\ffmpeg

I was seeing some Windows Firewall warning it was a dangerous file when downloading it manually but after I hit "keep" it seemed to be fine.
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2376
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #394 on: May 16, 2021, 04:23:52 am »

Also this is the ffmpeg cmd I'm using, so any ideas on improvements would also be worth discussing:
ffmpeg.exe -i "filename" -t 4 -vf cropdetect -y dummy.mp4 > ffmpg.txt 2>&1

You can use "-f null dummy" instead of "-y dummy.mp4" to redirect the output to null (doesn't actually create any output file).
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #395 on: May 16, 2021, 04:27:19 am »

Copying manually that build worked. I think that cropping should be determined from some other timestamps than from beginning or from end as there are much black on those points of time in the movies.
Bill & Tedd Excellent Adventure starts with MGM logo which have black all over the border of the picture so it gets crop value of "crop=768:512:568:246" for movie of 1920:1080 with 16:9 display aspect ratio (DAR) without cropping (actual aspect ratio is 2.39:1). Maybe even test multiple points of time and then determine crop from those values.

Also if users are using this to actually somehow crop movies when watching then DAR of uncropped image has to be known also to be able to get aspect ratio of the cropped image correct for both anamorphic and not anamorphic movies. I guess this value is currently strored in [Aspect Ratio] field if MC was able to read it when it analyzed the file.

MediaInfo reads it from "Display aspect ratio". Maybe SoT could write two tags: [Crop] and [Aspect Ratio (cropped)] or something like that. Of course user can read "Display aspect ratio" themself with SoT and then calculate new display aspect ratio with crop applied

+1 for zybex output to null comment
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #396 on: May 16, 2021, 04:34:15 am »

+1 on the "-f null dummy" !  forgot that one  ::).

So the "hard" bit is finding a single set of parameters that works well "Enough".  Adding -ss 00:05:00 -noaccurate_seek (to get say 5min in) produced weird results last time I look at this but this is a different ffmpeg build so I'll try it again.

Logged
JRiver CEO Elect

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #397 on: May 16, 2021, 04:36:47 am »

+1 on the "-f null dummy" !  forgot that one  ::).

So the "hard" bit is finding a single set of parameters that works well "Enough".  Adding -ss 00:05:00 -noaccurate_seek (to get say 5min in) produced weird results last time I look at this but this is a different ffmpeg build so I'll try it again.
At least there are some opensource transcoders which seem to get auto cropping right so it should be possible
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #398 on: May 16, 2021, 04:48:37 am »

Quote
Adding -ss 00:05:00 -noaccurate seek (to get say 5min in) produced weird results last time I look at this but this is a different ffmpeg build so I'll try it again.

Yup still returns odd results on some files

Quote
At least there are some opensource transcoders which seem to get auto cropping right so it should be possible

I'm happy to add whatever the variables should be..... but as I'm not going to use this feature, it will need to be someone who knows what it should be, other wise I'm just guessing.  If it turns out to be unreliable or just of little use, then I'll back out this code.
Logged
JRiver CEO Elect

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1970
Re: "Swag of Tools" : Collection of Utilities for MC
« Reply #399 on: May 16, 2021, 04:56:56 am »

I'm happy to add whatever the variables should be..... but as I'm not going to use this feature, it will need to be someone who knows what it should be, other wise I'm just guessing.  If it turns out to be unreliable or just of little use, then I'll back out this code.
That is perfectly fine and practical approach
Logged
Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 14   Go Up