From the youtube api I get these three videos, but none of them provide good quality video output on mobile devices. I get this information from user downloads.
<entry> <id>http://gdata.youtube.com/feeds/api/videos/tLEpHDsQhCw</id> <published>2011-07-16T20:35:17.000Z</published> <updated>2011-10-17T12:25:11.000Z</updated> <category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video' /> <category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Music' label='Music' /> <category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Attaullah Khan Esakhelvi' /> <category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Coke Studio' /> <category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Season 4' /> <title type='text'>Attaullah Khan Esakhelvi, Coke Studio, Season 4 </title> <content type='text'>Coke Studio Sessions. Produced by Rohail Hyatt. </content> <link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=tLEpHDsQhCw&feature=youtube_gdata' /> <link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/tLEpHDsQhCw/responses' /> <link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/tLEpHDsQhCw/related' /> <link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=tLEpHDsQhCw' /> <link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/cokestudio/uploads/tLEpHDsQhCw' /> <author> <name>cokestudio</name> <uri>https://gdata.youtube.com/feeds/api/users/cokestudio</uri> </author> <gd:comments> <gd:feedLink href='https://gdata.youtube.com/feeds/api/videos/tLEpHDsQhCw/comments' countHint='6' /> </gd:comments> <yt:hd /> <yt:location>Karachi</yt:location> <media:group> <media:category label='Music' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Music</media:category> <media:content url='https://www.youtube.com/v/tLEpHDsQhCw?version=3&f=user_uploads&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='226' yt:format='5' /> <media:content url='rtsp://v3.cache5.c.youtube.com/CigLENy73wIaHwkshBA7HCmxtBMYDSANFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='226' yt:format='1' /> <media:content url='rtsp://v1.cache5.c.youtube.com/CigLENy73wIaHwkshBA7HCmxtBMYESARFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='226' yt:format='6' /> <media:description type='plain'>Coke Studio Sessions. Produced by Rohail Hyatt.</media:description> <media:keywords>Attaullah Khan Esakhelvi, Coke Studio, Season 4 </media:keywords> <media:player url='https://www.youtube.com/watch?v=tLEpHDsQhCw&feature=youtube_gdata_player' /> <media:thumbnail url='http://i.ytimg.com/vi/tLEpHDsQhCw/0.jpg' height='360' width='480' time='00:01:53' /> <media:thumbnail url='http://i.ytimg.com/vi/tLEpHDsQhCw/1.jpg' height='90' width='120' time='00:00:56.500' /> <media:thumbnail url='http://i.ytimg.com/vi/tLEpHDsQhCw/2.jpg' height='90' width='120' time='00:01:53' /> <media:thumbnail url='http://i.ytimg.com/vi/tLEpHDsQhCw/3.jpg' height='90' width='120' time='00:02:49.500' /> <media:title type='plain'>Attaullah Khan Esakhelvi, Coke Studio, Season 4</media:title> <yt:duration seconds='226' /> </media:group> <gd:rating average='4.928571' max='5' min='1' numRaters='56' rel='http://schemas.google.com/g/2005#overall' /> <yt:recorded>2011-07-17</yt:recorded> <yt:statistics favoriteCount='34' viewCount='13122' /> </entry> VideoView vv = (VideoView) findViewById(R.id.vv); MediaController mc = new MediaController(this); mc.setEnabled(true); mc.show(0); vv.setMediaController(mc); vv.setVideoURI(Uri.parse("rtsp://v1.cache5.c.youtube.com/CigLENy73wIaHwkshBA7HCmxtBMYESARFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp")); vv.requestFocus(); vv.start();
And I use this Java code to access and play videos. Please suggest some solution so that I show good video playback quality for my application.
Thank you in advance
source share