Giter Club home page Giter Club logo

kxmovie's People

Contributors

gardere avatar jahor avatar kolyvan avatar kristopherjohnson avatar monsieurdart avatar stephenlind 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  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

kxmovie's Issues

Lip sync

Hello, Kolyvan

How are you?
I played Mpeg-4 h.264 video using kxmovie video player.
When i tried it on iPhone, it works great.
But, when i tried it on iPad, lip sync was terribly out.
They didn't really match.
Do you have any ideas for it?
I need your help.

Best Regards.

Threading issue with mmsh network streams and buffering

Hi,

Found a strange issue with mmsh streams (for example mmsh://m.camstreams.com/csmaddrurs).
If buffer turns empty in tick() method then decoding speed drops by about 100 times until buffer filled to _minBufferedDuration.
By the way the _bufferedDuration is never compared to _minBufferedDuration if audio or video arrays contains at least one frame.
Looks like threading conflict between [KxMovieViewController tick] and [decoder decodeFrame] or queuing priority issue there.

The simplest workaround is to lower NETWORK_MIN_BUFFERED_DURATION to 0.02
but it's only a "dirty hack".

Problem with stream

Hi,

This stream don't play well (video speed + audio desync):

mmsh://stream2.canal.qc.ca/enOndes_haut_debit

It work with another lib based on FFmpeg 1.0 but i'm not sure problem come from FFmpeg version and i use your lib now (for some reasons)

Tested without deinterlace filter and buffer (as is WMV stream) with 5, 10sec, no change.

Any idea ? Thanks.

FFMpeg link error

Hello
I put "-all_load" in "Other linker flags" option in Build settings.
Unfortunately, i am getting the following link error.
Could you please tell me any ideas for it?

Undefined symbols for architecture i386:
"_av_abuffersink_params_alloc", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_av_buffersink_get_buffer_ref", referenced from:
_lavfi_read_packet in libavdevice.a(lavfi.o)
"_av_buffersink_params_alloc", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_get_by_name", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_graph_alloc", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_graph_config", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_graph_create_filter", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_graph_dump", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_graph_free", referenced from:
_lavfi_read_close in libavdevice.a(lavfi.o)
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_graph_parse", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_inout_free", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_link", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_register_all", referenced from:
_lavfi_read_header in libavdevice.a(lavfi.o)
"_avfilter_unref_buffer", referenced from:
_lavfi_read_packet in libavdevice.a(lavfi.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I need your help.
Best Regards.

yuvj420p stream cannot be viewed

I am trying to view the output of an Axis P5512-E Network Camera. It provides an RTSP H.264 output stream with yuvj420p format. This stream is viewable in VLC, QuickTime, and other multimedia viewers.

Unfortunately, it doesn't look like kxmovie supports the yuvj420p format. When I try to connect to that stream, the app simply displays the spinning wheel until the app eventually exits.

The KxMovieDecoder class contains this code:

- (BOOL) setupVideoFrameFormat: (KxVideoFrameFormat) format
{
    if (format == KxVideoFrameFormatYUV &&
        _videoCodecCtx &&
        _videoCodecCtx->pix_fmt == AV_PIX_FMT_YUV420P) {

        _videoFrameFormat = KxVideoFrameFormatYUV;
        return YES;
    }

    _videoFrameFormat = KxVideoFrameFormatRGB;
    return _videoFrameFormat == format;
}

This does not properly handle the case where format is KxVideoFormatYUV and _videoCodecCtr->pix_fmt is AV_PIX_FMT_YUVJ420P. It sets _videoFrameFormat to KxVideoFrameFormatRGB, and then -[KxMovieGLView initWithFrame:decoder:] creates a KxMovieGLRenderer_RGB.

I have hacked the code to force it to create a KxMovieGLRenderer_YUV, but I still see only a spinning wheel when I run the app, so I assume some changes to the renderer are needed to support yuvj420p.

An error when I try to connect to a rtsp://192.168.1.xx/ch00_0 like stream

When I run this program both on sim or my iPad2, the console tell me:

[h264 @ 0x9a88a00] Missing reference picture
[h264 @ 0x9a88a00] decode_slice_header error
[h264 @ 0x9a88a00] concealing 330 DC, 330 AC, 330 MV errors in P frame
[h264 @ 0x9a46a00] Width/height/bit depth/chroma idc changing with threads is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

How can I solve this problem?

Rake dosent work

hi when i run the rake, its says that the --disable armvfp command dosent exist

can you help me out :)
From terminal:
Unknown option "--disable-armvfp".
See ./configure --help for available options.
rake aborted!
******** Build failed ********

Close a stream

How can I close a failed stream? When we try to open a invalid stream, the decoder stuck, and is not allowed for us open other stream. When we try to open we I got this error:

"bind failed: Address already in use" and decoder returns with error: "Unable to open file"

There's no timeout. It waits until make a connection, and from there we can close the stream.

how to play live stream ?

I have one live stream, the player can not stop. If application resign active, the player is pause, so the player can not go on playing when application active again

rror loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn

When play mpegts, there is error log:

2013-01-18 13:21:31.534 YunMaoIos[35841:c07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
 in /System/Library/Frameworks/Security.framework/Versions/A/Security
2013-01-18 13:21:31.543 YunMaoIos[35841:c07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
 in /System/Library/Frameworks/Security.framework/Versions/A/Security
2013-01-18 13:21:31.561 YunMaoIos[35841:c07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
 in /System/Library/Frameworks/Security.framework/Versions/A/Security
2013-01-18 13:21:31.570 YunMaoIos[35841:c07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
 in /System/Library/Frameworks/Security.framework/Versions/A/Security

H264 lag

Great work.

I managed to have it working fine with flv, mov, mp4 and with f4v that not in your list. But feel lag for video with H264, tested with both remote and local H264, on iPhone 4 with iOS 6. Any clue? Thanks!

build error

Hi,wen i try to build,i got five errors:
Use of undeclared identifier AV_PIX_FMT_NONE
Use of undeclared identifier AV_CODEC_PROP_BITMAP_SUB
Use of undeclared identifier AV_PIX_FMT_YUV420P
No number name sub_charenc_mode in AVCodecContext
will some one have the same error ?

** BUILD FAILED ** with ios 5.1

Hi kolyvan , I modify the rakefile for ios5.1 and run rake


** BUILD FAILED **


The following build commands failed:
    CompileC tmp/build/kxmovie.build/Debug-iphoneos/kxmovie.build/Objects-normal/armv7/KxAudioManager.o kxmovie/KxAudioManager.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    CompileC tmp/build/kxmovie.build/Debug-iphoneos/kxmovie.build/Objects-normal/armv7/KxMovieDecoder.o kxmovie/KxMovieDecoder.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
rake aborted!
******** Build failed ********
/Users/me/iOS/kxmovie/Rakefile:8:in `system_or_exit'
/Users/me/iOS/kxmovie/Rakefile:192:in `block in <top (required)>'
Tasks: TOP => build_movie_debug
(See full trace by running task with --trace)

Stuttering playback with 1080i mpeg2ts file

Hi Konstantin,

I have been trying to get a file encoded in 1440x1080 playing on iPad2 / iPad3 / iPhone4 using your KxMoviePlayer, but no matter if it was local or streamed, the playback was stuttering.

I could not really figure out anything to make it work properly. It looks like it's almost maxing out the CPU use (I checked using Instruments profiling tools). Maybe there is a way to optimise this (either the decoder itself, or ffmpeg code, or else changing some compile time switches) to make it work, but I must admit I don't really know in which direction to investigate.

I was wondering if maybe you had an idea of what could be done in order to be able to play such files. I uploaded a sample file for you to have a look when you have a minute: http://www.sendspace.com/file/y1ioim

Best Regards,

Audio of local .wmv movie delayed and lagging after start

Hi Konstantin Boukreev,

Again, thank you very much for your great project!!!

I'm experiencing a considerable delay for the audio to start on a local .wmv movie. On the computer it plays nicely, but on my iPhone 4S, with iOS 6.0, after a delay to start the audio keeps lagging.

The same results happen when I scrub back or forward.

Could you please check this out? Here is the link for the video, so you can download it and try for yourself:

http://sdrv.ms/UQJPSu

Thank you!

audio are not correct

when I play a live video, the video is correct,but the audio is not correct and the log is:
[aac @ 0x99a2600] Reserved SBR extensions is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x99a2600] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
[aac @ 0x99a2600] Reserved SBR extensions is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

Psuedostreaming by bytes offset

First of all, thenk you for great tool.
I am wondering does pseudostreaming seeking by bytes supported in ffmpeg? In which way to investigate?
Thanks

Customization of KxMovieViewController

This is not really an "issue"; it's more of a Request for Comments for doing some re-architecting of the kxmovie library.

For an app I'm developing, I need to display video like KxMovieViewController does now, but I need some different functionality:

  • I want to remove the existing controls (HUDs, sliders, etc), because I am displaying a live video feed rather than one that can be fast-forwarded/rewound/etc.
  • I want to add some buttons that can be used to pan/tilt/zoom the camera.
  • I want to add some gesture recognizers

The quick-and-dirty way to do this would be to just copy KxMovieViewController and rip out the parts I don't need. However, I wonder whether anyone has given thought to a generic way to customize the viewer.

I'm thinking about creating some sort of "base video controller" that provides the basic functionality (setting up the GL view, decoding frames, pause, play, etc.), and then KxMovieViewController would be a subclass that had the controls, but other people could create other subclasses that have different controls but share the basic implementation.

Does this make sense? Does anyone have different ideas?

The player can not return back when decode video error

If the video is broken , the player is still loading, it can not stop and go back, even if I click done button.

 decode video error, skip packet
[h264 @ 0xa209600] AVC: nal size 423386319
[h264 @ 0xa209600] AVC: nal size 423386319
[h264 @ 0xa209600] no frame!

RTMP audio make noise

I can't play rtmp audio url "rtmp://129.186.60.79/live/Studio_One/StudioOne" or rtmp video "rtmp://ciena.fv.miisolutions.net/ciena/flash/LynneMilton_256l.flv". It make audio noise. Can anyone give me some advise!

Unable to build

Hi,

I've successfully built FFmpeg but I'm unable to build with XCode.

The error is:

~/path/to/kxmovie/kxmovie/KxMovieDecoder.m:1393:25: warning: 'avpicture_deinterlace' is deprecated [-Wdeprecated-declarations]
                        avpicture_deinterlace((AVPicture*)_videoFrame,
                        ^
ffmpeg/libavcodec/avcodec.h:4626:5: note: 'avpicture_deinterlace' declared here
int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,

The docs of avpicture_deinterlace say indeed that is deprecated and to use yadif (in libavfilter) instead.

Is this related to my FFmpeg version? Anyone know how to fix it? Also, I'm using Xcode 4.6.1

save buffer to file

is it possible to save the buffer after it has been fully downloaded to a file?
Very Thanks
P.S. Thanks for your last response.

README missing libiconv dependency

Small note I thought was worth adding. In addition to the already included install instructions, libiconv.dylib needs to be added as a dependency.

Problem with dealloc'ing and creating new instance of KxMovieViewController (threadsafe?)

2013-03-19 16:32:43.884 Example[44174:c07] <KxMovieViewController: 0xb459ae0> dealloc
[aac @ 0xab31600] Insufficient thread locking around avcodec_open/close()
[h264 @ 0xab18200] Insufficient thread locking around avcodec_open/close()
2013-03-19 16:32:47.413 Example[44174:c07] loadView
Assertion ff_avcodec_locked failed at libavcodec/utils.c:2750

Solution? I've used this commit 2948123

Seems I'm solved problem by adding in KxMovieDecoder.m

int lock_call_back(void ** mutex, enum AVLockOp op) {
    switch(op) {
        case AV_LOCK_CREATE:
            *mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
            pthread_mutex_init((pthread_mutex_t *)(*mutex), NULL);
            break;
        case AV_LOCK_OBTAIN:
            pthread_mutex_lock((pthread_mutex_t *)(*mutex));
            break;
        case AV_LOCK_RELEASE:
            pthread_mutex_unlock((pthread_mutex_t *)(*mutex));
            break;
        case AV_LOCK_DESTROY:
            pthread_mutex_destroy((pthread_mutex_t *)(*mutex));
            free(*mutex);
            break;
    }

   return 0;
}

in + (id)initialize()
av_lockmgr_register(&lock_call_back);

in - (void)dealloc()
av_lockmgr_register(NULL);

It's okay solution?

BUT I have problem with EXC_BAD_ACCESS (_videoFrame->interlaced_frame in - (BOOL) setupVideoFrameFormat: (KxVideoFrameFormat) format)

AND The code above (int lock_call_back(void ** mutex, enum AVLockOp op)) not working with latest commit 36c3f08

2013-03-19 18:55:24.658 Example[50975:c07] /Users/bezigon/Library/Application Support/iPhone Simulator/6.1/Applications/CD84470A-4EBE-48F4-A0A6-1F7623694AEC/Documents/50 Common Misconceptions - mental_floss on YouTube (Ep.1).mp4
2013-03-19 18:55:24.658 Example[50975:c07] <KxMovieViewController: 0xa510540> dealloc
2013-03-19 18:55:24.663 Example[50975:c07] <KxMovieDecoder: 0xa510040> dealloc
[NULL @ 0xd34d600] Insufficient thread locking around avcodec_open/close()
[NULL @ 0xd34de00] Insufficient thread locking around avcodec_open/close()
[NULL @ 0xd34d600] Insufficient thread locking around avcodec_open/close()
[NULL @ 0xd34de00] Insufficient thread locking around avcodec_open/close()
[NULL @ 0xd34d600] Insufficient thread locking around avcodec_open/close()
[NULL @ 0xd34de00] Insufficient thread locking around avcodec_open/close()
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '50 Common Misconceptions - mental_floss on YouTube (Ep.1).mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2013-03-09 20:30:31
Duration: 00:06:10.13, start: 0.000000, bitrate: 602 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), 640x360, 503 kb/s, 24 fps, 24 tbr, 48 tbn, 48 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, 2 channels, 95 kb/s
Metadata:
creation_time : 2013-03-09 20:30:32
handler_name : IsoMedia File Produced by Google, 5-11-2011
[NULL @ 0xd34d600] Insufficient thread locking around avcodec_open/close()
[NULL @ 0xd34de00] Insufficient thread locking around avcodec_open/close()
2013-03-19 18:55:24.665 Example[50975:c31b] Unable to open codec, 50 Common Misconceptions - mental_floss on YouTube (Ep.1).mp4
Assertion ff_avcodec_locked failed at libavcodec/utils.c:2750

Compilation Error

Hi ,

i have setup all the libraries and when i am building the app for device i got 30 compilation errors in KxMovieGLView and in KXMovieDecoder and i am posting some syntax errors here .. i am not sure which compiler should i use to compile the source code .. currently using default LLVM compiler 3.0 iOS SDK 5.0

Here are some errors

                    KxAudioFrame *frame = _audioFrames[0];

Error : subscript require size of interface "NSMutableArray" which is not constant in non-fragile ABI

_messageLabel.textAlignment = NSTextAlignmentCenter;

Error : Use of undeclared NSTextAlighnmentCenter;

and there are 30 errors .

Can you please help me solving the above issue or if i am using wrong source code please let me know .

Thanks

Link error

Hello kolyvan.
I am developing RTSP streaming player application using ffmpeg.
Your project is very similar with my idea.
But, when i build the application, i get the link error.

Ld /Users/wyp/Library/Developer/Xcode/DerivedData/kxmovie-dkcmadoxemowdgfmfnoqftidnwwm/Build/Products/Debug-iphonesimulator/KxMovieExample.app/KxMovieExample normal i386
cd /Users/wyp/Downloads/kxmovie-master
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
setenv PATH "/Volumes/MAC_DATA/develop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/MAC_DATA/develop/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Volumes/MAC_DATA/develop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Volumes/MAC_DATA/develop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/wyp/Library/Developer/Xcode/DerivedData/kxmovie-dkcmadoxemowdgfmfnoqftidnwwm/Build/Products/Debug-iphonesimulator -L/Users/wyp/Downloads/kxmovie-master/libs -L/Users/wyp/Downloads/kxmovie-master -F/Users/wyp/Library/Developer/Xcode/DerivedData/kxmovie-dkcmadoxemowdgfmfnoqftidnwwm/Build/Products/Debug-iphonesimulator -F/Volumes/MAC_DATA/develop/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/wyp/Library/Developer/Xcode/DerivedData/kxmovie-dkcmadoxemowdgfmfnoqftidnwwm/Build/Intermediates/kxmovie.build/Debug-iphonesimulator/KxMovieExample.build/Objects-normal/i386/KxMovieExample.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 -framework Foundation -framework UIKit -framework CoreGraphics -lz -lavcodec -lavdevice -lavformat -lavutil -lswresample -lswscale -framework MediaPlayer -framework CoreAudio -framework AudioToolbox -framework Accelerate -framework QuartzCore -framework OpenGLES -lkxmovie -o /Users/wyp/Library/Developer/Xcode/DerivedData/kxmovie-dkcmadoxemowdgfmfnoqftidnwwm/Build/Products/Debug-iphonesimulator/KxMovieExample.app/KxMovieExample

Undefined symbols for architecture i386:
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I hope you to help me.
Could you please tell me the issue?
Regards.

Build for iOS device failed, while simulator worked

 4U1K2FPDPW7 L 39Z8 FF8
I got this problem when build the KxmovieExample for iPhone4( ios6.1.2) and iPad2 (iOS 5.1.1), while the simulator worked well.
I follow the reame.md instruction to build it.
(1)get the source code by
git clone git://github.com/kolyvan/kxmovie.git
(2)and then
cd kxmovie
git submodule update --init
rake
the rake command succeed, but when I open the xCode project, build for the iOS device, the problem occurs.

memory leak ?

Hi, I profile my application when play mpegts stream , I fount that the memory is growing when I open player, so need to release player when close ?
KxMovieViewController *player = [KxMovieViewController movieViewControllerWithContentPath:path parameters:nil];
 2013-03-07 10 10 29

hello,My player no sound.

Can not play:mp3.wmv.m4a……..

LOG:
2013-01-24 15:14:43.235 KxMovieExample[7586:707] StayOpened: I make icecream sandwiches for everbody
2013-01-24 15:17:24.974 KxMovieExample[7586:707] AudioRoute: Speaker
2013-01-24 15:17:24.996 KxMovieExample[7586:707] AudioRoute: Speaker
2013-01-24 15:17:24.997 KxMovieExample[7586:707] We've got 1 output channels
2013-01-24 15:17:24.998 KxMovieExample[7586:707] Current sampling rate: 44100.000000
2013-01-24 15:17:25.000 KxMovieExample[7586:707] Current output volume: 1.000000
2013-01-24 15:17:25.001 KxMovieExample[7586:707] Current output bytes per sample: 4
2013-01-24 15:17:25.003 KxMovieExample[7586:707] Current output num channels: 2
[mp3 @ 0x1ebf3600] max_analyze_duration 5000000 reached at 5015510
[mp3 @ 0x1ebf3600] Could not find codec parameters for stream 0 (Audio: mp3, 44100 Hz, 2 channels, 128 kb/s): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mp3 @ 0x1ebf3600] Could not find codec parameters for stream 1 (Video: mjpeg): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
2013-01-24 15:17:25.132 KxMovieExample[7586:1e03] Unable to find stream information, 1.mp3
2013-01-24 15:17:25.133 KxMovieExample[7586:1e03] movie loaded
2013-01-24 15:17:25.134 KxMovieExample[7586:707] setMovieDecoder

How to get thumbnails from a video?

Following code is my implementation.

  • (UIImage *)thumbnailsOfVideo:(NSString *)filePath
    {
    KxMovieDecoder *decoder = [[KxMovieDecoder alloc] init];
    [decoder setupVideoFrameFormat:KxVideoFrameFormatRGB];

    NSError *error = nil;
    if ([decoder openFile:filePath error:&error]) {
    
        if (decoder.validVideo) {
            NSArray *videoFrames = [decoder decodeFrames:0]; // At begin of the video
            if (videoFrames.count > 0) {
                KxVideoFrameRGB *frame = [videoFrames objectAtIndex:0];
                UIImage *image = [frame asImage];
                onGotImage(image);
            }
        }
        [decoder closeFile];
        decoder = nil;
    }
    

    }

I have some problem now.

  1. How to get a thumbnail for a special position rather than begin?
  2. For some videos, above method failed and i got some error logs.
    "No accelerated colorspace conversion found from yuv420p to rgb24."

Any help is greatly appreciated@

Playing video from NSInputStream

Hi,

at first - grat job! kxmovie is amazing :)

I have a backend server that i connect via NSInputStream and NSOutputStream. When i send some controll msg via output stream, server start sending to me data (mp4 stream) via inpuput stream.

I have no idea how to connect ffmpeg with those data (NSInputStream), can You help?

FLV audio sync issue when streaming via TCP

Hi Kolyvan, this is a wonderful project. I'm no expert with ffmpeg so I'm not exactly sure what should be done to fix an audio/video sync issue I have when I try to play streamed content. It only happens when streamed, otherwise playing the FLV file locally presents no issues.

To reproduce the error, you can add
tcp://<your device's local IP>:<some port>/?listen
to the list of URLs in your KxMovieExample project.

Then, when you open that URL, you can do in your mac/linux machine via command line:
curl http://eric.cast.ro/stream2.flv | nc <your device's local IP> <some port>

The example FLV in my website illustrates very quickly the problem through a wrong lip sync. Requires curl and netcat installed, which can be obtained via MacPorts.

Or, if your device is jailbroken, you can execute the exact same command (but change nc to netcat) via SSH after installing those same command utilities via Cydia

Any help is greatly appreciated!

Error when I try to play a IP camera video via router

I try to play a IP camera video, my device and IP camera are both connected to the same router, then I closed the authentication of IP camera, and try to play the camera's video by address like "192.168.1.156", the video is played normally. However, when I try to make the IP camera accessible outside the router(mapping the ip 192.168.1.156 to the WAN by configure the router), and try to play the camera video by the corresponding WAN address and mapping port through KxMovieExample, such error occurs:
QQ20130416-1
and neither the simulator nor the device play anything.
Then I try to play the IP camera video by WAN address via VLC, it worked.
what should I do to solve the problem?

link error

There is an error when I'm linking kxmovie with
ffmpeg1.1.3(from http://ffmpeg.org/releases/ffmpeg-1.1.3.tar.gz)
xcode4.6, iOS6.1 SDK

Anyone has the same problem?

anyway, kxmovie is a great project for study video player programming, thanks.


Ld /Users/gdier/Library/Developer/Xcode/DerivedData/kxmovie-bwjlvssbuxmvekeokeoevpsoyjwj/Build/Products/Debug-iphoneos/KxMovieExample.app/KxMovieExample normal armv7
cd /Users/gdier/code/kxmovie
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/gdier/Library/Developer/Xcode/DerivedData/kxmovie-bwjlvssbuxmvekeokeoevpsoyjwj/Build/Products/Debug-iphoneos -L/Users/gdier/code/kxmovie/libs -F/Users/gdier/Library/Developer/Xcode/DerivedData/kxmovie-bwjlvssbuxmvekeokeoevpsoyjwj/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/gdier/Library/Developer/Xcode/DerivedData/kxmovie-bwjlvssbuxmvekeokeoevpsoyjwj/Build/Intermediates/kxmovie.build/Debug-iphoneos/KxMovieExample.build/Objects-normal/armv7/KxMovieExample.LinkFileList -dead_strip -ObjC -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=5.1 -framework OpenGLES -framework QuartzCore -framework Accelerate -framework AudioToolbox -framework CoreAudio -framework MediaPlayer -framework CoreGraphics -framework Foundation -framework UIKit -lz -lavcodec -lavformat -lavutil -lswresample -lswscale -o /Users/gdier/Library/Developer/Xcode/DerivedData/kxmovie-bwjlvssbuxmvekeokeoevpsoyjwj/Build/Products/Debug-iphoneos/KxMovieExample.app/KxMovieExample

ld: in /Users/gdier/code/kxmovie/libs/libavcodec.a(fft_fixed_neon.o), in section __TEXT,__text reloc 4: R_ABS reloc but no absolute symbol at target address for architecture armv7

avpicture_deinterlace is deprecated

I have this warning in KxMovieDecoder and it's causing a problem in loading film process can you help please

the problem is : when video start streaming sometimes it loads the audio before the video so I used to rotate the device in order to see the video again

Can I copy kxmovie folder to my project ?

When I modify some UI for kxmovie player, I need to run rake build_movie and copy the output folder, that is a little troublesome.

Can I modify the kxmovie code in my project and it will be built by xcode automatically ?

Lag in video files when forward and rewind the movie

Hi Kostantin

Thank you very much for this amazing project.

Every file that I play in project works fine. But I have a problem when I move the uislider left or right. In this cases I see in the console these messages:

[ac3 @ 0x1fa9d000] frame sync error
decode audio error, skip packet

or in other case this messages:

desync audio (lags) skip 1415.2881 1413.0240
desync audio (lags) skip 1415.2881 1413.0560

How I can solve this problem?, if it is possible. ;)

Pd. I forgot that I use for testing iPad 3 and iPhone 5

Thank you,

Error while building when kxmovie is added to my project

Hi,

I am using Xcode Version 4.6 (4H127), iOS SDK 6.1 deploying target 6.0 and I was able to build kxmovie and its example after some trouble. I have included kxmovie library from output folder and ffmpeg libs from libs one and needed frameworks aswel to my own project but the build fails with the following errors (same errors on iPhone and simulator either):

Screen Shot 2013-04-12 at 15 36 16

I am adding the same code (test purpose at this moment) as in the example

Screen Shot 2013-04-12 at 15 51 48

Screen Shot 2013-04-12 at 16 01 03

I am relatively a newbie programming in iOS and I have been not able to solve this problem yet. I have tried to replace ffmpeg libs with others built directly from ffmpeg source code but it didn't work neither.

Thank you in advance

Can I make kxmovie compatible with ios 5.0?

Hi kolyvan,

I noticed that at least ios 5.1 required for kxmovie. so can i make it work on ios 5.0 devices?
what is the limitation if supporting ios 5.0 devices?

Thanks in advance.

Can't recover after UIApplicationWillResignActiveNotification

Example on how to simulate the issue:

Run KxMovieExample, start playback of a stream, lock the device by pressing the top button, unlock the device. Now the movie won't play anymore (except for what was already in buffer), and if the screen is dismissed, there will be a crash.

Last NSLog messages:
2013-04-21 22:00:30.774 KxMovieExample[5028:907] pause movie
2013-04-21 22:00:30.775 KxMovieExample[5028:907] applicationWillResignActive
2013-04-21 22:00:30.776 KxMovieExample[5028:907] applicationDidEnterBackground
2013-04-21 22:00:42.731 KxMovieExample[5028:907] viewWillDisappear KxMovieViewController: 0x2103edb0
2013-04-21 22:00:43.151 KxMovieExample[5028:907] KxMovieViewController: 0x2103edb0- dealloc
2013-04-21 22:00:43.161 KxMovieExample[5028:907] KxMovieDecoder: 0x2103efd0 dealloc

In this test, a SIGPIPE is raised inside KxMovieDecoder dealloc > closeFile > avformat_close_input(&_formatCtx)

Ideas?

Audio spectrum

I'm using your example to stream audio and it worked. Is there a way to display audio spectrum instead static image? Thanks in advance.

build failed

Hi, I got these error when build kxmovie:

Executing cd ffmpeg; ./configure --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --disable-doc --disable-bzlib --target-os=darwin --enable-cross-compile --enable-gpl --enable-version3 --arch=arm --cpu=cortex-a8 --enable-pic --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7' --extra-cflags='-mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad' --enable-neon --enable-optimizations --disable-debug --disable-armv5te --disable-armv6 --disable-armv6t2 --enable-small --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is unable to create an executable file.
C compiler test failed.


mac os x lion 10.7.5
xcode 4.6.1

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.