Use -frames 0 for -identify, so mplayer doesn’t play back the file.
Free media player with support for Youtube
Brought to you by:
rvm
Currently, smplayer uses -frames 1 during identifying when adding files to the playlist. This causes mplayer to play back the entire file. Which can take very long and serves no point. (I added ~12 mp4 music files, and had to kill smplayer after waiting over an hour for it to be done.)
The mplayer man page suggest setting it to -frames 0, to avoid that.
I created a patch to change that, but somehow on execution, smplayer still uses -frames 1. So I’m stuck. Could you help, and make it actually use -frames 0?
What version of mplayer are you using? It works fine for me with -frame 1.
Anyway I think the file to patch is infoprovider.cpp
I use mplayer 1.2.1.
I was using an older version of mplayer but I compiled the latest svn (r37856) and it still works fine with -frame 1.
Do you also have problems with the option Video -> Thumbnail generator? It also uses -frame 1.
The problems only appear when adding audio files. And the same failing appears with the thumbnail generator as well. Which obviosly shouldn’t even be available for audio files.
Did you only test with video files? Because with those, everythng’s working fine here too.
And as I said, the mplayer man page says that
-identifyis just a shorthand for raising the message level to 4. The file is still played back, even with no audio or video being rendered. If you only want the log text, you gotta use-frames 0. :)(Yes, I too think that’s stupid. :)
Last edit: Navid Zamani 2016-04-24
Yes I was testing with videos.
I tested now with an audio file. Now I can see the problem.
Sorry for failing to make that clear earlier… My own fault. :)
Ah, I didn’t find it in
infoprovider.cpp, because I looked for the string “identify” too.I’ve now created a proper patch, which does what I expected. (I gave it the same name, as the other one is obsolete.)
It’s still a bit slow, but in the range that you expect from running
mplayer -identifyon every file added to the playlist.But say, how come it appears to work fine for you? What’s different?
Do you, perchance, have the setting “Get info automatically about files added (slow)”. (under “Playlist”) disabled? Because then it’s always fast, as
-identifyisn’t used.Yes, that option is enabled.
Can you add the working patch?
Last edit: Navid Zamani 2016-04-24
The code is also used for mpv and I'm afraid --frames=0 doesn't work with mpv.
That’s why there are lines like
in the code.
Sorry, I assumed you were a developer of smplayer.
Nobody cares about mpv anyway. ;)
Last edit: Navid Zamani 2016-04-24
Yes but if possible I prefer to use the same code for both players.
I've just fixed the issue in svn r7729.
I agree. Although they’ll drift apart by definition, obviously that would be more elegant. :)
Thank you. :)