I am trying to create an ImageRenderer for Exoplayer. I'm not sure how to start and am struggling to understand all of the components needed. My use case is I would like to have a playlist that could be a mix of hls and png url sources. I'm playing the Hls videos perfectly find but get 403 download errors with the pngs (as expected). I'm assuming I need a custom MediaSource and DataSource for the pngs as well? I'm getting really confused with possibly needing a custom MediaPeriod and SampleStream as well and it's one big jumble. I feel like this should be relatively simple to create the bitmap from the png stream and renderer it to a SurfaceView.
Related
I am using an imagewell to accept jpg images being pasted or dragged into my OSX app. The problme is that I am struggling to get the original jpg images as OSX seems to requires me to get the Tiff version of the NSImage if I want to uplod via Alamo Fire.
Does AlamoFireImage have a fancy way of getting the original url / original raw data without converting to Tiff first?
Actually, with an NSImageWell, you don't have much possibilities regarding the dropped image. It's a convenient class for showing dropped images but as soon as you need to do more, it's not up to the task.
I suggest you use an NSImageView instead, and add drag and drop capabilities to it like in my example here: https://stackoverflow.com/a/29233824/2227743
This way you can easily get the dropped image's URL (and filename), and the image data itself of course.
I am creating a video player app for android. for that i need to create thumbnails for the videos present in the videos folder.
After searching web i could able to understand unity's MovieTexture doesn't support for android. This one i could able to solve using a plugin.
For creating thumbnails i planned to create a canvas, and load GUI objects at runtime from prefab. create "GUI Raw Image" with images that would be the thumbnail image representing the video.
My hard luck, i came to understand GUI Raw Image is non trigger object. So changed to use GUI buttons instead of Raw Images.
But the issue, i am not able to attach image to my button prefab.
Can anyone help me.
Thanks in advance.
When using the new UI objects, as opposed to the Legacy GUI, you must have the image imported as Sprite/UI.
Unity Import Reference
I'm building an iOS app which requires me to allow the users to record a 15sec clip (with UIImagePickerController for example) and then convert it into an animated GIF. How could I achieve this? Is there any library/framework available for such task?
Thanks!
This gist code piece may help you.
https://gist.github.com/mayoff/4969104
It shows how to export frames into a gif image.
I don't believe there is any existing library that would do a straight conversion for you. There's a lot of libraries for displaying animated GIFs - far fewer native Objective-C libraries for creating them.
Fortunately, iOS does have support for saving as GIFs. There's an existing StackOverflow answer that covers how to create animated GIFs in-depth here:
Create and and export an animated gif via iOS?
...there's also a library on GitHub that abstracts the lower-level stuff away, although it's not been maintained for a while (link here).
All you'll need to do is create an array of the frames you want to convert into your GIF. I strongly recommend you don't try and convert every single frame in your 15 second video, if only because you'll end up with a very large GIF at a frame-rate that's too high. You would be better off picking every other, or even every 3/4 frames from your video sample. Capturing images from video is also pretty well documented on iOS.
I recently created a library called Regift for converting videos to gifs on iOS. Hopefully it will help anyone coming to this in the future :)
I am trying to make an app for ipad/iphone with a lot of animations.
There is anyway to make an app in objective-c with animations in other languages and interligate them???
because i have a lot of skills in languages like after effects/illustrator/flash/etc, for that, will be better to me to make the animations in that technologies..
Thanks
If you can export your animations into an HTML5 format, you can certainly display them in a UIWebView. There are a few Flash-to-HTML5 projects available out there now, and new apps like Hype and Purple that can be used to create HTML5 animations "from scratch."
The most simple way to do this is to create the videos in whatever tools and then export to a series of PNG images or use ffmpeg to convert flash or whatever to a series of images. Then display these PNG images one at a time (and don't load them all or you will use up all app memory). If you can deal with a more lossy format, then h.264 can save a lot of space at the cost of a significantly reduced 4:2:0 YUV type colorspace. If you need lossless video or require an alpha channel, or you want to save a lot of space as compared to the PNG method then you should take a look at AVAnimator. Note that you should not integrate any ffmpeg related code into your iOS due to license issues having to do with static linking of LGPL code.
I need to create a very short background animation for the entire iPhone screen. I am trying to figure out whether I should use a video or animate a series of PNG files.
Does anybody know the advantage of using video as an app background instead of the series of PNG files being animated inside UIImageView? I heard that video can be compressed to really small size and will look better that animated PNGs.
Thanks in advance.
I really don't think using a video rather than a series of PNG is a good idea. You'll make your life more complicated for a few kilobytes saved, if you even save any.
It is of course highly dependent on what exactly you are trying to animate, and where you try to save space. For example, if you try to save memory in the binary and if you have your PNGs (already well compressed format) in a zip that you unzip on the fly, most similarities will be factored out by the zip algorithm. If you're trying to save space in memory during the game itself (not in the binary), then this doesn't count. However, loading up the video library binaries has a serious chance to clutter your memory more than the few PNGs will.
This project does the job with JPG, it should be very easy to change that with PNG ;)