Android系统中使用Console命令播放视频文件

When streaming, if you want to play a streaming URL, it can be inconvenient if the browser cannot recognize the URL as a media stream and downloads the content rather than using Gallery to play it.


To create this kind of media streaming, you need to write an apk to use VideoView to play the URL/media stream from the console.

 

Here is the command of how to play a media file or network stream from console.

 

Gingerbread

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "<URL>"

      The URL can be file position or network stream URL, such as:

  • you can play a local file by:

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "/mnt/sdcard/test.mp4"

  • You can also play a http stream by:

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "http://v.iask.com/v_play_ipad.php?vid=76710932"

  • Or play a rtsp stream by:

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "rtsp://10.0.2.1:554/stream"

 

ICS

am start -n com.android.gallery3d/com.android.gallery3d.app.MovieActivity -d "<URL>"

       The URL has the same definition of Gingerbread.

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值