2

I am playing around with the Vitamio demo, and like what I see. However, I need to slightly customise the ffmpeg source code (modifying http.c so the default is set for http streams to be non-seekable). I have followed the steps HERE in order to rebuild libffmpeg.so. All compiled fine, so far, so good...

However, I don't see where libffmpeg.so resides in the Vitamio bundle. I see a library called libarm.so. Does it live inside here? If so, how does one go about repacking it with the modified libffmpeg.so included?

Thanks

Dan

Toseef Khilji
  • 17,192
  • 12
  • 80
  • 121
Dan Turner
  • 171
  • 1
  • 11

3 Answers3

3

libarm.so you see in a raw folder is actually a 7z with folders in it. Folders correspond to:

  • 60 - armv6
  • 61 - armv6 with vfp support
  • 70 - arm v7 with vfpv3-D16
  • 71 - arm v7 with neon optimizations

Vitamio will unpack the one that matches your system at runtime and will use it.

You have to change libffmpeg.so in each of these folders and compress it again.

EvilDuck
  • 4,386
  • 23
  • 32
  • Have you successfully repacked Vitamio yourself? I have been trying it, but my new libarm.so just crashes Vitamio out with a FATAL SIGNAL 11 (SIGSEGV) error each time. This is using the Vitamio demo code, with no modifications. When I put the original libarm.so file in, it works fine. I compiled the libffmpeg.so files with NDK-r8c and used the ffmpeg version marked in the FFmpeg-Android github project. Any ideas? – Dan Turner Feb 19 '13 at 14:42
  • I have, but I had different error. I need to strip binaries from all codecs/protocols/demuxers my application doesn't need to reduce the code size. My problem is I am not ffmpeg expert and I am not sure what exactly I need to leave so error was that I was missing requred codecs for my stream. Actually I am still experimenting on this and will try more this week. I will let you know if I have more results. – EvilDuck Feb 20 '13 at 07:26
  • Also, just to make sure are you using the exact revision of ffmpeg they do? There is a file with commit ID. I believe .sh script they provide always pulls the latest code of ffmpeg, while they are using commit from July – EvilDuck Feb 20 '13 at 07:27
2

Author of Vitamio updated FFMpeg-Android project and write "How to" article http://www.vitamio.org/en/2013/Tutorial_0509/13.html

Since this update, all works fine.

Max_xt
  • 96
  • 1
  • 6
  • the linked page has moved to http://www.vitamio.org/en/2013/Tutorial_0509/13.html . the original url is no longer available – k3b May 15 '13 at 10:06
0

Maybe I should check that I'm doing that right. Firstly I download ffmpeg source like so:

git clone git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

I then:

cd ffmpeg

...and lastly:

git checkout 5e99df019a850e9ffa96d73e72b8a47a93a61de8 

The 'version' file in the ffmpeg folder now reads as '0.11.1', which I assume is right?

The individual libffmpeg.so files all build without an issue. I then copy these into the folders you described and repack them as libarm.so using 7z command line. I am using NDK r8c for the builds. No matter what I do, I keep getting this irritating crash on both my device and the emulator. On occasion it works, but very rarely. I have tried hundreds of different things now, and it's driving me absolutely mad :)

Dan Turner
  • 171
  • 1
  • 11
  • You also need to apply patch they have for ffmpeg manually. You can see it is being executed in their sh only in branch when they are pulling ffmpeg, but not if you have done it manually. – EvilDuck Feb 21 '13 at 08:49
  • I've been doing that too. Hmmmm, I guess this is destined to never work. – Dan Turner Feb 21 '13 at 09:02
  • I'm also planning to ask them on their forum. They seem to be quite responsive. – EvilDuck Feb 21 '13 at 13:30
  • I suspect the code on Github is not the one they used to make VitamioBundle, they commited libarm.so 4 months ago whereas FFmpeg-android was updated 7 months ago. ffmpeg might be outdated, it's changing every day. – Romain Piel Feb 28 '13 at 17:12
  • I had that thought. I tried all versions in release/0.11 branch up to latest. No luck. Tried 1.0, but it failed to compile. I will investigate further. I am curious if it's possible to pick the libffmpeg so they provide in libarm.so and add it to my c program to extract version. But so far I have failed to find required API method. – EvilDuck Feb 28 '13 at 20:47
  • I suspect that you are right. Nothing I do seems to work on this – Dan Turner Feb 28 '13 at 20:47
  • avcodec_version: 54.41.100, avformat_version: 54.17.100 avutil_version: 51.65.100, swscale_version: 2.1.100. This matches versions of the 5e99df019a850e9ffa96d73e72b8a47a93a61de8 commit. I am really confused now. I have tried all ndk/gcc versions on this one. No luck. I'm desperate now. – EvilDuck Mar 01 '13 at 19:30
  • I chatted to Cedric Fung, one of the Vitamio developers. He suggested using Android NDK R8b to compile. Apparently other revisions don't work. I recall trying this a while ago without success, but maybe it'll work for you. Let us know, please! – Dan Turner Mar 01 '13 at 21:34
  • Yay! They have updated VitamioBundle and now it works for me with r8b – EvilDuck Mar 25 '13 at 18:35