Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
Error while compling X264
Hi,
i am a newbee to the x264. i had successfully complied the H.264 on MSVS. JM 18.0 was fairly simple to build and work on. i now want to use the x264 in MSVS environment and later want to port the x264 code on a DSP platform and try my hands on it. i was following this post: http://mediaretriever.blogspot.fr/20...n-windows.html i currently have MSVS 2010. i have installed MinGW with base packages like mingw developer kit, GNU c++ complier and msys-base etc. i did not understand this part: Add the path to MingW/bin to system path. Where and how m i supposed to add this path? i later opened the msys.bat (windows batch file) and tried to put command: $ cd/work/x264 . But it gives error as 'no such file or directory found'. where am i going wrong? May be my questions and mistakes are extremely dumb but i desperately need to get started with this. ![]() Thanks. Regards, MD |
![]() |
![]() |
![]() |
#2 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Here is everything you need to know.
For x264 (or libx264) you need a C99 compliant compiler like GNU or Intel. VS2010 does not support C99.
__________________
Groucho's Avisynth Stuff |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
hi Groucho2004,
thanks for your prompt reply. i of course saw the post. i am trying it with (MSVS+MinGW+YASM). the MinGW already has the compilers for C99, i hope. and YASM should take care of the asm files in x264. what would i need to remove that error? or compile the x264 using MinGW? Regards. |
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
Thanks filler56789,
i have lots of entries there under the folder 'environment' with attributes: name, type and data; like windir, CLASSPATH etc. which entry do i need change/edit (or add) and what should be put under those attributes? Regards. |
![]() |
![]() |
![]() |
#6 | Link |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,448
|
^ There should already exist a REG_EXPAND_SZ string named "Path"
![]() ![]() Anyway --- as a generic and unrequested advice, one should always learn fist things first, and again IMHO, the "how-tos" of an operating system are "firster" ![]() ![]() Code:
http://en.wikipedia.org/wiki/Environment_variable#Microsoft_Windows Last edited by filler56789; 20th September 2013 at 00:51. |
![]() |
![]() |
![]() |
#7 | Link |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
hi filler56789,
Thanks for your post. i could now add the directory paths (;C:\MinGW\bin;C:\MinGW\msys\1.0\bin) in the PATH value data. but still the msys.bat is giving me the same error of file or directory not found. Does it mean that MinGW does not have the necessary complier? Actually, reason behind using MinGW is, i have been asked to use MinGW. Finally at the end of the project, i am supposed to run the x264 on some DSP processor. But my guide has a say that first i have to take the code and separate out all the platform based functions (those which do actual video processing) and system based functions(like fprintf etc.). so that it can be ported to a DSP platform by just using the libraries which have platform based stuff and removing/not including system dependent libraries. Well, i have a question, as X264 is so popular somebody must have put this code onto DSP platform. Can i not get such code and cut off this MSVS issues of separating platform and system dependency stuff? and work ahead on ME and prediction? And i am newbee so really don't what comes first. I did followed your advice and read the wiki page info u adviced. Regards. |
![]() |
![]() |
![]() |
#8 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Did you follow the instructions from the link I gave you in post #2?
__________________
Groucho's Avisynth Stuff |
|
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Aug 2008
Location: Minsk, Belarus
Posts: 235
|
Quote:
_ — space |
|
![]() |
![]() |
![]() |
#10 | Link |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
Hi Komisar,
Thanks for pointing out the mistake. The space thing worked! Now i can see the path in msys window. I was following Groucho2004's sugggestion from the scratch. i downloaded the your (Komisar's) GCC build: mingw-w64.gcc481.ml.20130604 and i followed steps till GPAC. But while installing Git, i got few errors which say that i don't have access to the registry. I am logged on as admin user only and i can set the permissions. But, i am not able to understand how to deal with this. Errors are:
However, i continued installation for Git with errors. i am not really sure where to write: git clone git://git.videolan.org/x264.git "C:/path/to/x264folder". i tried it in the initial commit window and committed but it says that i should add name and email. i am not sure where to put this: $ git config --global user.name "abc" $ git config --global user.email abc@example.com i tried it with initial commit window but seems that i am doing it wrong. However, instead of using getting the code using Git, i directly downloaded it from VideoLAN.[http://www.videolan.org/developers/x264.html] and extracted it to folder path: C:\X264. (i hope that won't create any issues.) Now i should be using the command Code:
./configure Code:
make fprofiled VIDS="/path/to/downloadedYUV/file" This is giving me error as shown in the image attached. Why the config.make and config.h error might be coming? have i done something wrong? |
![]() |
![]() |
![]() |
#11 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,448
|
While your attachment is not approved...
well, I have no idea of why the creators of GIT keep messing around with "installers" and unnecessary stuff. ![]() All a "normal user" needs is have the following files: Code:
getcp.exe git-receive-pack.exe git-upload-archive.exe git-upload-pack.exe git.exe gitk libiconv2.dll perllocal.pod Quote:
Last edited by filler56789; 26th September 2013 at 23:32. Reason: ... |
|
![]() |
![]() |
![]() |
#12 | Link | |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
Hi,
the image attached is of .jpg format and within 200KB only. Do i need fulfill any other criteria also for approval? or just it will take some time? However, i am reattaching the images. 'Rar'ed this time. Can i add these files directly in the GIT setup(somehow to make GIT work)? Quote:
The 'Clone' command would anyway be creating the only a copy of the code from the VideoLAN link, right? Can i skip the GIT part then? Or is there any solution to work with GIT? And, most importantly, how to get rid of the config.mak and config.h error? (Actually, i am more interested in getting the code complied than making the revisions of it through GIT.) Thanks. |
|
![]() |
![]() |
![]() |
#13 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,448
|
The yasm-related error message means what it says --- you've gotten an outdated and unsuitable version of yasm. Yes, the opening post of that Doom10's thread needs an overdue update, a mod or an admin should have done it already...
Quote:
( http://xhmikosr.1f0.de/tools/ OR http://xhmikosr.1f0.de/tools/old/ ), they already include an up-to-date yasm.exe. Decompress the downloaded archive, and then locate and edit the file "etc\fstab". IF it doesn't already exist, THEN create it ![]() Code:
#You can use a # as the first character on the line as a comment indicator. #Blank lines are ignored. #Win32_Path Mount_Point E:/GCC481/mingw /mingw E:/GCC481/at-home /home #fstab.sample #This is a sample file for /etc/fstab. #Currently /etc/fstab is only read during dll initialization. #I will eventually watch the directory for changes and reread the file. #The line format is simple in that you give the Win32 path, followed by one or #more space or tab delimiter, followed by the mount point. Mount points in #typical UNIX environments must be a physical name on a drive before it can #actually be used as a mount point. In this implementation the "must exist" #requirement isn't enforced, however, it will be an aide to such programs as #find and readline's tab completion if it does exist. Create the folder where you want to store the x264 source-code. Open a command prompt on that folder. Type and enter this command-line: git clone git://git.videolan.org/x264.git After the download is complete, type msys and press Enter. Change the working directory to "Path-To/x264". Now you can enter the command ./configure --help. If you don't want to change the default settings, or if you have no idea of what the non-default options mean, then you can go straight to ./configure. Wait, and finally, run the command "make fprofiled VIDS="/path/to/downloadedYUV/file". IF you would like a "full-featured" build, with all the bells and whistles ![]() ![]() Hope this helps. Last edited by filler56789; 27th September 2013 at 16:34. |
|
![]() |
![]() |
![]() |
#14 | Link | |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
Hi filler56789,
i am trying to follow your suggestions on another PC. i had fstab.sample file in my msys folder. It has: #Win32_Path Mount_Point c:/mingw /mingw c:/ActiveState/perl /perl (Hence, i am assuming that fstab is not equal to fstab.sample. I have Not deleted it. Please inform me if i am supposed to edit the fstab.sample only without creating a new one.) i had created a new fstab file and written in it as: #Win32_Path Mount_Point C:\MSYS\mingw /mingw C:\Users\Admin /home Here home should be what? i have used home path as per the path in 'Environmental Variable':HOME. Is it right? Or should it be where i shall be putting my X264 GIT files from VideoLAN?(C:/x264 in my case.) i have created a folder as C:/x264 for cloning the files from VideoLAN. Quote:
i have following values in PATH at registry editor: Code:
;C:\Program Files\Git\cmd;C:\Program Files\Git\bin;C:\X264;C:\MSYS\bin;C:\MSYS\mingw\bin While Cloning, i have got error(image attached) Fatal error: unable to connect to git.videolan.org i have a proxy server at my institute with a username, password authentication. So i think that might be issue. To overcome it i tried to add a new system variable with: Variable Name: http_proxy Variable Value: my_username:my_pass@10.1.101.150:3128 But nothing worked! ![]() i still have the same error and X264 folder empty. Can a extract X264 manually there and move ahead with further suggestions? My questions might be very naive. And i apologize for them. But i am really trying to figure out how to make this work ...and i won't stop till it works! i really appreciate help of all of you. Thanks! Regards, DM |
|
![]() |
![]() |
![]() |
#15 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
If you have trouble following the guide on Doom10 I pointed to in the second post you can try this thread which has a link to another guide in the first post.
|
![]() |
![]() |
![]() |
#16 | Link |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
Finally, i could create the X264.exe file!
Here's What i did(it might be useful for someone like me.): Got the package from Xhmikosr's site. Decompressed them and edited the fstab.sample. Wrote this: e.g. Code:
#Win32_Path Mount_Point C:/MSYS /msys C:/X264 /X264 Added the username and email to git using these links: https://help.github.com/articles/set...r-email-in-git https://help.github.com/articles/set...sername-in-git Code:
git config --global user.email "me@here.com" git config --global user.email git config --global user.name "my_name_here" git config --global user.name Code:
git clone git://git.videolan.org/x264.git (No proxy internet connection was used.) Then from the command prompt only, i opened the msys.bat file. Changed it's the path to C:/X264/X264 using Code:
$ cd /c/x264/x264 Code:
./configure Code:
make fprofiled VIDS="foreman_176x144_fps15op_300.yuv". The .exe is working. ![]() However, is it normal to have .exe of 2 MB only? And now, i want to give configuration parameters to encoder like what profile to be used while encoding etc. in the form of text file. (So that i change many parameters on-the-fly without changing them in code itself.) What changes would i need to do in code? Also if i am going edit this code which debugger should be used (so that i can see step-wise execution)? |
![]() |
![]() |
![]() |
#18 | Link |
Registered User
Join Date: Sep 2013
Location: Pune
Posts: 14
|
Alright!
About passing parameters through text file: I have seen H.264 before this, in that a configuration file is passed. e.g. encoder.cfg and no parameter is then taken from code, all are taken from default cfg file. But, in X264 all parameters are written in the code itself. So if i pass parameters from text file will it create any issue in execution? |
![]() |
![]() |
![]() |
#19 | Link |
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,262
|
Nope, in x264 the (user-configurable) parameters are not hardcoded, but taken from the command-line. Only the default parameters are written in the program code.
AFAIK, x264 itself does not provide a way to read the encoding parameters from a "configuration" file, but you can simply use a script/batch file to call x264 with the desired parameters in an automated way. This is more or less the same as using a "configuration" file...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 1st October 2013 at 15:57. |
![]() |
![]() |
![]() |
Tags |
mingw, x264 |
Thread Tools | Search this Thread |
Display Modes | |
|
|