JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 31.03.2022, 10:08
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default Can't open files with mpv

I recently switched to Linux and here I'm using mpv as my default video player.

I downloaded a mp4 file using JDownloader, but after double-clicking the item to open the file, mpv icon bounces next to cursor indicating it's trying to open, but soon it disappears and nothing is opened, not even mpv window shows up, it looks like an invisible crash (mpv crash, not JDownloader).

Some details:
- Video opens in mpv just fine from folder.
- Video opens in mpv just fine from browser (I downloaded it again from browser to test).
- I downloaded a different mp4 file from a different host: same results, so it's not related to file corruption or anything like that.
- I temporarily set VLC as my default video player and then the file opens just fine from JDownloader.

So the issue is just JDownloader + mpv. Other players works fine with JDownloader. And other apps can launch mpv without issues.

On Windows I didn't use mpv, so I don't know if this issue is platform-specific, but I guess it is.

My OS is Manjaro KDE X11.

So currently I need to open download directory first and launch the file from there, because JDownloader can't handle it. This is not practical at all.

Last edited by pintassilgo; 31.03.2022 at 10:13. Reason: clarification
Reply With Quote
  #2  
Old 31.03.2022, 11:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

@pintassilgo: I'm sorry but JDownloader only downloads the file. If it plays fine with VLC and not with different player, then please check logs/errors/support from that player. When double clicking a file within JDownloader, JDownloader checks for the correct way to open files. In case of KDE, it uses
the command line tool kde-open and kde-open5 , can you check if you can open the file manually in terminal with
Quote:
kde-open5 /path....
?
Also please know that when you have installed JDownloader via flat/snap packages, JDownloader cannot open external applications due to security isolation of the flat/snap package.
Please use the linux installer from here, https://jdownloader.org/jdownloader2
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 31.03.2022, 18:23
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

kde-open and kde-open5 works without any issue.

My Jdownloader isn't flat or snap, I have installed it from AUR, here:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
Is there something wrong with it?

By the way, mpv is bundled with Manjaro.
Reply With Quote
  #4  
Old 31.03.2022, 18:26
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Since we are talking about KDE, just for you to know that apparently JDownloader icon is not transparent, so it gets ugly on KDE Plasma.

Screenshot:
Reply With Quote
  #5  
Old 31.03.2022, 18:30
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Quote:
Originally Posted by pintassilgo View Post
Since we are talking about KDE, just for you to know that apparently JDownloader icon is not transparent, so it gets ugly on KDE Plasma.
But this is just for the tray icon. Strangely, the icon for the window in taskbar is fine:


But icon inconsistency goes further, the icon from startmenu/launcher is totally different:
Reply With Quote
  #6  
Old 31.03.2022, 18:40
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Sorry if i'm going so much off topic, if you think I should create a new thread please tell me. But I just noticed another issue: I set "close to tray" as action to click on minimize button. It works. But then I can't bring JDownloader window up.

I can see from network stats that it's still downloading, but no way I can make main window to show up. So I end up needing to force a restart.
Reply With Quote
  #7  
Old 31.03.2022, 18:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
Since we are talking about KDE, just for you to know that apparently JDownloader icon is not transparent, so it gets ugly on KDE Plasma.
That's an issue with Java itself as the linux tray icon does not yet support transparent Icons
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 31.03.2022, 18:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
But icon inconsistency goes further, the icon from startmenu/launcher is totally different:
A sign that you have installed flat/snap/... package as I supposed.

Quote:
Originally Posted by pintassilgo View Post
My Jdownloader isn't flat or snap, I have installed it from AUR, here:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
Is there something wrong with it?
Thanks for the information. I don't think there is anything wrong with it, but I first have to check it.

Can you please create a log from JDownloader, see
https://support.jdownloader.org/Know...d-session-logs
and post logID here
Maybe the desktop enviroment detection fails for you
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 31.03.2022 at 18:59.
Reply With Quote
  #9  
