Build VLC for iOS

macOS specific usage questions
imvic
New Cone
New Cone
Posts: 1
Joined: 06 Oct 2011 16:30

Build VLC for iOS

Postby imvic » 11 Oct 2011 07:35

Thanks to xinaction for providing me below procedure to build VLC for iOS.
There are some modification according the failure during my building process.

http://download.videolan.org/pub/videol ... OS.tar.bz2
http://download.videolan.org/pub/videol ... -1.1.0.zip
http://download.videolan.org/pub/videol ... 1.0.tar.gz

To VLC compile
To work with VLC source directory contents. Vlc is named and a link.
$ tar jxvf VLC-1.1.0-iOS.tar.bz2
$ ln -s VLC-1.1.0-iOS vlc
$ cd vlc/extras/package/ios
modified version of the SDK is open build_for_iOS.sh. The latest version is currently 4.2.sdk.
IOS_SDK_ROOT = "$ {DEVROOT}/SDKs/ iPhone $ {PLATFORM} 3.2.sdk"
When you compile and run build_for_iOS.sh error tore in the middle of the stop.
It's the version of the patch file problems by reference lines 161 to 185 of
../../contrib/src-arm-apple-darwin10-ios/src/Patches/live-inet_ntop.patch
../../contrib/src-arm-apple-darwin10-ios/src/live/liveMedia/RTSPServer.cpp can be modified directly.
our_inet_ntoa () buf as the second argument is as simple as adding.
I Just remove line 161 to 185 from ../../contrib/src-arm-apple-darwin10-ios/src/Patches/live-inet_ntop.patch
Now, to compile and run build_for_iOS.sh.


Once vlc/install-ios-OS in the headers which will generate a library.
And to build a static plugins MobileVLCKit.
$ Cd vlc/projects/macosx/framework
$ Xcodebuild -project MobileVLCKit.xcodeproj -target "Aggregate static plugins" -configuration "Release"
MobileVLCKit the latest version of the MobileVLCKit modified version of the SDK, and will build.
$ Open MobileVLCKit.xcodeproj
fix Targets / MobileVLCKit - Get Info / Build
Configuration: All Configurations
Architectures / Base SDK: Latest iOS
$ Xcodebuild -project MobileVLCKit.xcodeproj -target "MobileVLCKit" -configuration "Release"

To MediaLibraryKit compile
Working Directory (VLC-1.1.0-iOS such as location), create a directory to extract the MediaLibraryKit.
$ Mkdir MediaLibraryKit & & cd MediaLibraryKit
$ Unzip MediaLibraryKit-1.1.0.zip
External MobileVLCKit Creates a link to the directory where you go.
$ Ln -s ../../vlc/projects/macosx/framework/build/Release-iphoneos MobileVLCKit
what I did -
$ cd external
$ ln -s ../../../vlc/projects/macosx/framework/build/Release-iphoneos MobileVLCKit
(After doing this, the external in MobileMediaLibraryKit.xcodeproj should not be red anymore.)


MediaLibraryKit to the latest version of the SDK version to modify and build.
$ Open MobileMediaLibraryKit.xcodeproj
fix Targets / MobileMediaLibraryKit - Get Info / Build
Configuration: All Configurations
Architectures / Base SDK: Latest iOS
$ Xcodebuild -project MobileMediaLibraryKit.xcodeproj -configuration "Release"

To MobileVLC compile
Working Directory (VLC-1.1.0-iOS such as location) to extract the MobileVLC.
$ Tar zxvf MobileVLC-1.1.0.tar.gz
$ Cd MobileVLC
External links at the bottom of MobileVLCKit MediaLibraryKit and make sure it is properly.
What I did
$ cd external
$ ln -s ../../../vlc/projects/macosx/framework/build/Release-iphoneos MobileVLCKit
(After doing this, the external in MobileVLC.xcodeproj should not be red anymore.)


MobileVLC to the latest version of the SDK version to modify and build.
$ Open MobileVLC.xcodeproj
fix Targets / MobileVLC - Get Info / Build
Configuration: All Configurations
Architectures / Architectures: Standard (armv6 armv7)
Architectures / Base SDK: Latest iOS
build with Device-Release configurations

Above are to build a library for iDevice.
Plz run below if u want to build for simulator.
$ build_for_iOS.sh -s

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Build VLC for iOS

Postby Jean-Baptiste Kempf » 12 Oct 2011 00:09

Now, please do the same for VLC 1.2.0-git :D please!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

K-Fung
Blank Cone
Blank Cone
Posts: 20
Joined: 26 Oct 2011 19:58

Re: Build VLC for iOS

Postby K-Fung » 26 Oct 2011 20:00

Using 1 processors
cp config.mak src-arm-apple-darwin10-ios/src/../config.mak
ln -sf ../../src/Patches src-arm-apple-darwin10-ios/src
ln -sf ../../src/packages.mak src-arm-apple-darwin10-ios/src
ln -sf ../../src/Makefile src-arm-apple-darwin10-ios/src/Makefile
make -C src-arm-apple-darwin10-ios/src
(cd ffmpeg; CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" CXX="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2" LD="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld" RANLIB="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib" AR="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar" STRIP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip" ./configure --prefix=/Users/KFung/Desktop/VLC/vlc/extras/contrib/hosts/arm-apple-darwin10/ios --extra-cflags="--std=gnu99 -DHAVE_STDINT_H" --extra-ldflags="-L/Users/KFung/Desktop/VLC/vlc/extras/contrib/hosts/arm-apple-darwin10/ios/lib -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib -arch armv7" --enable-cross-compile --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 --arch=arm --disable-debug --enable-gpl --enable-postproc --disable-ffprobe --disable-ffserver --disable-ffmpeg --disable-ffplay --disable-devices --disable-protocols --disable-avfilter --disable-network --target-os=darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --disable-runtime-cpudetect --enable-neon --cpu=cortex-a8 --disable-shared --enable-static && make -j1 && make install-libs install-headers)
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
make[1]: *** [.ffmpeg] Error 1
make: *** [using-src] Error 2


I failed to compile in the first step. Please help me.

xinaction
Blank Cone
Blank Cone
Posts: 16
Joined: 20 Sep 2011 10:02

Re: Build VLC for iOS

Postby xinaction » 25 Nov 2011 06:05

you should look at the "config.log" in the ffmpeg folder.

olleg
New Cone
New Cone
Posts: 1
Joined: 27 Nov 2011 10:24

Re: Build VLC for iOS

Postby olleg » 27 Nov 2011 10:51

I haven't tried this way that was suggested in this thread. I will do it tomorrow.

Mac OS: 10.7.2
IDE: Xcode 4.2

I didn't have gcc-4.2 and g++-4.2 in iOS dev tools path, so I create hard links to llvm-g*.

But I was trying to build HEAD from GiT. builMobileVLC.sh didn't worked, but I was able to build some libs with just configure & make. After changing make files, fixing some patches, configuring manually libdvbpsi...

So finally I thought I have all libraries built in vlc (maybe I am wrong, not able to verify it). It's strange but extras/package/ios/build.sh is finishing his work with "Nothing to do", but this don't let buildMobileVLC.sh finish his work. Anyway when I tried to build projects I got new problems. I was not able to build MobileVLCkit because of the vlc-plugins.h, I guess it's because of LLVM compiler? I never see such C definitions as this script is generating, but I am not an expert. After that I was not able to continue...

Do you, guys, plan to support VLC for iOS on modern platforms? Is anyone interested to cooperate and bring back support?

Let me know, any feedback is highly appreciated!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Build VLC for iOS

Postby Jean-Baptiste Kempf » 27 Nov 2011 20:54

Do you, guys, plan to support VLC for iOS on modern platforms? Is anyone interested to cooperate and bring back support?
That would be Amazing!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

piyush123
New Cone
New Cone
Posts: 2
Joined: 30 Nov 2011 08:18

Re: Build VLC for iOS

Postby piyush123 » 30 Nov 2011 08:46

kartiks-Mac-mini-2:MobileVLC elegantmicroweb$ ./buildMobileVLC.sh
[info] Preparing build dirs
[info] Building
[info] Building vlc
[info] Building libvlc for the iOS
[info] Using armv7 with SDK version 5.0
[info] Building contrib for iOS in '/Users/elegantmicroweb/Desktop/MobileVLC/ImportedSources/vlc/contrib-builddir-ios-arm-apple-darwin10'
WARNING: This method of building third party libraries has been deprecated,
and is not supported anymore.

Building from the /contrib folder is recommended instead of /extras/contrib.
make[1]: *** [.ffmpeg] Error 1
make: *** [using-src] Error 2
kartiks-Mac-mini-2:MobileVLC elegantmicroweb$



Oh god get me out from this.....Pllleaasseeeeee

xinaction
Blank Cone
Blank Cone
Posts: 16
Joined: 20 Sep 2011 10:02

Re: Build VLC for iOS

Postby xinaction » 09 Dec 2011 01:40

you should look at the "config.log" in the ffmpeg folder.
focus on ffmpeg

Selvaraj
New Cone
New Cone
Posts: 1
Joined: 16 Dec 2011 13:35

Re: Build VLC for iOS

Postby Selvaraj » 16 Dec 2011 13:40

Hi, I am new to this forum. I am also having the similar doubt regarding the above topic I had search it on a number of site and I had got some helpful Information from this forumhttp://forums.techarena.in/windows-software/1445186.htm. My it might help you also.

dna2
New Cone
New Cone
Posts: 2
Joined: 30 Dec 2011 10:18

Re: Build VLC for iOS

Postby dna2 » 30 Dec 2011 10:24

Hi, I got the same error, and config.log in ffmpeg was reporting "C Compiler Test Failed".

I've changed extras/contrib/bootstrap

Code: Select all

ios) EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -isysroot ${IOS_SDK_ROOT}" if test -z "$IOS_SDK_ROOT"; then
I've also changed in extras/package/ios/build.sh these two lines:

Code: Select all

export CXX="${DEVROOT}/usr/bin/llvm-g++-4.2" export CC="${DEVROOT}/usr/bin/llvm-gcc-4.2"
I'm facing now other issues (see below) but it's a start...

Code: Select all

error: invalid operand in inline asm: 'ldr ${0:Q}, $1 ldr ${0:R}, $2 ' make[2]: *** [libavformat/asfcrypt.o] Error 1 make[1]: *** [.ffmpeg] Error 2 make: *** [using-src] Error 2
Kind Regards,
Danilo
Last edited by dna2 on 30 Dec 2011 14:58, edited 2 times in total.

dna2
New Cone
New Cone
Posts: 2
Joined: 30 Dec 2011 10:18

Re: Build VLC for iOS

Postby dna2 » 30 Dec 2011 11:58

About the inline ASM issue, I found it's again related with the new LLVM compiler.

I've tried to disable INLINE ASM (it's a fast and dirty trick just to get to the end of compile) by
changing in "extras/contrib/src/contrib-src.mak" and adding to "FFMPEGCONF" parameter --disable-asm

This road lead to a new error:

Code: Select all

ranlib: archive member: libavcodec/libavcodec.a(mpegaudiodata.o) cputype (16777223) does not match previous archive members cputype (12) (all members must match) make[2]: *** [libavcodec/libavcodec.a] Error 1 make[1]: *** [.ffmpeg] Error 2
:cry:

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Build VLC for iOS

Postby CrapulaX » 23 Jan 2012 23:53

