sim0n00ps / OF-DL

C# console app to download all of the media from Onlyfans accounts with DRM video downloading support
849 stars 71 forks source link

DRM videos not downloaded when running natively on Linux #629

Open modelfe opened 2 weeks ago

modelfe commented 2 weeks ago

Running this natively on Linux as described here isn't downloading any DRM videos.

Non-DRM content downloads fine. No problem downloading DRM videos on Windows. I haven't tried running it in Docker yet.

Output example:

cd "OF-DL/OF DL/bin/Release/net8.0"
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 ./'OF DL'
 __        __         _                                       _             
 \ \      / /   ___  | |   ___    ___    _ __ ___     ___    | |_    ___    
  \ \ /\ / /   / _ \ | |  / __|  / _ \  | '_ ` _ \   / _ \   | __|  / _ \   
   \ V  V /   |  __/ | | | (__  | (_) | | | | | | | |  __/   | |_  | (_) |  
    \_/\_/     \___| |_|  \___|  \___/  |_| |_| |_|  \___|    \__|  \___/   

   ___    _____           ____    _     
  / _ \  |  ___|         |  _ \  | |    
 | | | | | |_     _____  | | | | | |    
 | |_| | |  _|   |_____| | |_| | | |___ 
  \___/  |_|             |____/  |_____|

config.json located successfully!
You are running OF-DL version 1.7.83
Latest GitHub Release version: 1.7.83
auth.json located successfully!
rules.json located successfully!
FFmpeg located successfully. Path auto-detected: /usr/bin/ffmpeg
device_client_id_blob and/or device_private_key missing, 
https://cdrm-project.com/ will be used instead for DRM protected videos
Logged In successfully as xxx
Downloading from List(s): xxx
Scraping Data for xxx
Folder for xxx already created
Getting Messages
Found 5 Media from xxx Messages

Downloading 5 Messages ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0%
                                                                    Exception caught: Object reference not set to an instance of an object.

StackTrace:    at OF_DL.Helpers.DownloadHelper.OnError(Object sender, ConversionErrorEventArgs e) in /home/xxx/OF-DL/OF DL/Helpers/DownloadHelper.cs:line 942
   at FFmpeg.NET.Engine.OnError(ConversionErrorEventArgs e)
   at FFmpeg.NET.FFmpegProcess.OnConversionError(ConversionErrorEventArgs eventArgs)
   at FFmpeg.NET.FFmpegProcess.OnException(List`1 messages, FFmpegParameters parameters, Int32 exitCode, Exception caughtException)
   at FFmpeg.NET.FFmpegProcess.ExecuteAsync(ProcessStartInfo startInfo, FFmpegParameters parameters, CancellationToken cancellationToken)
   at FFmpeg.NET.FFmpegProcess.ExecuteAsync(CancellationToken cancellationToken)
   at FFmpeg.NET.Engine.ExecuteAsync(FFmpegParameters parameters, CancellationToken cancellationToken)
   at FFmpeg.NET.Engine.ExecuteAsync(String arguments, CancellationToken cancellationToken)
   at OF_DL.Helpers.DownloadHelper.DownloadDrmMedia(String user_agent, String policy, String signature, String kvp, String sess, String url, String decryptionKey, String folder, DateTime lastModified, Int64 media_id, String api_type, Progre                                                                     
melithine commented 2 weeks ago

What version of ffmpeg?

modelfe commented 2 weeks ago

What version of ffmpeg?

ffmpeg version 4.4.2-0ubuntu0.22.04.1

melithine commented 2 weeks ago

You really want 7.0.2 or newer. Some older 6.x releases are fine, too, but I'm not sure which, and people have had the most luck with 7.0.2+.

cactus1902 commented 4 days ago

On Linux I can confirm that on the latest snapshot of ffmpeg (https://ffmpeg.org/releases, scroll down to "ffmpeg-snapshot.tar.bz2", version is 2024-11-20 19:26 at the time of writing this), as well as on the latest commit of this repo (6b823f4), DRM videos do not work. Regular videos do. DRM videos also download fine on Windows as OP said.

Unlike OP, I'm also using my own device_client_id_blob and device_private_key, which do work (I can download DRM videos on Windows, as I said).

All other versions of ffmpeg that I have (version 6, 7.0.2, 20240504, and 20240629) have the same issue with DRM content.

The error message is also identical:

Exception caught: Object reference not set to an instance of an object.

StackTrace:    at OF_DL.Helpers.DownloadHelper.OnError(Object sender, ConversionErrorEventArgs e) in /mnt/mpathac/xxx/OF-DL/OF DL/Helpers/DownloadHelper.cs:line 940
   at FFmpeg.NET.Engine.OnError(ConversionErrorEventArgs e)
   at FFmpeg.NET.FFmpegProcess.OnConversionError(ConversionErrorEventArgs eventArgs)
   at FFmpeg.NET.FFmpegProcess.OnException(List`1 messages, FFmpegParameters parameters, Int32 exitCode, Exception caughtException)
   at FFmpeg.NET.FFmpegProcess.ExecuteAsync(ProcessStartInfo startInfo, FFmpegParameters parameters, CancellationToken cancellationToken)
   at FFmpeg.NET.FFmpegProcess.ExecuteAsync(CancellationToken cancellationToken)
   at FFmpeg.NET.Engine.ExecuteAsync(FFmpegParameters parameters, CancellationToken cancellationToken)
   at FFmpeg.NET.Engine.ExecuteAsync(String arguments, CancellationToken cancellationToken)
   at OF_DL.Helpers.DownloadHelper.DownloadDrmMedia(String user_agent, String policy, String signature, String kvp, String sess, String url, String decryptionKey, String folder,                                                                                        mFileName, String filename, String path) in /mnt/mpathac/xxx/OF-DL/OF DL/Helpers/Dow