Old 31.03.2022, 19:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
Sorry if i'm going so much off topic, if you think I should create a new thread please tell me. But I just noticed another issue: I set "close to tray" as action to click on minimize button. It works. But then I can't bring JDownloader window up.
No need to create new topic and nothing to be sorry for! Please reproduce the issue and then close JDownloader via TrayIcon menu. Then start JDownloader again and create a log and select the previous session as well and post logID here. Maybe I can find out why it fails to come back
__________________
JD-Dev & Server-Admin
Reply With Quote
  #10  
Old 31.03.2022, 19:09
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

I can also offer a live Teamviewer session and we check out the issues together. Contact us via support@jdownloader.org
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 31.03.2022, 20:27
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Thanks. I think I'll try your Linux installer. What should I prefer between "x64, Java 11" and "System Java"? I don't know the differences.
Reply With Quote
  #12  
Old 31.03.2022, 23:36
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

So I uninstalled, installed using JDownloader2Setup_unix_nojre.sh and imported my cfg folder. By the way, the AUR package uses ~/.jd/, while your installer uses ~/jd2/.

From all the reported issues, only the strange different icon in startmenu/launcher was fixed. The others still happen.

About not being able to restore window after minimizing to tray, at least I discovered a weird workaround: if I try to open JDownloader TWICE from launcher/shortcut as if it wasn't open, window opens.

I'll see if I can do something to debug or try to create a log.
Reply With Quote
  #13  
Old 01.04.2022, 10:35
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

