I have a question about Video playing. Can I use video_player (without using another package) for YouTube videos. If so, how? When I set the video URL, the console is showing me the following error :
Unhandled Exception: PlatformException(VideoError, Failed to load video: Operation Stopped, null, null)
Thanks for your attention :)
I do not think you can play Youtube videos via URL with this package. Seems like you need an URL of the video file (you could notice that in the documentation, where the URL is a specific place in the server, e.g. https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_20mb.mp4). Meaning, you need access to the video file and not a video URL on Youtube.
Related
I want to play videos from a given url, but the url is CDN signed from cloudfront. As the video player expects a url with mp4 extension. Currently I'm using video_player: ^2.1.12.
One stackoverflow answer was to use flutter_playout but the package kept breaking
I would like to download video from tiktok url by flutter.
I was able to extract only video url from tiktok video url.
Like this
https://v16-webapp.tiktok.com/16301adb3bdaee90952c0a29ba9aa269/6280a48d/video/tos/alisg/tos-alisg-pve-0037/4513bbabd77948d0ad68ea9154d3c580/?a=1988&br=700&bt=350&cd=0%7C0%7C1%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=eXd.6HVJMyq8Zjhdlwe2NZZK2l7Gb&l=202205150054570102440750600FBBD34F&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M2V2ZjQ6ZnZ3PDMzODgzNEApMzdlOWQ3OTtkNzQ7ZTxkZmdzbTBocjRvYHNgLS1kLy1zczI2YDVeNWFgMWIyLmJjYTI6Yw%3D%3D&vl=&vr=
However, the last of this url is not ".mp4" and I can find only how to download video from ".mp4 link" on the web.
Please teach me how to download video from "not mp4" video link to my iphone by flutter!
"This Answer seems to suggest reading the video into a bytes Array then write those bytes as a file in storage. You create a File object with your preferred filename (eg: in code the $filename becomes "test.mp4"). –
VC.One
May 15 at 12:26"
This is an Answer!!
Thank you!
you can do inspect element and then go to network tab and then go to media tab. After that click on the video on tiktok website whose mp4 you want, and it will appear in the media tab . You can go to that url which will be a cdn and download it from there.
how can I get direct stream link of live videos and play in VLC player. for example how should I get direct link of this page :
http://www.sportingvideo.org/20161005/vv57f4dce9e46e83.75702779-1448498.html
I need to fetch the playlist for specific username.
[NSString stringWithFormat:#"http://gdata.youtube.com/feeds/api/users/%#/playlists?alt=json&v=2&orderby=published&client=ytapi-youtube-profile",strUserName];
I use the above URl to fetch the JSON feeds for the username specified. Now when I parse this I get a list of playlist under the key "entry" which happens to be the array of playlist publicly available. To fetch all videos in specific playlist I again use a formatted URL like
[NSString stringWithFormat:#"http://gdata.youtube.com/feeds/api/playlists/%#?alt=json&v=2",currentPlayList.strPlayListId];
where currentPlayList.strPlayListId is actually the playlist id provided by youtube. The actual problem is to show the youtube video on iphone without exiting the application so I have used this method
Now passing the video ID (fetched from the playlist data as JSON) in URL
NSString* mediaURL = [NSString stringWithFormat:#"http://www.youtube.com/watch?v=%#",video.strMediaId];
where video.strMediaId is the video id of the video I wish to play results in Error of "This movie format is not supported" and it happens for all the videos.I have tried using all the links that are fetched under video details from youtube. There are similar unanswered post for this. Any help/comments will be appreciated to fix the issue ?
That has nothing to do with the iPhone. When people post videos to YouTube they have to allow it to be viewed on mobile devices. If they don't you'll get that message.
You can also get that message if there was a loss of signal or something similar while downloading the video. On those cases, rerunning the video usually works after a few tries.
Also, if the video has been recently uploaded, and the mobile version hasn't been processed yet, you'll get that message.
The only thing I can suggest is to make sure you have a strong, fast WiFi connection and see if the problem still manifests itself.
in my app i want to upload an video to youtube. The video is already been placed in another database of an URL. How to upload the video from that url to youtube......
YouTube does not provide an API to upload videos from a URL. You would first have to download the video to your device. Once you have video, the actual file, you can upload the video to YouTube using their API.
You would have use NSURLConnection and or NSURLRequest to upload the video.
Browser-based uploading
You can use the code in this test application and just change the path of the file from nsString to nsUrl.
But you have to use the new version of http://code.google.com/p/gdata-objectivec-client/
Here is a good tutorial. It works like charm. I can now upload video both from the device and an URL.