• AnyStream is having some DRM issues currently, Netflix is not available in HD for the time being.
    Situations like this will always happen with AnyStream: streaming providers are continuously improving their countermeasures while we try to catch up, it's an ongoing cat-and-mouse game. Please be patient and don't flood our support or forum with requests, we are working on it 24/7 to get it resolved. Thank you.

[-BUG- FIXED in 1.0.9.1] Track length discrepancies again

0x0x0x0x0

Well-Known Member
Thread Starter
Joined
Sep 21, 2020
Messages
1,337
Likes
598
So I've gotten the last season of "How to get away with murder" from 'flix, and 9/15 episodes had A-V track discrepancies >15s. Are we anywhere closer to closing in on this bug? Sounds like the last MPD entry for the track is not getting downloaded?


Edit: it's the video tracks that are shorter than the audio ones in this case.
 
Last edited:
Thanks for signalling this!
Luckily, I do have that in my region. Which episodes are the problematic ones? As well, what resolution/language+bitrate did you select (just that I have the same source for further investigation)
 
Thanks for signalling this!
Luckily, I do have that in my region. Which episodes are the problematic ones? As well, what resolution/language+bitrate did you select (just that I have the same source for further investigation)

Code:
! How to Get Away With Murder_S06E04_I Hate the World.mp4 |v @ 1920x1080|=43:33.0945 |a E-AC-3 @640000 (en)|=43:49.0280 (15.335 s)
! How to Get Away With Murder_S06E04_I Hate the World.ru.mp4 |v @ 1920x1080|=43:33.0945 |a E-AC-3 @640000 (ru)|=43:49.0280 (15.335 s)
! How to Get Away With Murder_S06E05_We're All Gonna Die.mp4 |v @ 1920x1080|=43:27.0396 |a E-AC-3 @640000 (en)|=43:45.0440 (18.044 s)
! How to Get Away With Murder_S06E05_We're All Gonna Die.ru.mp4 |v @ 1920x1080|=43:27.0396 |a E-AC-3 @640000 (ru)|=43:45.0440 (18.044 s)
! How to Get Away With Murder_S06E06_Family Sucks.mp4 |v @ 1920x1080|=43:20.0807 |a E-AC-3 @640000 (en)|=43:43.0136 (22.329 s)
! How to Get Away With Murder_S06E06_Family Sucks.ru.mp4 |v @ 1920x1080|=43:20.0807 |a E-AC-3 @640000 (ru)|=43:43.0136 (22.329 s)
! How to Get Away With Murder_S06E07_I'm the Murderer.mp4 |v @ 1920x1080|=42:40.0850 |a E-AC-3 @640000 (en)|=42:59.0360 (18.51 s)
! How to Get Away With Murder_S06E07_I'm the Murderer.ru.mp4 |v @ 1920x1080|=42:40.0850 |a E-AC-3 @640000 (ru)|=42:59.0360 (18.51 s)
! How to Get Away With Murder_S06E08_I Want to Be Free.mp4 |v @ 1920x1080|=43:27.0396 |a E-AC-3 @640000 (en)|=43:45.0440 (18.044 s)
! How to Get Away With Murder_S06E08_I Want to Be Free.ru.mp4 |v @ 1920x1080|=43:27.0396 |a E-AC-3 @640000 (ru)|=43:45.0440 (18.044 s)
! How to Get Away With Murder_S06E09_Are You the Mole.mp4 |v @ 1920x1080|=43:12.0381 |a E-AC-3 @640000 (en)|=43:27.0392 (15.011 s)
! How to Get Away With Murder_S06E09_Are You the Mole.ru.mp4 |v @ 1920x1080|=43:12.0381 |a E-AC-3 @640000 (ru)|=43:27.0392 (15.011 s)
! How to Get Away With Murder_S06E10_We're Not Getting Away With It.mp4 |v @ 1920x1080|=43:37.0907 |a E-AC-3 @640000 (en)|=43:57.0344 (19.437 s)
! How to Get Away With Murder_S06E10_We're Not Getting Away With It.ru.mp4 |v @ 1920x1080|=43:37.0907 |a E-AC-3 @640000 (ru)|=43:57.0344 (19.437 s)
! How to Get Away With Murder_S06E12_Let's Hurt Him.mp4 |v @ 1920x1080|=42:47.0231 |a E-AC-3 @640000 (en)|=43:17.0408 (30.177 s)
! How to Get Away With Murder_S06E12_Let's Hurt Him.ru.mp4 |v @ 1920x1080|=42:47.0231 |a E-AC-3 @640000 (ru)|=43:17.0408 (30.177 s)
! How to Get Away With Murder_S06E15_Stay.mp4 |v @ 1920x1080|=44:35.0464 |a E-AC-3 @640000 (en)|=44:55.0328 (19.864 s)
! How to Get Away With Murder_S06E15_Stay.ru.mp4 |v @ 1920x1080|=44:35.0464 |a E-AC-3 @640000 (ru)|=44:55.0328 (19.864 s)

Let me know if you need anything else :)
 
0x0x0x0x0 is that a script? if so can you share it?

Yup, but all you really need is a recent version of MediaInfo and the right argument string, here's the relevant part of it (perl):

Code:
use constant MEDIAINFO_BIN => "/usr/bin/mediainfo";
use constant MEDIAINFO_ARGS => "--Inform=General;%Duration% \nVideo;%Duration% %Width% %Height% \nAudio;%Duration% %Format% %BitRate% %Language%";
use constant DISCR_THRESH => 15;


