Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fake-video-detection toggle & false positives #203

Open
stryan opened this issue Jul 3, 2022 · 10 comments
Open

fake-video-detection toggle & false positives #203

stryan opened this issue Jul 3, 2022 · 10 comments

Comments

@stryan
Copy link

stryan commented Jul 3, 2022

Hi, is there a way to disable the fake-video-detection system? It seems to be triggering on my setup for almost every video and it's been a false positive each time:

Media completed: [movie_title]
Blacklisting video '[movie_title]' because no valid video was found: /downloads/.nefarious-unprocessed-downloads/Movies/[movie_file_directory]
Processing request to watch [movie_title]

or if this is not the fake video detection, what's going on here?

@lardbit
Copy link
Owner

lardbit commented Jul 3, 2022

Thanks for bringing this up. It sounds like a bug but i'm trying to find out more. I haven't seen it yet.

Can you tell me what the files in the directory were? Redact titles is fine, i'm just curious about file extensions and such.

@lardbit
Copy link
Owner

lardbit commented Jul 3, 2022

I just disabled the video detection until I can fix the issue, and I'll make it a setting so it can be toggled on/off in the future.

@stryan
Copy link
Author

stryan commented Jul 3, 2022

First example was just a text file and the video file. Video file has the following properties:
Container = Matroska (mkv)
Duration = 01:30:46.656
Overall bitrate = 2 212 kb/s
Video
Codec info = AVC High@L4 | V_MPEG4/ISO/AVC
Resolution = 1912x796
Display AR = 2.402 | 2.40:1
Bitrate = 6 797 kb/s
Framerate = VFR 23.976
Color space = YUV
Chroma subsampling = 4:2:0
Encoder = x264 - core 157
Audio
Codec info = AC-3 | A_AC3
Channels = 6
Bitrate = CBR 320 kb/s
Samplerate = 48.0 kHz
Language = English

I'm testing with another movie right now to see if I can recreate the issue again while I'm actively watching.

@stryan
Copy link
Author

stryan commented Jul 3, 2022

Movie directory:

-rw-rw-r-- 1 1024 users   31 Jul  3 16:58 RARBG.txt
-rw-rw-r-- 1 1024 users 9.0G Jul  3 17:12 [MOVIE_TITLE].1080p.[SRC].[ETC].DDP5.1.Atmos.x264-NOGRP.mkv

ffprobe info:

Input #0, matroska,webm, from [MOVIE_TITLE].1080p.[SRC].[ETC].DDP5.1.Atmos.x264-NOGRP.mkv:                                                                                                                                     [14/44]
  Metadata:                                            
    encoder         : libebml v1.4.2 + libmatroska v1.6.4                                                             
    creation_time   : 2022-05-12T06:04:48.000000Z        
  Duration: 02:17:17.86, start: 0.000000, bitrate: 9351 kb/s
  Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x960 [SAR 1:1 DAR 2:1], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) (original)
    Metadata:                             
      BPS             : 8582191
      DURATION        : 02:17:17.855000000
      NUMBER_OF_FRAMES: 197511                                                                                        
      NUMBER_OF_BYTES : 8837355781                     
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-05-12 06:04:48                                                               
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
    Metadata:             
      BPS             : 768000            
      DURATION        : 02:17:06.112000000
      NUMBER_OF_FRAMES: 257066
      NUMBER_OF_BYTES : 789706752                                                                                     
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-05-12 06:04:48                                                               
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Subtitle: subrip (original) (forced)
    Metadata:                         
      title           : FORCED
      BPS             : 1                 
      DURATION        : 01:39:48.774000000
      NUMBER_OF_FRAMES: 33   
      NUMBER_OF_BYTES : 1131                                                                                          
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-05-12 06:04:48
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(eng): Subtitle: subrip (default) (original)
    Metadata:
      BPS             : 25
      DURATION        : 02:16:14.601000000
      NUMBER_OF_FRAMES: 1095
      NUMBER_OF_BYTES : 26391
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-05-12 06:04:48
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(eng): Subtitle: subrip (original) (hearing impaired)
    Metadata:
      title           : SDH
      BPS             : 40
      DURATION        : 02:16:33.054000000
      NUMBER_OF_FRAMES: 1700
      NUMBER_OF_BYTES : 40982
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-05-12 06:04:48
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

