Giter Club home page Giter Club logo

ffmpeg-ios's Introduction

FFmpeg-iOS

FFmpeg static libraries compiled for armv7, armv7s and x86_64 for use in iOS development.

Usage

Just drag the /dependencies/include and /dependencies/lib folders into your Xcode project and add them to your build target. If you want to, you can modify the build-ffmpeg.sh script to suit your needs and recompile.

Status

This most recent version has been tested with FFmpeg version 2.1.1 and version 7.0 of the iOS SDK.

Compilation

  1. Make sure you have the latest version of gas-preprocessor.pl installed into your PATH or you'll get some nasty linker errors.
  2. Check build-ffmpeg.sh to see if VERSION="X.X.X" is your desired FFmpeg version and SDKVERSION="Y.Y" matches your current iOS SDK version.
  3. To build normally: $ bash build-ffmpeg.sh
  4. To build for debugging: $ DEBUG=true bash build-ffmpeg.sh

License

FFmpeg is LGPLv2.1+ depending on how you compile it. This may affect your ability to distribute binaries on the App Store, especially if you don't release your source code to allow someone to re-link against newer versions of FFmpeg. Beware!

The license for this repository can be found in the LICENSE file parallel to this README.md.

ffmpeg-ios's People

Contributors

chrisballinger avatar jeffreywescott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg-ios's Issues

Video is rotating while conversion .

We are converting video using "ffmpeg" library , but after conversion video gets converted in landscape . I need to no change in orientation of video. I have done some R&D but only web side conversion solution is available. Please help me to correct orientation issue in objective c.

Support for FFPlay?

I'd like to use FFPlay for my video player. Any plans to include that in your build?

How do I convert a flac file to wav?

I just pulled this down through cocoapods, but the only way I know how to use FFMPEG is through something like ffmpeg -i inputfile.flac output.wav. I am trying to convert a flac file to wav, how can I do this? If there's not a simple answer to this, where in the code should I investigate?

Support Mac OS APP?

Does this FFmpeg-IOS support Mac OS APP? I want to develop an APP for Mac OS.

FFMpeg through FFmpegWrapper

I am using this library through this wrapper:

https://github.com/OpenWatch/FFmpegWrapper

However, I am getting the error:

[NULL @ 0x7fb59a012a00] Unable to find a suitable output format for '/Users/mytestuser/Library/Developer/CoreSimulator/Devices/E0F92C98-411C-4CEA-8FC9-CE8E33F0A222/data/Containers/Data/Application/069294B7-7D45-4760-B3B2-030649DDFE1A/Documents/video'
2015-08-17 17:30:34.400 TestProject[9671:309324] codec not found: h264

What can I do to fix the issue?
Remember that I installed it all through cocoapods.

Dynamic Libs?

Now that it is possible to bundle dynamic libraries with ios, would it be possible to build .dylibs instead of .a files? What would that involve/would it be better?

ERROR: librtmp not found

first of all thank you for these build scripted.

my goal was to compile a custom version of ffmpeg with your build scripts but im running into a small problem when compiling with the default settings which i dont quiet understand and was hoping you had a bit feedback or knowhow about this issue:

  • i cloned this repository and installed the latest version of gas-preprocessor.pl
  • i ran ./build-libssl.sh and ./build-librtmp.sh with success and am seeing libcrypto.a, librtmp.a and libssl.a in dependencies/lib and their corresponding header files in dependencies/include
  • then executing ./build-ffmpeg.sh results in the following output:
Downloading ffmpeg-2.2.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6860k  100 6860k    0     0  2518k      0  0:00:02  0:00:02 --:--:-- 2519k
Building without ccache
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
ERROR: librtmp not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] 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.

i can figure out why librtmp isn't found because it exists in dependencies/lib and the linker flags seem to be correct --extra-ldflags="... -L${OUTPUTDIR}/lib"

Crash while encoding audio frame

I am trying to generate an audio frame for slient audio.

/* frame containing input raw audio */
AVFrame *audio_frame = av_frame_alloc();
if (!audio_frame) {
    return NO;
}

audio_frame->nb_samples     = audio_out_stream->codec->frame_size;
audio_frame->format         = audio_out_stream->codec->sample_fmt;
audio_frame->channel_layout = audio_out_stream->codec->channel_layout;

/* the codec gives us the frame size, in samples,
 * we calculate the size of the samples buffer in bytes */
int buffer_size = av_samples_get_buffer_size(NULL,
                                             audio_out_stream->codec->channels,
                                             audio_out_stream->codec->frame_size,
                                             audio_out_stream->codec->sample_fmt, 0);
if (buffer_size < 0) {
    return NO;
}

uint16_t *samples = av_malloc(buffer_size);
memset(samples, 0, buffer_size);

/* setup the data pointers in the AVFrame */
if (avcodec_fill_audio_frame(audio_frame,
                             audio_out_stream->codec->channels,
                             audio_out_stream->codec->sample_fmt,
                             (const uint8_t*)samples, buffer_size, 0) < 0) {
    return NO;
}

/* encode a single tone sound */
    AVPacket packet;

    av_init_packet(&packet);
    packet.data = NULL; // packet data will be allocated by the encoder
    packet.size = 0;

    /* encode the samples */
    int got_output;
    if (avcodec_encode_audio2(audio_out_stream->codec, &packet, audio_frame, &got_output) < 0) {
        return NO;
    }
    if (got_output) {
        packet.pts = 30*numPacketsSent;
        numPacketsSent++;

        int res = av_write_frame(ofmt_ctx, &packet);
        if (res < 0) {
            return NO;
        }
    }
}
av_frame_free(&audio_frame);

And, I am getting crash in avcodec_encode_audio2 function.
Can you please let me know what's wrong here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.