sub chk_mp4_duration($$) {
  my ($path, $thresh) = (shift, shift);

  open(MEDIAINFO, "-|", MEDIAINFO_BIN, MEDIAINFO_ARGS, $path) or die;
  chomp(my $line = <MEDIAINFO>);
  close(MEDIAINFO);

  if($line !~ m/^(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\d+)\s([^\s]+)\s(\d+)\s(\w+)$/) {
    print "! Can't get duriations for $path ($line)\n";
    return -1;
  }
  my ($c, $v, $w, $h, $a, $f, $r, $l) = ($1, $2, $3, $4, $5, $6, $7, $8);

  my $discrepancy = abs($v - $a) / 1000;

  print "! $path |v @ " . $w . "x" . $h . "|=" . fmt_millis($v)
        . " |a ". $f . " @". $r . " (" . $l . ")|=" . fmt_millis($a)
        . " ($discrepancy s)\n" if $discrepancy > $thresh;

  return $c;
}

...

chk_mp4_duration($src, DISCR_THRESH);

...


It had a bit of a feature creep since Prospere asked for extra details, I could tidy it up and post it, but I'm hoping @Prospere will make it obsolete faster than I tidy it up ;-)
 
Last edited:
0x0x0x0x0 is that a script? if so can you share it?

I threw together a dirty hack meanwhile (somehow it seemed easier than tidying up a script that does more than just work out track lengths):

Let's be imaginative and call the script... 'script' (it relies on `bash-isms' as mediainfo needs \n to be expanded into newline chars):-
Code:
$ cat ~/script

#!/bin/bash

mediainfo $'--Inform=Video;%Duration% \nAudio;%Duration%' "$1" | awk -F' ' '{d=$1 - $2; d=(d < 0 ? -d : d); exit (d <= 15000);}';

invoke it with:-

Code:
find <path to mp4 dir> -type f -name '*.mp4' -exec ~/script "{}" \; -print

That will print filenames where the difference between the video and the audio tracks is more than 15000 milliseconds.

NB: single vs double quotes matter, don't interchange them.

Edit: inverted the logic => fewer things to type ;-)

Edit 2: now that caffeine's kicked in, even simpler without scripts:-

Code:
for f in <path to mp4s>/*.mp4; do mediainfo $'--Inform=Video;%Duration% \nAudio;%Duration%' "$f" | awk -F' ' '{d=$1 - $2; d=(d < 0 ? -d : d); exit (d > 15000);}' ||  echo "$f"; done


Edit 3: if you're stuck with Windows only, but have MediaInfo CLI[1] installed in C:\MediaInfo\MediaInfo.exe, for example, here's a bit of PowerShell for you:

Code:
gci <path to mp4s> -Filter '*.mp4' | %{ $name=$_.FullName; C:\MediaInfo\MediaInfo.exe "--Inform=Video;%Duration% `nAudio;%Duration%" $name | %{ $l=$_.Split(' '); $d=[math]::abs($l[0] - $l[1]); if($d -gt 15000){ $d/=1000; "$name |v|=" + $l[0] + " |a|=" + $l[1] + " ($d s)"};}}

Code:
1: https://mediaarea.net/download/binary/mediainfo/20.09/MediaInfo_CLI_20.09_Windows_x64.zip


Thanks :)
Hope so too

Bet there's something you don't hear every day: "I hope your work obsoletes my work!" ;-)
 
Last edited:
I have had to do a manual fix for this (video shorter than audio). I have noticed when I download with DD+ track this happens with the following episodes...

BSG Mini-series ep01 (AP-CA)

Picard s01e03 (AP-UK)

Smallville s03e07 (AP-CA)

TNG s02e12 & s05e20 (AP-US)


I decided to download the same episodes with the AAC track, the video is perfect...so I just remuxed the "Video" from AAC track file with "Audio" from the DD+ file and got a perfect file each time.

I used MKVToolNix for remuxing.

It is kinda a pain to download the same episode twice, but this issue is more rare than common. I hope this helps someone who needs a interim fix.
 
I have had to do a manual fix for this (video shorter than audio). I have noticed when I download with DD+ track this happens with the following episodes...

<snip>

I decided to download the same episodes with the AAC track, the video is perfect...so I just remuxed the "Video" from AAC track file with "Audio" from the DD+ file and got a perfect file each time.

<snip>

I hope this helps someone who needs a interim fix.



I never would've even thought to try that! As the saying goes: money see---monkey do; so I did, and seems to have worked for two episodes that I tried, kudos @primal !

@Prospere, given that AS fetches the same video track regardless of the audio selection, perhaps it's a muxing problem? Is it too early to refresh my [REQ] for a ticky in the settings to keep the tracks separate? :p
 
will need to try that windows version cli :)


try this one instead, it's better because I'm lazy and if I can get a computer to do things instead of myself, I would (the letter after the 'bang' will tell you what track is short, the difference is always V-A):

Code:
$thresh=15000; gci <path to mp4s> -Filter '*.mp4' | %{ $name=$_.FullName; C:\MediaInfo\MediaInfo.exe "--Inform=Video;%Duration% `nAudio;%Duration%" $name | %{ $l=$_.Split(' '); $d=$l[0] - $l[1];if([math]::abs($d) -gt $thresh){ $d/=1000; "!" + (&{if($d -lt 0){"V "}else{"A "}}) + $name + " |v|=" + $l[0] + " |a|=" + $l[1] + " ($d s)"};}}

Edit: cleanup

PS: setting $thresh to be less than 1000 is meaningless (even raw encrypted streams differ within 1000ms of each other for some titles)
 
Last edited:
i know this is a little off topic but can someone confirm what is the recommended course of action on installing the new version?

I'm currently using the old version, should i uninstall it from my pc and install the new one, or simple just download the new version and allow it to update itself?
 
just install it over the old one, that's all, it's tried and tested!
 
Last edited:
Back
Top