showing filename when playback starts
Free media player with support for Youtube
Brought to you by:
rvm
Hi,
I edited Core::changeOSD function to show filename when the playing starts:
void Core::changeOSD(int v) {
qDebug("Core::changeOSD: %d", v);
pref->osd = v;
proc->setPausingPrefix(pausing_prefix());
proc->setOSD(pref->osd);
if (v == 1) {
QString curFileName = mdat.filename;
QFileInfo fi(curFileName);
if (pref->auto_add_to_playlist) {
QStringList playlistFiles = Helper::filesForPlaylist(curFileName, pref->media_to_add_to_playlist);
curFileName.replace("/", "\\");
int i = 0, plFilesCnt = playlistFiles.size();
for (; i < plFilesCnt; ++i)
if (curFileName == playlistFiles[i])
break;
displayTextOnOSD(QString::number(i + 1) + "/" + QString::number(plFilesCnt) + " - " + fi.fileName());
}
else {
displayTextOnOSD(fi.fileName());
}
}
updateWidgets();
}
it even works when i change osd_delay to less than 2200ms (my setting is now 200ms).
what do you think?
In 16.4 you can add the action show_filename in 'Options>Preferences>Advanced>Run the following actions every time a file is opened....' to achieve this.
I wasn't aware of this. Would you mind sharing with us what to put in there to display the file name every time a file is opened for about 2 seconds?
Edit:
Under the MPV tab, Options input, seems that using this would display the file name in OSD:
--osd-msg1=${filename}However, it shows it all the time. Reading mpv's manual, --osd-playing-msg should display it when the file starts and then disappear. However, when I add the following, nothing shows up:
--osd-playing-msg=${filename}Last edit: Bishamon 2017-11-20
I know about that, but in case you have multiple files in playlist it doesnt show total count and the count of the current file.
Moreover, show_filename has been replaced by a primitive that displays fuller information about the file, and needs to be restored.
Great! can you tell when this will be release please?? I was expecting this feature for a long time
Last edit: Bilu 2017-12-10
Version 17.12 adds a new action to display the filename in the OSD. You can add it to "Options>Preferences>Advanced>Run the following actions..."
Passing --osd-playing-msg=${filename} to mpv works as well.
Thank you for the reply. I think it will be useful to set the showOSDText duration in smplayer.ini
2 seconds is very not enough.
Like this:
Please consider this.
Implemented in svn r8905.