@lardbit
Copy link
Owner

lardbit commented Jul 4, 2022

I added the ability to toggle this feature on/off in the settings page (#204) so you can now disable this while we figure out this false/positive issue. It's disabled by default.

Would you mind sending me (lardbit at gmail dot com) a link to content (via mega.nz or wherever) that triggered a false positive for you? I can't reproduce the issue by fabricating an identical directory listing (e.g. [MOVIE_TITLE].1080p.[SRC].[ETC].DDP5.1.Atmos.x264-NOGRP.mkv and RARBG.txt), so I'm guessing it must be related to the contents of the video file.

This will be pushed out in about an hour, once the build is complete.

Thanks.

@stryan
Copy link
Author

stryan commented Jul 5, 2022

Great, pinging out of band with examples.

@lardbit lardbit changed the title fake-video-detection toggle? fake-video-detection toggle & false positives Jul 5, 2022
@lardbit
Copy link
Owner

lardbit commented Jul 6, 2022

Thanks for sending those videos. Unfortunately, I wasn't able to reproduce the issue by manually applying the video detection logic to them individually.

Did you say you were seeing false/positives for all movies or only some?

Would you mind running (something like) the following on a few directories and let me know the output?

docker-compose exec celery /env/bin/python manage.py video-detection "/downloads/completed/movies/The Wolf of Snow Hollow (2020)/"

Which will output something like:

Testing videos in path: /downloads/completed/movies/The Wolf of Snow Hollow (2020)
INFO  2022-07-05 16:28:16,757  video_detection 164  3069722640  [VIDEO_DETECTION] "/downloads/completed/movies/The Wolf of Snow Hollow (2020)/The.Wolf.Of.Snow.Hollow.2020.1080p.WEB-DL.DD5.1.H264-FGT.mkv" has frame similarity standard deviation: 0.37340298610045225
Found accurate looking videos

I just can't reproduce the error yet so I'm trying to understand the differences of our setup.

Thanks for the help troubleshooting.

@stryan
Copy link
Author

stryan commented Jul 7, 2022

Well this is fun. When I run the command you specified it find finds a valid video:

server:/srv/nefarious/nefarious # docker-compose exec celery /env/bin/python manage.py video-detection "/downloads/completed/Movies/BLEEP"
Testing videos in path: /downloads/completed/Movies/BLEEP
INFO  2022-07-07 00:54:31,540  video_detection 90  139634939553600  [VIDEO_DETECTION] "/downloads/completed/Movies/BLEEP/BLEEP.2022.1080p.BLEEP.x264-RARBG.mp4" has frame similarity standard deviation: 0.41828762811258596
Found accurate looking video

but when I remove it and re add it with automatic video detection enabled, it triggers a failure:

Adding torrent for BLEEP
Added torrent BLEEP.2022.1080p.BLEEP.x264-RARBG with 796 seeders
Starting torrent id: 5 and hash BLEEPHASH
Media completed: BLEEP
[VIDEO_DETECTION] verifying 'BLEEP'
[VIDEO_DETECTION] blacklisting 'BLEEP' because no valid video was found: /downloads/.nefarious-unprocessed-downloads/Movies/BLEEP.2022.1080p.BLEEP.x264-RARBG

So looks like maybe the issue is in the returning the result of the fake-video-detection?

@lardbit
Copy link
Owner

lardbit commented Jul 11, 2022

Well shit...Would you mind sending me the original torrent via email so I can reproduce it on my end?

@stryan
Copy link
Author

stryan commented Jul 11, 2022

Yep, responded out of band.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants