More > JRiver Media Center 31 for Windows
Black bar detection not updating tag correctly
mattkhan:
right yes sorry, I forgot about that when posting
now I realise that the problem, for this film, is that my custom AR field is not aware of that SAR value and this value is what I base the profile rule on, i.e. I have various different configuration for scope vs 16:9 and this is based on that custom field but this is wrong for anamorphic DVDs so it doesn't pick the right profile & doesn't apply the crop/scale I need
I'm not sure how I never noticed the existing Aspect Ratio field before but it seems that contain the right info already so I can just switch to using that
seems I was barking up the wrong tree, apologies for confusion! will retest with the right configuration
Hendrik:
No worries, appreciate all the testing and feedback so we can nail down this feature. A analysis report should be coming next week. I realized if I want to have a "how good is the analysis" info in it, I already need to do some sort of heuristic right away, so I'm trying to make it just overall smarter.
mattkhan:
found another example where you need to skip quite a few frames before you get a good output
i.e. same as https://yabb.jriver.com/interact/index.php/topic,136262.msg944074.html#msg944074
Bourne Ultimatum BD
analysis says no crop at all but film is scope all the way through
checking with ffmpeg and comparing to its default options (e.g. limit=24) says there are 2 problems
1) it takes a long time for decoding to create a correct image, skip=20 fixes it
2) it gets thrown off by dark scenes, limit=16 fixes it
it means cropdetect=skip=20:limit=16 produces the correct 1920x800 for all periods I tested
--- Code: ---for i in 10 20 30 40 50
do
echo $i
ffmpeg -ss 00:${i}:00 -t 2 -i /media/films/The\ Bourne\ Ultimatum/BDMV/STREAM/00009.m2ts -vf cropdetect=skip=20:limit=16 -f null - 2>&1|awk '/crop/ {t=substr($(NF-2),3); split(substr($NF,6),c,":"); print t,c[1],c[2],c[3],c[4]}'
done
--- End code ---
sample output with the above
--- Code: ---50
0.872867 1920 800 0 140
0.914578 1920 800 0 140
0.956289 1920 800 0 140
0.998000 1920 800 0 140
1.039700 1920 800 0 140
--- End code ---
and without either
--- Code: ---50
0.122122 1920 1072 0 4
0.163833 1920 1072 0 4
0.205533 1920 1072 0 4
0.247244 1920 1072 0 4
0.288956 1920 1072 0 4
0.330667 1920 1072 0 4
0.372367 1920 1072 0 4
--- End code ---
and with just skip, things get v strange
--- Code: ---50
0.872867 1360 800 198 140
0.914578 1360 800 198 140
0.956289 1376 800 188 140
0.998000 1376 800 188 140
1.039700 1376 800 188 140
1.081411 1376 800 188 140
1.123122 1376 800 190 140
--- End code ---
Hendrik:
I have been planning to look into the limit, but some videos also have a bit noisy black bars so its a bit of a balance. The question would be how impactful would the mis-detections be, and would any kind of reasonably smart heuristic just ignore them?
If the majority of the matches have a clean cut that also matches a common aspect ratio, then some that are off, especially if they cut the width, should be easily discarded.
mattkhan:
the log output from MC in this case is
--- Code: ---0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x0x1920x1080, with 47 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x142x1328x782, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x142x1328x718, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1896x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1920x940, with 1031 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x142x1456x898, with 6 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1852x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1920x828, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1696x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1676x940, with 10 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1640x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1644x940, with 7 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 0x140x1652x940, with 15 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1110x736, with 4 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x142x1182x810, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x204x1902x940, with 11 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1902x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1906x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1858x940, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1674x940, with 5 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1682x940, with 6 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1730x940, with 10 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 2x140x1650x940, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 8x140x1920x940, with 16 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 408x140x1920x940, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 28x140x1920x940, with 14 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 412x140x1920x940, with 15 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 292x140x1920x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 296x140x1920x940, with 13 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 300x140x1920x940, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 436x140x1920x940, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 200x244x1920x940, with 8 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 456x140x1920x940, with 3 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 332x140x1920x940, with 10 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 332x244x1920x940, with 2 hits
0018882: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 460x140x1920x940, with 4 hits
0018883: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 728x140x1920x940, with 2 hits
0018883: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 112x140x1920x940, with 15 hits
0018883: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 116x142x1920x938, with 2 hits
0018883: 11788: Playback: CJRVideoAnalyzeExtended::BlackBarDetection: Crop Window: 252x140x1920x940, with 2 hits
--- End code ---
I notice you set limit=0.1 so the black scene problem may affect this analysis, still the biggest no of hits is 0x140x1920x940 which looks correct but still not selected in favour of the no crop option with 47 hits
is that output sorted btw? I notice the top line is the one it picked
0x0x1920x1080, with 47 hits
the logs show that the period analysed around the 29min and 46min mark were problematic, both decoding errors and it require skip=16 to get valid output from the former and skip=22 for the latter
it feels like the best solution is to have a filter that detects for decoding errors if that is possible, i.e. a skip=auto feature
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version