PDA

View Full Version : how to use mplayer to design video player for windows7?



kenchan
18th December 2012, 14:42
i want to use mplayer to design a simply video player for windows7. but i didnn't know which revision can be used.mplayer-svn-35691.7z or mplayer-r35691-src.7z ?


please give me any advice!
TKS

ken

The mplayer wdbsite as below:
http://code.google.com/p/mplayer-for-windows/downloads/list

wysota
18th December 2012, 15:56
Why are you asking this on a Qt-related forum?

kenchan
19th December 2012, 00:17
Hi wysota,

i want to use mplayer base on Qt with slave mode.

TKS.

wysota
19th December 2012, 00:41
Ok but what does your question have to do with Qt? Shouldn't you be asking this at some MPlayer forum?

ChrisW67
19th December 2012, 00:57
but i didnn't know which revision can be used.mplayer-svn-35691.7z or mplayer-r35691-src.7z ?
Since they claim to be the same version I can only assume that one is a set of binaries, the other the source, and either would do. You might consider using the Subversion repository directly.

None of this has anything to do with Qt.

kenchan
19th December 2012, 01:06
Hi chrisW67,

i want to call "mplayer.exe -slave -quiet" mode directly, i used the "mplayer-svn-35691.7z" revision, but cannot play video. so i was puzzled.

TKS

ChrisW67
19th December 2012, 03:23
This still has nothing to do with Qt. Mplayer uses a bundle of external codecs; no codec, no play.

kenchan
21st December 2012, 03:48
Hi ChrisW67,

i see, but i want to konw which revision can be selected to develop videoplayer.

please give me any usefull advice.

TKS

ken

Added after 28 minutes:

Hi All,

i maybe understand! i trying to do now!

thank u very much!

Added after 1 30 minutes:

Hi All,

i extracted mplayer-r35691-src.7z and copy all files to mplayer-svn-35691's codecs directory.(under windows7)

i use below codes, but can't play video,

QFrame *videoPlayerFrame = new QFrame(this);
QProcess * videoPlayerProcess = new QProcess(this);

QString a= " -wid" + QString::number(reinterpret_cast<qlonglong>(videoPlayerFrame->winId()));
QString b= "D:/video.mp4";
QString m= "C:/project/player/mplayer.exe -slave -quiet -ac mad"+ b+a;
videoPlayerProcess->start(m, QIODevice::ReadWrite);


please give me any advice.

Thanks and Best regards.

amleto
21st December 2012, 13:54
need space after

-ac mad

?

Other wise you get "... -ac madD:/video.mp4..."

also - there should be no need to use reinterpret_cast there!!

kenchan
22nd December 2012, 02:34
Hi amleto,

i used another way. but printf error.

QString filename = QFileDialog::getOpenFileName(this, tr("Open Document"), ".", tr("Audio Files(*.mp3 *.mid *.wav);;Vodeo Files(*.avi *.vcd *dvd *rm *mp4);;All Files(*.*)"));
QProcess *process = new QProcess(this);

QFrame *frame = new QFrame(this);

QString mb= " -wid" + QString::number(qlonglong(frame->winId()));
QString m= "./mplayer/mplayer.exe -slave -quiet "+ filename +mb;
process ->start(m, QIODevice::ReadWrite);
if(!process ->waitForStarted(100))
{ qDebug() << "error....";
return;
}

can you give me any advice?


TKS.

Hi All,

i'm thanks very much if you give some sample about this. and if tell me how to use the mplayer.

TKS.

amleto
22nd December 2012, 03:18
1st piece of advice - use [code] tags for that much code!

secondly - what printf error?

Thirdly, read the docs qprocess.html#waitForStarted. 100ms is not very long to wait!

Fourth - are you sure that ./mplayer is correct? ie what path is you qt app started in?

kenchan
22nd December 2012, 05:30
Hi amleto,

thirdly, I had try to use 3000 ms before, but there is nothing display on frame.

fourth., i tryed to use absolute path or relative path , but there is nothing display on frame.



The mplayer revision what i select is correct? and whether add codecs into mplayer's codecs directory? i have added "Codecs for DirectShow" .


TKS.

Added after 22 minutes:

i use other mplayer revision(http://mplayer-ww.com/), can pop up mplayer windows .
but i use the code ' "C:/project/mplayer/mplayer.exe -slave -quiet " + filename ' , didn't display anything.

the code as below:
videoPlayerProcess->start("C:/project/mplayer/mplayer.exe", QIODevice::ReadWrite);

Added after 1 19 minutes:

Hi All,

i know what the problem happened.

TKS.

amleto
22nd December 2012, 11:50
why don't you tell us the solution so others can see it if they search for similar problem and find this thread.

Seems to be recurring theme that OPs don't want to share solutions! :mad:

kenchan
25th December 2012, 11:16
Hi amleto,

I'm sorry,

i found must be have a space after " -wid".see the correct below:
QString mb= " -wid " + QString::number(qlonglong(frame->winId()));

amleto
25th December 2012, 12:51
thanks for update :)