Skip to content
QtWS25 Last Chance
  • 0 Votes
    4 Posts
    1k Views
    M
    Hi @SGaist , Thanks for your response. Just wanted to know for sure if there was a way to do it with Qt itself. Will start looking at other options. Thanks.
  • Reading utf8 QMediaPlaylist

    Solved General and Desktop qmediaplaylist utf-8 utf8
    8
    0 Votes
    8 Posts
    3k Views
    UnitScanU
    [SOLVED] Replace playlist->load(QUrl::fromLocalFile("C:/Users/Marco/Music/default.m3u"), "m3u"); with QFile inputFile("C:/Users/Marco/Music/default.m3u"); if (inputFile.open(QIODevice::ReadOnly)) { QTextStream in(&inputFile); in.setCodec("UTF-8"); while (!in.atEnd()) { QString line = in.readLine().trimmed().toUtf8().constData(); playlist->addMedia(QUrl(QFileInfo(line).filePath())); } inputFile.close(); } and playlist->save(QUrl::fromLocalFile("C:/Users/Marco/Music/default.m3u"), "m3u"); with QFile outputFile("C:/Users/Marco/Music/default.m3u"); outputFile.open(QIODevice::WriteOnly|QIODevice::Text); for (int i=0; i < playlist->mediaCount(); i++) { //… QTextStream out(&outputFile); out << mediafile[0].toUpper()+mediafile.mid(1) << endl; //… } outputFile.close();
  • Extract media duration from metadata

    Solved General and Desktop qmediaplayer qmediaplaylist
    9
    0 Votes
    9 Posts
    6k Views
    UnitScanU
    [SOLVED] I had to resort to the help of TagLibs library. And since the documentation available how to build this library to make it interact with Qt are very confusing and outdated, I proceeded to make available the library that I managed, with great difficulty, to compile by my hand: http://www.unitscan.org/archives/301 I hope will be usefull