@pintassilgo: It would help me a lot if you could create a log as explained as it would contain infos about errors(eg why doesn't come back from tray). Else I need to fire up a VM and try to reproduce the issues myself.

Thanks for your help with those issues! I really want to find/fix those bugs as those stuff should work on every supported OS as best as possible!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #14  
Old 01.04.2022, 10:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
About not being able to restore window after minimizing to tray, at least I discovered a weird workaround: if I try to open JDownloader TWICE from launcher/shortcut as if it wasn't open, window opens.
It's no real *workaround*. JDownloader finds the running instance and tell it to *show up* But of course it should work out of the box
__________________
JD-Dev & Server-Admin
Reply With Quote
  #15  
Old 01.04.2022, 20:20
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

01.04.22 15.18.23 <--> 01.04.22 15.20.37 jdlog://2667925302851/
Reply With Quote
  #16  
Old 02.04.2022, 03:27
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

After many tests, I found out that one of the causes of the initial issue is caused by **External links are only visible to Support Staff**hwdec=auto, an mpv option I use. Removing that line from the config file makes video play normally when opened by JDownloader.

But why just with JDownloader? Or may it be something related to Java?
Reply With Quote
  #17  
Old 02.04.2022, 03:30
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

So now I found out this was already reported:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

But mpv dev closed the issue saying it's JDownloader's fault.
Reply With Quote
  #18  
Old 02.04.2022, 09:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

@pintassilgo: Thanks for the log. Does it also contain the session where JDownloader failed to come back from tray-icon?
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 02.04.2022 at 10:24.
Reply With Quote
  #19  
Old 02.04.2022, 10:04
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
So now I found out this was already reported:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

But mpv dev closed the issue saying it's JDownloader's fault.
Thanks for the thread. The logs from here clearly show that the issue is not JDownloader but somewhere with mvp and the cude-nvdec hwdec driver probing taking too long, see github.com/mpv-player/mpv/issues/9151#issuecomment-929818892 .
when you compare from-cmd.log and jdownloader-with-hwdec.log you can see that mpv stops/crashes/getting killed directly after
Quote:
hwdec driver 'cuda-nvdec'
and there is also a mpv bugreport about this issue
github.com/mpv-player/mpv/issues/8765
from log github.com/mpv-player/mpv/issues/8765#issuecomment-1030741173
Quote:
[ 0.673][v][vo/gpu] Loading hwdec driver 'cuda-nvdec'
[ 7.466][v][vo/gpu/cuda-nvdec] cu->cuInit(0) failed -> CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
most likely somewhere in the *please start process xy* hierarchy, it doesn't wait long enough and that's why it fails

I think this is caused by the used "xdg-open" command, see

reddit.com/r/bash/comments/qg2sea/xdgopen_behaving_weirdly/
Quote:
xdg-open effectively starts an application in the background. Actually, to be more correct, it asks a desktop-environment-specific launcher to execute an application, and it's that launcher that causes the application to run in the background. Regardless, xdg-open exits once the application is running. Your sh process run by xfce4-terminal subsequently exits and the terminal itself goes away; the process group containing the application launched by xdg-open is orphaned, and the kernel sends a SIGHUP signal to all processes in that group. A lot of programs will simply terminate when they receive that signal. Your script is working, but the programs it's launching are being terminated straight away.
askubuntu.com/questions/646631/emacs-doesnot-work-with-xdg-open
Quote:
The problem seems to be that gvfs-open and xdg-open return before their children are done working.

Quote:
Originally Posted by pintassilgo View Post
kde-open and kde-open5 works without any issue.
Could you also please test
Quote:
xdg-open /path...
In case xdg-open does also work fine for you, I will prepare another test from within JDownloader for you.
In case it fails for you, then I will update code to prefer kde-open5.
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 02.04.2022 at 10:30.
Reply With Quote
  #20  
Old 02.04.2022, 10:43
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Yes,
Code:
xdg-open "file.mp4"
also works fine.
Reply With Quote
  #21  
Old 02.04.2022, 10:50
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

@pintassilgo: Thanks for the feedback
Just wanting to be sure,have you tested with this "hwdec=auto" option not removed, right?

please install the Eventscripter in your JDownloader and try the following script. go to Settings->Eventscripter, in example click "Edit", use following script
Quote:
callAsync(function(exitCode,stdOut,errOut){ },"xdg-open","/path....");
and hit "Test Run"

in case that one doesn't work, please try
Quote:
callAsync(function(exitCode,stdOut,errOut){ },"kde-open5","/path....");
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 02.04.2022 at 10:53.
Reply With Quote
  #22  
Old 02.04.2022, 10:58
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Did it and the same issue still happens with both xdg-open, kde-open and kde-open5.
Reply With Quote
  #23  
Old 02.04.2022, 11:00
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Quote:
Originally Posted by Jiaz View Post
@pintassilgo: Thanks for the feedback
Just wanting to be sure,have you tested with this "hwdec=auto" option not removed, right?
Right. I use that option and only removed it earlier when I tested that it "causes" the issue. But I restored it right after.
Reply With Quote
  #24  
Old 02.04.2022, 11:04
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Quote:
Originally Posted by Jiaz View Post
@pintassilgo: Thanks for the log. Does it also contain the session where JDownloader failed to come back from tray-icon?
Yes, it does. I'll create a new one and describe below every step:

1. Opened JD.
2. Minimize to tray.
3. Double click tray button. Nothing happens.
4. Double click tray button again. Nothing happens.
5. Try to open JD from launcher. The tab in taskbar quickly appears and disappears after a flash across all the screen. But still no JD window.
6. Repeat previous step. Now JD window shows up, maximized as I always use it.
7. Change setting to "Toggle window status with single click".
9. Minimize JD to tray.
10. Single click tray button. Tray button shortly disappears, but soon reappears, all in less than 1 second. There's no blink on the screen, no window tab in taskbar. Nothing happens besides the described "blinking" in taskbar button.
11. Single click tray button again. Now JD window shows up. But restored... it should be maximized.
12. Create log.

02.04.22 06.03.27 <--> 02.04.22 06.03.44 jdlog://4967925302851/
Reply With Quote
  #25  
Old 02.04.2022, 11:13
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Another feedback...

When I click to open a folder from here at Firefox, my file manager (Dolphin) shows up instantly and that's it. Not for an instant Dolphin icon's bounces at cursor, it's immediate as it should be.

When I do the same from JDownloader, my file manager also shows up instantly, BUT its icon bounces next to cursor for like 5 seconds. It looks like JDownloader couldn't detect that the processing of opening the folder has finished so it keeps waiting until the 5s timeout ends.

This is similar to what happens when I try to open a video file from JDownloader, mpv icon bounces next to cursor for 5 seconds. The difference here is that mpv never opens.

Last edited by pintassilgo; 02.04.2022 at 11:16.
Reply With Quote
  #26  
Old 02.04.2022, 11:16
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
JDownloader couldn't detect that the processing of opening the folder has finished so it keeps waiting until the 5s timeout.
There is no special handling on JDownloader. All JDownloader does is to start "xdg-open /path...." and that's it. No waiting. It's just starting xdg-open like any other application.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #27  
Old 02.04.2022, 11:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
When I click to open a folder from here at Firefox, my file manager (Dolphin) shows up instantly and that's it. Not for an instant Dolphin icon's bounces at cursor, it's immediate as it should be.
Firefox can use a different way of invokation, most likely not using command line tool xdg-open
__________________
JD-Dev & Server-Admin
Reply With Quote
  #28  
Old 02.04.2022, 11:21
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Could you please try some more variants
Quote:
callAsync(function(exitCode,stdOut,errOut){ },"nohup","xdg-open","/path....");
Quote:
callAsync(function(exitCode,stdOut,errOut){ },"mvp","/path....");
__________________
JD-Dev & Server-Admin
Reply With Quote
  #29  
Old 02.04.2022, 11:23
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

mpv command works! The first one does not.
Reply With Quote
  #30  
Old 02.04.2022, 11:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

another try
Quote:
callAsync(function(exitCode,stdOut,errOut){ },"bash","-c","xdg-open /path....");
Quote:
callAsync(function(exitCode,stdOut,errOut){ },"bash","-c","xdg-open","/path....");
__________________
JD-Dev & Server-Admin
Reply With Quote
  #31  
Old 02.04.2022, 11:26
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

bash doesn't work...
Reply With Quote
  #32  
Old 02.04.2022, 11:28
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
bash doesn't work...
is bash installed? maybe /usr/bin/bash
or doesn't work as *same, doesn't work*?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #33  
Old 02.04.2022, 11:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Can you please provide the output to
xdg-mime query filetype /path..
and output to
xdg-mime query default xxx(eg application/pdf)
__________________
JD-Dev & Server-Admin
Reply With Quote
  #34  
Old 02.04.2022, 11:34
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Sorry... doesn't work just like other tries. Bash is installed.
Reply With Quote
  #35  
Old 02.04.2022, 11:35
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Quote:
Originally Posted by Jiaz View Post
Can you please provide the output to
xdg-mime query filetype /path..
and output to
xdg-mime query default xxx(eg application/pdf)
video/mp4
mpv.desktop
Reply With Quote
  #36  
Old 02.04.2022, 11:36
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

Before you ask, this is mpv.desktop command:
mpv --player-operation-mode=pseudo-gui -- %U

compared to vlc which works:
/usr/bin/vlc --started-from-file %U
Reply With Quote
  #37  
Old 02.04.2022, 11:37
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Please create a temp script eg /home/user/test.sh (replace user)
Quote:
#!/bin/bash
xdg-open /path
chmod +x /home/user/test.sh

Quote:
callAsync(function(exitCode,stdOut,errOut){ },"/home/user/test.sh");
and another try with
Quote:
#!/bin/bash
xdg-open /path &
__________________
JD-Dev & Server-Admin
Reply With Quote
  #38  
Old 02.04.2022, 11:38
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Quote:
Originally Posted by pintassilgo View Post
Before you ask, this is mpv.desktop command:
mpv --player-operation-mode=pseudo-gui -- %U

compared to vlc which works:
/usr/bin/vlc --started-from-file %U
Thanks just trying to find a way to reliable use xdg-open
or query OS how to launch/open something and use command directly

I will read here again later and try to reproduce the issue on my system with mvp
__________________
JD-Dev & Server-Admin
Reply With Quote
  #39  
Old 02.04.2022, 11:44
pintassilgo pintassilgo is offline
DSL Light User
 
Join Date: May 2020
Posts: 30
Default

.sh file:
works from terminal
doesn't work from JDownloader

Appending & doesn't change the result.
Reply With Quote
  #40  
Old 02.04.2022, 12:05
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,522
Default

Just found out that xdg-open just a wrapper using kde-open5, so could you try again .sh script with kde-open5 ?
and another idea, could you start JDownloader manually from terminal? and then try it?
go into your JDownloader folder, see https://support.jdownloader.org/Know...tion-directory
and in terminal
Quote:
java -jar JDownloader.jar
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 17:07.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.