i have a requirement in my android project To display video thumbnail using video url ,How can i get this can any body give solution for that.the follwoing code is not working it comes an error
error:
:Chunked transfer encoding applied.
W/NuHTTPDataSource( 34): Server did not give us the content length!
code:
String linkText_url="http://www.youtube.com/watch?v=BZ-vxUiOhwc&feature=relmfu";
Bitmap bitmap=ThumbnailUtils.createVideoThumbnail(linkText_url,
MediaStore.Video.Thumbnails.MINI_KIND);//filePath is your video file path.
imge.setImageBitmap(bitmap);
Related
There are a few problems I am listing here..
I am using a Omnivision image sensor to get the raw video and images. I have to convert the raw image to bitmap or the video format to MJPEG..
I tried got data using Uri, then to inputstream then to a byte [], a N x 1. where I got about a million values. I am not sure whether this is the right way to get the image. Then I tried to decode using imcodes. I used to bitwise shift and added the values, but it took a lot of time and the app crashed. Instead of it, I reshaped into m x n and tried to display on a bitmap to view it as a null. I tried the dimoraic which I could not proceed. I tried decoding it as bitmap too, and the app crashed too.
Is there any way I could directly stream it in Android studio. I need to convert this raw video format into MJPEG format. I tried to stream it in python just like a webcam, which gave an error can't grab frame and something to do with MSMF
I'm trying to parse an img src that is featured on a website and include it into my app. I'm using the flutter package Web Scraper, this is the code I've tried so far:
final webScraper = WebScraper('https://tiktok.com');
if(await webScraper.loadWebPage('/#$enteredUsername')){
tiktokProfilePictureURL = webScraper.getElement('img', ['src']);
print(tiktokProfilePictureURL);
}
The image I'm trying to get the URL from is the profile picture of the account, as shown in the screenshot below.
When I look into the code of the website it provides the link to the website image but when I try to parse this in web scraper it can't seem to find it.
This is the WebScraper output:
As you can see it finds various .svg images but not the .jpeg profile picture I'm trying to find.
Or maybe there is another way to parse this image src url? Any suggestions? Thanks.
Hello i have problem i want to play video stream from url link but i have some issue after i use complete url link or without blank space exoplayer player library can detected but after i use file url link blank space cannot detected
example
http://www.something.com/folder/hmmm.mp4 //worked success
after i use this
http://www.something.com/folder/hmmm iknow this blank space.mp4// cannot worked
can someone helpme please thanks
I am gonna answer using the code I used to play video at a URL in exoplayer--
String videoURL="https://d17h27t6h515a5.cloudfront.net/topher/2017/April/58ffdcc8_5-mix-wet-and-cry-batter-together-brownies/5-mix-wet-and-cry-batter-together-brownies.mp4" ;
MediaSource mediaSource = ExtractorMediaSource.Factory(new DefaultHttpDataSourceFactory("exoplayer-codelab"))
.createMediaSource(Uri.parse(videoURL));
So you'll have to give the entire address of video along with video type extension to run successfully.
I am developping an Android application and I encouter problem to get thumbnail of video.
My question is simple. I know how to get thumbnail for Youtube or Dailymotion but is there a way to do the same for a video like this one : http://download.wavetlan.com/SVV/Media/HTTP/MP4/ConvertedFiles/MediaCoder/MediaCoder_test3_1m10s_MPEG4SP_VBR_516kbps_320x240_25fps_MPEG1Layer3_CBR_320kbps_Stereo_44100Hz.mp4
I want to get a frame at time T for every video.
I tried this :
Bitmap thumb = ThumbnailUtils.createVideoThumbnail(m_Video.getM_Urlvideo(),
MediaStore.Images.Thumbnails.MINI_KIND);
m_Video.getM_Urlvideo() is returning my video url..
It doesn't work, anyone has an idea ?
Thank you
How to read an image from a URL like this in Android using ImageView:
[http://www.mphonline.com/ImgFile.aspx?TmpFile=D:\MPHLoc\ProdImg\9781740594943_s.jpg]
It would not return a normal static image stream.
Thanks.
An Android emulator could not access resource from local drive
like c: d: e: as shows in your Que: D:\MPHLoc\ProdImg\9781740594943_s.jpg
You can refer this if you want to download and display image from local