chrisballinger / ffmpeg-ios Goto Github PK
View Code? Open in Web Editor NEWFFmpeg static libraries compiled for iOS
License: Other
FFmpeg static libraries compiled for iOS
License: Other
Hi, is this build support RTSP on iOS8 ? Thanks.
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?
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?
ffmpeg -i http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_50mb.mp4 -ss 00:01:08 -t 00:01:18 -async 1 cut.mp4
Hello,
The above command seems to do what I need (trim a remote video file and save the results locally).
I need to do this on my iPhone but I could not use the library. The documentation is very obscure.
Can anyone help me?
Thanks
I want to convert an hls to mp4. But I don't know the function in C that is need for my task.
Thannks in advance!
I'd like to use FFPlay for my video player. Any plans to include that in your build?
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.
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:
./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
./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"
@jeffreywescott @chrisballinger Hi , i did audio recorder in .m4a format but here, i need to send server in .mp3 or .wav format ??
thanking you
When I try to use it with https it logs the following error message.
https protocol not found, recompile FFmpeg with openssl, gnutls, or securetransport enabled.
This is a dead project; I doubt it worked for anyone.
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.
cocoapods, I was wondering why I download the repository, and "pod package", the *.a files are not included in the framework
Does this FFmpeg-IOS support Mac OS APP? I want to develop an APP for Mac OS.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.