Compile from the code
Moderator: HuggiL
Compile from the code
Hi Stanley,
as I wanted to experience and help a bit, I wanted to compile mediacoder from the source.
First, I didn't found a solution (sln) that got all the projects.
Try to compile projects individually, I'm missing a "wmencode.h" file. What are the pre-requisites? Do we need to install anything like an SDK to get mc to compile?
Thanks again...
btw: I saw that you added vdr as a supported media file. Cool
as I wanted to experience and help a bit, I wanted to compile mediacoder from the source.
First, I didn't found a solution (sln) that got all the projects.
Try to compile projects individually, I'm missing a "wmencode.h" file. What are the pre-requisites? Do we need to install anything like an SDK to get mc to compile?
Thanks again...
btw: I saw that you added vdr as a supported media file. Cool
Hello Stanley,
from the latest svn [SVN 320], I still can't compile mediacoder. It seems that some files have not been checked in.
Thanks,
Olivier.
from the latest svn [SVN 320], I still can't compile mediacoder. It seems that some files have not been checked in.
Code: Select all
wmconfig.cpp
c:\transfer\mediacoder.svn\mcgui\src\wmconfig.h(1) : fatal error C1083: Cannot open include file: 'wmencode.h': No such file or directory{/code]
Also, in mccore:
[code]c:\transfer\mediacoder.svn\mccore\src\preference.h(12) : fatal error C1083: Cannot open include file: 'xmlaccessor.h': No such file or directory
videoencoders.cpp
Olivier.
Ok, I got it to compile. Here is my first patch
Fixes:
- common.c: When retrieving saved item list (.m3u), strings parameters where not retrieved (this included disc-root).
- mediatools.cpp: Allow 5 seconds for the DVD drive to spin-off before while reading on mplayer's pipe. The previous setting was 20*50ms=1s and this was definitely not enough for my drive, thus preventing mc to retrieve media information like video width and height, thus preventing easy cropping. 5s might not be enough for all systems anyway...
- mencoderopts.cpp: -dvd-device as an mplayer/mencoder parameter is now in the form of "DISK:" and no more "DISK:\VIDEO_TS\". The format changed from an older mplayer version and needed to evolve. This removes the message about "libdvdcss" that cannot read the DVD (false warning anyway).
I can now add DVDs or DVD chapters in my transcoding list without problems and use the easy crop feature.
Not quite there yet, as my transcoding to PMP videos fails: wrong parameters are passed to lame (-s 48000 instead of -s 44100) which makes pmpmuxer to complain (it expects 44100). Forcing to 44100 is not enough: it goes through the pmpmuxer, but I get a slow-motion audio when playing... I'll look at that later this week...
On top of SVN 327:
Fixes:
- common.c: When retrieving saved item list (.m3u), strings parameters where not retrieved (this included disc-root).
- mediatools.cpp: Allow 5 seconds for the DVD drive to spin-off before while reading on mplayer's pipe. The previous setting was 20*50ms=1s and this was definitely not enough for my drive, thus preventing mc to retrieve media information like video width and height, thus preventing easy cropping. 5s might not be enough for all systems anyway...
- mencoderopts.cpp: -dvd-device as an mplayer/mencoder parameter is now in the form of "DISK:" and no more "DISK:\VIDEO_TS\". The format changed from an older mplayer version and needed to evolve. This removes the message about "libdvdcss" that cannot read the DVD (false warning anyway).
I can now add DVDs or DVD chapters in my transcoding list without problems and use the easy crop feature.
Not quite there yet, as my transcoding to PMP videos fails: wrong parameters are passed to lame (-s 48000 instead of -s 44100) which makes pmpmuxer to complain (it expects 44100). Forcing to 44100 is not enough: it goes through the pmpmuxer, but I get a slow-motion audio when playing... I'll look at that later this week...
On top of SVN 327:
Code: Select all
Index: common/common.c
===================================================================
--- common/common.c (revision 327)
+++ common/common.c (working copy)
@@ -122,7 +122,7 @@
s = (char*)malloc(len + 1);
memcpy(s, p, len);
s[len] = 0;
- *(char**)data = s;
+ *(char**)data[i] = s;
} break;
default:
*(int*)data[i] = atoi(p);
Index: mccore/src/mediatools.cpp
===================================================================
--- mccore/src/mediatools.cpp (revision 327)
+++ mccore/src/mediatools.cpp (working copy)
@@ -157,7 +157,7 @@
goto exit;
}
}
- for (int i = 0; (!PeekNamedPipe(hPipeRead,0,0,0,&bytes,0) || bytes == 0) && i < 20; i++)
+ for (int i = 0; (!PeekNamedPipe(hPipeRead,0,0,0,&bytes,0) || bytes == 0) && i < 100; i++)
Sleep(50);
if (bytes == 0) {
CloseHandle(hPipeRead);
Index: mccore/src/mencoderopts.cpp
===================================================================
--- mccore/src/mencoderopts.cpp (revision 327)
+++ mccore/src/mencoderopts.cpp (working copy)
@@ -321,7 +321,11 @@
if (mcinst.startpos) str.AppendFormat(" -ss %d", mcinst.startpos / 1000);
if (item && item->info.discroot) {
- str.AppendFormat(" -dvd-device \"%s\"", item->info.discroot);
+ char *buf;
+ buf = strdup(item->info.discroot);
+ *strchr(buf, '\\') = '\0';
+ str.AppendFormat(" -dvd-device \"%s\"", buf);
+ free(buf);
}
if (item && item->info.chapter) {
str.AppendFormat(" -chapter %d", item->info.chapter);
I've applied the patch, except for the place where stripping "VIDEO_TS" string. In my place, with "VIDEO_TS" in -dvd-device just works.
PS: If you are finding more bugs and want MediaCoder's SVN write permission, just tell me.
EDIT: I've also checked in the missing VS solution file.
PS: If you are finding more bugs and want MediaCoder's SVN write permission, just tell me.
EDIT: I've also checked in the missing VS solution file.
When things work together, things work.
This video_ts thing look strange. I think that the behaviour changed between versions of mplayer... I will double check what version of mplayer I use and what version comes with mc. (I know I had to find a version that didn't crashed on me for my Athlonx XP)...
In any case, I'm ok with getting svn access My Sourceforge unix account: ojacques (already maintening 2 sourceforge projects: http://sipp.sf.net/ and http://gull.sf.net/).
Thanks!
In any case, I'm ok with getting svn access My Sourceforge unix account: ojacques (already maintening 2 sourceforge projects: http://sipp.sf.net/ and http://gull.sf.net/).
Thanks!
Really? I mean for me, it "works", but in the console, I get error messages about libdvdread complaining. I think this has been reported by another user in this post: http://mediacoder.sourceforge.net/forum ... .php?t=545stanley wrote:I've applied the patch, except for the place where stripping "VIDEO_TS" string. In my place, with "VIDEO_TS" in -dvd-device just works.
Do you allow me to check that change on -dvd-device in?
Really? I mean for me, it "works", but in the console, I get error messages about libdvdread complaining. I think this has been reported by another user in this post: http://mediacoder.sourceforge.net/forum ... .php?t=545stanley wrote:I've applied the patch, except for the place where stripping "VIDEO_TS" string. In my place, with "VIDEO_TS" in -dvd-device just works.
Do you allow me to check that change on -dvd-device in?
Also, in SVN 342, I increased mplayer dialogs (pipe reading) max timeouts to 10s. This fixed all dvd reading problems I had.
Still something I'd like to take care of: in PSP plugin, the framerate is always set to 29.97. This is wrong as PSP can support 23.976 and 25fps too.