RTSP youtube link

后端 未结 4 1924
离开以前
离开以前 2020-12-01 06:07

I have gone all over google and am having trouble getting the rtsp link from a youtube video give the VIDEO_ID.

I am confused on how to use that id and then parse go

4条回答
  •  广开言路
    2020-12-01 06:36

    A short and simple way of getting the rtsp link, should be easily portable to any platform.

    String video_id = "1FJHYqE0RDg";
    String gdata = "http://gdata.youtube.com/feeds/api/videos/";
    String youtube_response = Util.getUrlResponse(gdata+video_id); // just a simple HTTP GET
    String rtsp_link = "rtsp:"+ StringUtils.split(StringUtils.split(youtube_response, "rtsp:")[1], ".3gp")[0] + ".3gp";
    

提交回复
热议问题