Show Video on dialog
-
@aim0d said in Show Video on dialog:
player->setMedia(QUrl::fromLocalFile("Strada.mp4"));
Replace
"Strada.mp4"
with the full path to that file, and try again. See e.g. https://stackoverflow.com/questions/65886167/how-to-solve-qt-unresolved-error-code-0x80040216 -
@aim0d said in Show Video on dialog:
I put it in the project directory and thought it was enought
No, it needs to be in the current working directory of your application if you only wantr to use the file name. By default the build folder where the executable is will be the working directory. But you should never trust such assumptions! So, do not use relative paths but construct the path, see https://doc.qt.io/qt-6/qstandardpaths.html
-
@aim0d
Since you have the reference and solution of someone who encountered the same, I would guess you are not specifying the full path correctly.However, you are just as capable as I am of Googling for
DirectShowPlayerService::doRender
or similar, e.g. https://stackoverflow.com/questions/53328979/directshowplayerservicedorender-unresolved-error-code-0x80040266. Maybethe problem is caused because the Qt Multimedia DirectShow backend does not support some formats because you do not have the codecs, so the solution is to install those codec
The problem itself is not from Qt but from Directshow which is ultimately the one that reproduces the sound so you will have to look for alternative codecs for DirectShow
-
I would guess you are not specifying the full path correctly
If writing the exact same stuff as the example or copy and paste the path isnt enought i dont know what. It's make more sense that i'm doing something else wrong.for the
DirectShowPlayerService::doRender
i havent found anything on internet that resolved the problem but found by myself what was the problem: basically the player doesnt read .mp4 files, just .mpgGoogle very often offerts to much solution and very rarely the right one, this is why its rarely a good advice to look into it. In the past months i've been jumping between HTML, C++, QT and other stuff so prefered blog and forum like this.
-
@aim0d said in Show Video on dialog:
for the DirectShowPlayerService::doRender i havent found anything on internet that resolved the problem but found by myself what was the problem: basically the player doesnt read .mp4 files, just .mpg
Is this not the
the problem is caused because the Qt Multimedia DirectShow backend does not support some formats because you do not have the codecs, so the solution is to install those codec
precisely from the stackoverflow I gave you as an example?
-
@aim0d said in Show Video on dialog:
I tried changing the path, as u told me
Please show the code.
And did you verify that the path you constructed is correct and the file exists at that location?