How do I Inform UPNP to rotate video playback? - upnp

With UPNP I'm requesting a renderer to play a video, but I need to have the video rotated.
I've looked into metadata, and into the docs, and I've seen how to see what orientations are supported in the device, but I can't figure out how to tell it to rotate the video.
To play the video, I'm posting a SOAPACTION with these parameters:
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:Seek xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<Unit>REL_TIME</Unit>
<Target>00:00:00</Target>
</u:Seek>
</s:Body>
</s:Envelope>
Any suggestions?

This is not supported. You need to decode, rotate and stream video data.

Related

Pull Single Frame from Video Feed (DJI Mobile SDK)

I am making a DJI Mobile SDK app and have setup an application that gets live video from the drone and displays it in a view, but I need to pull a single frame from the video feed to work with and cannot figure out how to do it!
One method would be to take a picture with the drone and then download it from the SD card, but I do not require the full resolution image and it feels like there must be a simple method to just get a single frame from the video preview.
The code which casts the video stream is:
-(void)videoFeed:(DJIVideoFeed *)videoFeed didUpdateVideoData:(NSData *)videoData {
[[DJIVideoPreviewer instance] push:(uint8_t *)videoData.bytes length:(int)videoData.length];
}
any ideas on how to pull an individual from from the feed? Or maybe is there a way to have an iOS app just take a screenshot and work with that?
Thanks!
Im not very familiar with IOS. for android there is a sample which use DJI msdk to grab the still images and use the image for Panorama stitching https://github.com/DJI-Mobile-SDK-Tutorials/Android-PanoramaDemo.
The equivalent IOS version of Panorama stitching is here. https://github.com/DJI-Mobile-SDK-Tutorials/iOS-PanoramaDemo
Maybe you can get idea on how to grab the still image from there.
There are several threads about this in android.
Ios would not be different i think.
how to get bitmap data from drone camera stream. android application
Get the bitmap from the fpvWidget is by far the simpliest and fastest solution.
public Bitmap getFrameBitmap() {
return fpvWidget.getBitmap();
}

Video stream is more zoomed than I'd like and isn't the same as the local stream view. How can I fix this?

Using the Agora.io Video SDK v2.2.1. Below is an image of what happens. The video stream is zoomed in and there is a "big head" rather than the entire image.
Please add below code before join channel this should help -
setParameters:#"{\"che.video.keep_prerotation\":false}"
setParameters:#"{\"che.video.local.camera_index\":1025}"
Refere the demo code :
https://github.com/AgoraIO-Community/Agora-Video-With-FaceUnity-iOS/blob/d777df2aac725bce120f9e8c4d599d026d2c9d79/AgoraWithFaceunity/Controllers/RoomViewController.m#L110

Use of Poster attribute in video shows Video Jump Back on load

< video poster="Some URL">
</video>
This is basic implementation in code. But when I refresh the page, I see poster image first, then in fraction of seconds I see actual video jumping back. Which creates jump back and forth like visual.
Any suggestions on fixing this?

Edit Exif Data on UIImage before posting to backend

Problem
I'm posting images to a server, but when I pull them back to the device, they turn sideways.
My thoughts are the Exif data attached to the image are telling the server how to orient the image.
How can I edit the exif data on a UIImage from the camera or library before its sent? I've seen solutions where they rotate the image when its returned but I want a solution for before its even posted.
A clue to what might be happening is that when the imageOrientation is posted it is normal, but return Up from the server no matter what. Does this possibly mean that the server is stripping the Exif data needed to determine the orientation?
Thank you.

TWTweetComposeViewController - animated GIF

Is it possible to upload an animated GIF with TWTweetComposeViewController?
I gave it a try with UIImage, and it only uploads the first frame. This makes sense, since UIImage doesn't support animated GIFs.
Is there a way to do this? Maybe a way to pass an NSData?
(My app is MonoTouch C#, but Objective-C answers work just as
well)
Follow This Link http://blog.stijnspijker.nl/2009/07/animated-and-transparent-gifs-for-iphone-made-easy/ It has the library to insert GIF images into UIImageView
You are correct - Twitter's official API documentation does not allow animated gif - only png, jpeg and one frame of gif is allowed
Here is their api doc page
I also tried the example for TWrequest post using multipart image data set to the raw Gif file and twitter sent back 400 / 403 error message
I'm assuming there isn't a way to do this.