Android Youtube Download mp3 - android

Assume I have the id (The numbers and signs in the video's hyperlink after "http://www.youtube.com/watch?v=") of a Youtube video. How can I download the audio stream of the file to an sd-card as an mp3 with android code? (I wrote an application for 2.x but this part is missing).

Look at how some other YouTube scrapers do it, e.g. youtube-dl. Then recreate their algorithm in Java for Android. Then keep spending time trying to stay up-to-date with the capricious changes YouTube will make to their site every now and then.

Related

Android Exoplayer caching m3u8 audio for offline support

I am creating a music application.
I have used Exoplayer V2.8.0, So far I have achieved to play, pause next, prev, shuffle, repeat all songs using controls in-app and also with notification.
But all of this works only in online mode.
Now I want to add offline support to this app and allow a user to download the song offline and play while they are offline.
Audio files we are getting are *.m3u8 files.
But my problem is user should not access those downloaded files outside of my app. I have tried using one approach but it gives the mp3 files downloaded and combined from the different segments of the m3u8 file.
Can anyone guide me or give me sample or tutorial on how can I download the segments only and at the time of playing I can use that segment and play audio offline?
There is one suggestion for you,
If you want to create an offline player with .m3u8 or any other file then after download saves your file into your package folder with some of the different formats. Then while using that convert that specific formatted to mp3 or other which will help out for offline music play.
You can use a local http proxy server (NanoHttpd). Start the server and point your ExoPlayer to 127.0.0.1 so you can monitor the requests. Cache the m3u8 playlist plus the downloaded files for the first time you see a request. Next time when your proxy detects the same request, just play the files from cache.

Decrypt a video part by part, and stream it through video player

Ok, I have a video encrypted through AES, stored in the internal memory of an Android powered device. What i want is that the video should only be played through an android app.
It would be appreciated if that application would decrypt the video part by part, store it in a virtual memory, and then stream it.
My question:
Is it possible to decrypt it part by part and stream?
If Yes, what would be the basic process?
If No, (nothing is impossible to code)
To make it happen, do i need to design my own video player android app, or can i use some existing app to work inside my app?
This subject is already treated in many questions.
For instance, look at How to play an encrypted video file in Android

Streaming Audio from server to Android App

I am kind of stuck on my app design and wondering, if some of you experts, could point me in the right direction.
I am working an Android App that shows how to pronounce different English words.
When user clicks on a play button next to a word, corresponding audio file (prerecorded wav file) is played with Android media player. I have 2000 words and corresponding wav files (each file is between 1 to 2 seconds).
But the problem is, I can’t pack all 2000 audio files into APP, as it will make APP too big. I am wondering, what is the best way of having the audio files on the server somewhere, and when user clicks play button next to a word, my APP plays from server. Are there any other ways of doing this?
Do I need streaming server for this (it’s not live stream), if so would you please let me know some that host? Can I use Heroku?
Thanks for help
Srini
You do not need a streaming server for that. A simple web pages server will do the job. Just put all your files in (maybe via ftp) to the server in a directory that you now exactly. From there, you can use the MediaPlayer class of android to play those sounds in streaming with the appropriate link to the file.

Stream wmv Videos from a url in my android app

i am creating an app for my website which contains lots of wmv video files.
and i want to be able to play them in my app.
i understand that android does not support wmv files so my question is:
is there any way for me to do this without to change all videos format in my site?
any modificatios to my videos via code (java - eclipse) or libraries, any loop holes?
I've been trying to create a site that has streaming video and I could never get Android devices to work with it. Then I found this...
http://www.longtailvideo.com/blog/31646/the-pain-of-live-streaming-on-android

Phonegap Android App - Display Store MP3 Media

I've been following this blog to help me make a simple music player function with an Android app (http://simonmacdonald.blogspot.com/2011/05/using-media-class-in-phonegap.html).
All works well - but I would like some way to extract a list of all music media stored on the phone so the user can click a file and play it. Does anyone know if this is possible via phone gap? I'd need to access track name/artist etc and a link to the track.
Cheers
Paul
Prognosis is not good.... PhoneGap does not have an API for accessing the media library. So, you would have to fall back to the File API to locate music files, and then... you would have to read the binary data in the actual files to extract out the track/artist metadata. Ouch. Seems pretty impractical.
[EDIT]
By the way, PhoneGap is not the only game in town. Appcelerator seems to solve the same problem, and apparently has a richer API, which includes
access to media metadata

Categories

Resources