Can anyone tell me the dimensions of the thumbnail image rendered by the Chromecast default receiver? I can't find this documented anywhere, and my current images are squashed. (I guess I could find out by trial and error, but if there's an official answer I'd love to have it.)
Cheers
Nic
It is actually in the developer docs:
Note: The video image art is 96x143 pixels and the first image resource associated with the media metadata is selected for display. Images are scaled to fit the expected dimensions
Related
I am trying to save the content of an ImageView into a file and save it as an image. The simple code snippet which I am using is:
writeImageToFile(imageView.image);
The function writeImageToFile, saves the blob in a file which contains the image displayed in the image view. All good and fine till here.
Now the point noticed in here is that, I have defined the ImageView with the width and height as 150dip. After saving the image into a file, for iPhone 5, we find that the image resolution is 300x300, and for iPhone 6 Plus it is 450x450. The image resolution varies with the screen density, which I can understand.
But my query is that is there any way to always keep the resolution fixed to 150x150 pixels. Am not sure if this is possible out of the box with Appcelerator or do we need to use external modules.
Note: This is also applicable for Android too.
You can use the Blob functions to check the image size, then decide if you need to resize. You can use imageAsResized (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsResized) to make a 150x150 image.
I'm interested in getting a preview image of a youtube video for my application
I'm using the url to the previews:
http://img.youtube.com/vi/EqWRZrupLrI/0.jpg
but this has little two black rows, up and down, and I wish it were bigger.
I have read that the 0 is the bigger picture.
anyone know if it is possible to obtain a url with a better image?, for my project, I need the image is on a url
I appreciate the help
Regards :)
0.jpg is the full-size 480p thumbnail and there is no bigger thumbnail except for full HD videos (maxresdefault.jpg).
But why do you expect a bigger thumbnail for such a video ? Your video example has a resolution of 240p, the thumbnail is already much bigger than the video resolution.
Each of every image has 4 category like
https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
Also you can get more image size by this
-- For default
https://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
-- For high quality
https://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
-- For medium quality
https://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg
-- For max size
https://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg
Please check the following SO post:
How do I get a YouTube video thumbnail from the YouTube API?
YouTube thumbnail link doesn't work in all cases
It will surely solve your problem. I recommend to query the youtube api to get the thumbnail with max resolution.
)
I have a application to show some videos and images.. like a presentation.. The images have different resolution's and the videos to. I want to put the images and the videos in full screen mode but without lose quality.. The rotation of screen is fine, but the media content does not appear like they should..
Basically i want to show the images centered in vertical and horizontal without lose quality..
Suggestions?
For the video I would recommend using a MediaElement with the Stretch attribute set to 'Uniform'. 'Uniform' takes up all the space that you give the control but it ensures that the video maintains its aspect ratio. You should still have all the qaulity possible because the stretching happens on the GPU and it does a great job. You can see an example here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.aspx
Now, if you want the video to only scale up to it's orignial size but not get blown up any larger, then just set the Stretch property to 'None'.
The Image control works the same way and also has the same Stretch property. See the Image class documentation and sample here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.image(v=VS.95).aspx
Did you try the MediaElement API and the NaturalVideoHeight and NaturalVideoWidth properties?
I'm using CameraCaptureTask chooser and always is returning a smaller photo that the original. Camera has a resolution of 2592x1944, but the returned photo is always 1296x972. I'm using a LG E-900.
Any ideas ?
Any JPG or PNG image file that is loaded into a BitmapImage object on Windows Phone will automatically be re-sized to be less than 2000x2000 to reduce the internal memory used to display the image to the screen. If you must access the image at a higher resolution you will need access to the original byte stream (e.ChosenPhoto from the completed event for example) and then load that into a System.Windows.Media.Imaging.WriteableBitmap object.
The issue then becomes that you may need to know the original size of the image, as the WriteableBitmap takes a size and width as part of it's constructor and will automatically re-size the image that you try and load into it. I believe the only way to load a high resolution image at it's original size is to use ExifLib on the byte stream to detect the original height and width, then create a WriteableBitmap at that size and use the System.Windows.Media.Imaging - Extensions.LoadJpeg method to load the image into the object. For more image loading samples see this question regarding re-sizing an image on Windows Phone.
Sorry - but there's currently no way to do this - see Is it possible to configure the resolution of `CameraCaptureTask` in WP7?
if you are lucky, then the new Mango SDK might help - it's now 2 weeks away.
HTML 5 implementations are different across various browsers. In firefox, the image specified by the placeholder attribute will be shown until the user clicks play on the video. In chrome, the placeholder image is shown until the video is loaded (not played), at which point the first frame of the video is shown.
To reconcile this issue, I would like to set the first frame of the video to the placeholder image so that the experience will be the same in both browsers.
I would preferably do this using ffmpeg or mencoder. I have very limited experience using these however, so if someone could point me in the right direction, I would be much obliged.
Thanks!