Thanks to this forum, I do have now a VLC (based on 1.1) application running on my iPhone (ios 5).

The application runs and is able to scan the directory for content but then crashes after selection of a content.

The error msg is similar with mp3 mp4 avi files:

Code: Select all

vlc: unknown option or missing mandatory argument `--ffmpeg-skiploopfilter=all' Try `vlc --help' for more information. 2012-01-23 23:30:35.044 VLC[9761:707] *** Assertion failure in -[VLCLibrary init], /Users/crapulax/Documents/.../VLC-1.1.0-iOS/projects/macosx/framework/Sources/VLCLibrary.m:91

gnurg
New Cone
New Cone
Posts: 1
Joined: 07 Feb 2012 23:53

Re: Build VLC for iOS

Postby gnurg » 08 Feb 2012 00:07

Hi CrapulaX,
I had a semi-success with the compilation just a few days ago, but I am now trying it again and the script is failing quite soon, while trying to build vlc, with the error:

Code: Select all

[info] Using armv7 with SDK version 5.0 ./build.sh: line 21: pushd: <path>/MobileVLC/ImportedSources/vlc/extras/contrib: No such file or directory
(of course <path> is something I put now in this post to indicate the full path where MobileVLC is. It is not the "real" output).

The problem seems to be that the "contrib" folder is really missing from "vlc/extras:".
I tried the manual git of vlc and I actually verified that this is the case (no contrib folder).

Is it something that is changed recently in vlc (latest few weeks) or something I am doing differently/wrong (but cannot see what honestly).
Who should create the contrib folder in extras?

Thanks

mikepark
New Cone
New Cone
Posts: 1
Joined: 06 Mar 2012 21:31

Re: Build VLC for iOS

Postby mikepark » 06 Mar 2012 21:34

gnurg,

Did you ever figure out your issue with the missing "contrib" folder? I'm seeing the same issue.

Thanks

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Build VLC for iOS

Postby CrapulaX » 09 Mar 2012 17:24

To mikepark & gnurg,
I made a fresh clone this morning and I do have the same problem...

If you browse the history git, you can see that this directory has been removed in the beginning of February.

I spent some time this afternoon without luck trying to rebuild those tools.

I do have now a vlc (2.0 based) running on iOS 5.0 (using a git clone around the end of January) with ffmpeg and libdvbpsi, what i did to achieve this :
- fix some minor problems in some build scripts
- fix the audio output (minor correction in AudioQueueCallback function in modules/audio_output/audioqueue.c)
- fix the video output (some Open GL ES calls used seem not to be supported on iOS)
- update the way all the modules are statically aggregated to comply with 2.0 way

I just tried to build for device and not for simulator.

Obvsiously, i want to share my modifications with anyone interested.

sandbar
New Cone
New Cone
Posts: 1
Joined: 10 Mar 2012 19:24

Re: Build VLC for iOS

Postby sandbar » 10 Mar 2012 19:33

Please tell me how did you buld it for 5.0 I want to build it for 5.1 with xcode 4.3.1
Cheers

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Build VLC for iOS

Postby fkuehne » 12 Mar 2012 17:15

At present, VLC 2.0 does not compile on iOS, because our new contrib system does not support iOS yet. We are working on it, but are not done yet. MobileVLC itself will compile for iOS just fine.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

pawlowski
New Cone
New Cone
Posts: 2
Joined: 19 Jan 2012 02:06
VLC version: 2.0.0
Operating System: Mac OS X
Location: Ukraine

Re: Build VLC for iOS

Postby pawlowski » 12 Mar 2012 23:13

At present, VLC 2.0 does not compile on iOS, because our new contrib system does not support iOS yet. We are working on it, but are not done yet. MobileVLC itself will compile for iOS just fine.
Is there some way I can look at your workings? I would like to help.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Build VLC for iOS

Postby Jean-Baptiste Kempf » 12 Mar 2012 23:59

Come on IRC.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 29 guests