Closed msdos2 closed 8 years ago
plz call the api setOption
Could you please explain me how to use setOption to accomplish what's done with IAvFormatOption? I haven't been able to do it myself. An snippet would be great.
Thanks,
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, <key>, <value>);
ple I/IJKMEDIA: ===== options ===== 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: player-opts : mediacodec = 1 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: player-opts : mediacodec-auto-rotate = 1 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: player-opts : opensles = 0 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: player-opts : overlay-format = 842225234 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: player-opts : framedrop = 1 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: player-opts : start-on-prepared = 0 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: format-opts : ijkinject-opaque = 1049890 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: format-opts : http-detect-range-support = 0 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: format-opts : rtmp_app = pull 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: format-opts : rtmp_pageurl = http://leton.tv/player.php?streampage=hollywood562&width=600&height=450 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: format-opts : rtmp_playpath = hollywood562?keys=IAeP9yoqiNb-nXwovV4VqA&keyt=1442321306 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: format-opts : rtmp_swfurl = http://files.leton.tv/jwplayer.flash 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: codec-opts : skip_loop_filter = 48 09-15 10:59:43.856 1481-1481/tv.danmaku.ijk.media.sample I/IJKMEDIA: =================== 09-15 10:59:43.856 1481-1780/tv.danmaku.ijk.media.sample I/IJKMEDIA: SDL_RunThread: [1780] ff_msg_loop 09-15 10:59:43.856 1481-1780/tv.danmaku.ijk.media.sample D/IJKMEDIA: message_loop 09-15 10:59:43.856 1481-1780/tv.danmaku.ijk.media.sample D/IJKMEDIA: FFP_MSG_FLUSH: 09-15 10:59:43.866 1481-1481/tv.danmaku.ijk.media.sample D/IJKMEDIA: ijkmp_prepare_async()=0 09-15 10:59:43.866 1481-1782/tv.danmaku.ijk.media.sample I/IJKMEDIA: SDL_RunThread: [1782] ff_read 09-15 10:59:43.866 1481-1781/tv.danmaku.ijk.media.sample I/IJKMEDIA: SDL_RunThread: [1781] ff_vout 09-15 10:59:43.866 1481-1781/tv.danmaku.ijk.media.sample D/IJKMEDIA: ffpipenode_create_video_output_from_android_mediacodec() 09-15 10:59:43.866 1481-1782/tv.danmaku.ijk.media.sample W/IJKMEDIA: remove 'timeout' option for rtmp. 09-15 10:59:43.936 1481-1782/tv.danmaku.ijk.media.sample D/IJKMEDIA: Handshaking... 09-15 10:59:43.996 1481-1560/tv.danmaku.ijk.media.sample D/OpenGLRenderer: endAllStagingAnimators on 0xb4ece400 (ListView) with handle 0xa064b2d0 09-15 10:59:44.006 1481-1481/tv.danmaku.ijk.media.sample I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@15870884 time:55999190 09-15 10:59:44.056 1481-1782/tv.danmaku.ijk.media.sample D/IJKMEDIA: Type answer 3 09-15 10:59:44.056 1481-1782/tv.danmaku.ijk.media.sample D/IJKMEDIA: Server version 13.14.10.13 09-15 10:59:44.056 1481-1782/tv.danmaku.ijk.media.sample D/IJKMEDIA: Proto = rtmp, path = /, app = pull, fname = hollywood562?keys=IAeP9yoqiNb-nXwovV4VqA&keyt=1442321306 09-15 10:59:44.176 1481-1782/tv.danmaku.ijk.media.sample E/IJKMEDIA: rtmp://80.82.70.233/: I/O error ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "http-detect-range-support", 0); ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_app", "pull"); ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_pageurl", "http://leton.tv/player.php?streampage=tcm753&width=600&height=450"); ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_playpath", "tcm753?keys=nvVJp_3fMvR6Z4zIzZaFIQ&keyt=1442322354"); ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_swfurl","http://files.leton.tv/jwplayer.flash" ); ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_live","1" ); mVideoView.setVideoPath("rtmp://80.82.70.233/");
Can you play this url with other player?
Yes, it works with Vitaminio (for example)
Feel free to reopen if any more question.
You can activate this function ? import tv.danmaku.ijk.media.player.IAvFormatOption Additionally, the following parameters can be set via command line options (or in code via AVOptions):
rtmp_app
rtmp_buffer
rtmp_conn
rtmp_flashver
rtmp_flush_interval
rtmp_live
rtmp_pageurl
rtmp_playpath
rtmp_subscribe
rtmp_swfhash
rtmp_swfsize
rtmp_swfurl
rtmp_swfverify
rtmp_tcurl