Showing
1 changed file
with
6 additions
and
5 deletions
@@ -66,7 +66,8 @@ public class QNUploadServiceImpl implements IQNUploadService { | @@ -66,7 +66,8 @@ public class QNUploadServiceImpl implements IQNUploadService { | ||
66 | 66 | ||
67 | 67 | ||
68 | public static void main(String[] args) throws Exception{ | 68 | public static void main(String[] args) throws Exception{ |
69 | - fetch("9790249123840_1545555597", "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8", "1545555597", "1545555619"); | 69 | + //fetch("9790249123840_1545555597", "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8", "1545555597", "1545555619"); |
70 | + fetch(); | ||
70 | transfer(); | 71 | transfer(); |
71 | } | 72 | } |
72 | 73 | ||
@@ -131,7 +132,7 @@ url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545530300&e | @@ -131,7 +132,7 @@ url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545530300&e | ||
131 | } | 132 | } |
132 | } | 133 | } |
133 | 134 | ||
134 | - // http://api.qiniu.com/status/get/prefop?id=z0.5c1b4c0138b9f349c8bb9c46 查看文件的状态 | 135 | + // http://api.qiniu.com/status/get/prefop?id=z0.5c208c6a38b9f349c82caca2 查看文件的状态 |
135 | // http://flv01.static.yhbimg.com/ufo/live/mp4/yohotest15.mp4 | 136 | // http://flv01.static.yhbimg.com/ufo/live/mp4/yohotest15.mp4 |
136 | private static void transfer() { | 137 | private static void transfer() { |
137 | //String m3u8Address = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8"; | 138 | //String m3u8Address = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8"; |
@@ -144,7 +145,7 @@ url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545530300&e | @@ -144,7 +145,7 @@ url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545530300&e | ||
144 | //设置要转码的空间和key,并且这个key在你空间中存在 | 145 | //设置要转码的空间和key,并且这个key在你空间中存在 |
145 | String bucket = "yhbflv"; | 146 | String bucket = "yhbflv"; |
146 | String key = "ufo/live/m3u8/9790249123840_1545530300.m3u8"; // 14 4 分钟 15 3分钟 | 147 | String key = "ufo/live/m3u8/9790249123840_1545530300.m3u8"; // 14 4 分钟 15 3分钟 |
147 | - key = "ufo/live/m3u8/9790249123840_1545555597.m3u8"; | 148 | + key = "ufo/live/m3u8/9790249123840_1545530300.m3u8"; |
148 | //设置转码操作参数 1920x1080 1280x720 848x480 | 149 | //设置转码操作参数 1920x1080 1280x720 848x480 |
149 | String fops = "avthumb/mp4/s/1280x720/vb/1m/an/1/hr/0/r/30"; | 150 | String fops = "avthumb/mp4/s/1280x720/vb/1m/an/1/hr/0/r/30"; |
150 | 151 | ||
@@ -152,10 +153,10 @@ url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545530300&e | @@ -152,10 +153,10 @@ url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545530300&e | ||
152 | //设置转码的队列 | 153 | //设置转码的队列 |
153 | String pipeline = "yoho-m3u8-to-mp4"; | 154 | String pipeline = "yoho-m3u8-to-mp4"; |
154 | //可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当前空间。 | 155 | //可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当前空间。 |
155 | - String urlbase64 = UrlSafeBase64.encodeToString("yhbflv:ufo/live/mp4/9790249123840_1545555597.mp4"); | 156 | + String urlbase64 = UrlSafeBase64.encodeToString("yhbflv:ufo/live/mp4/9790249123840_1545530300.mp4"); |
156 | String pfops = fops + "|saveas/" + urlbase64; | 157 | String pfops = fops + "|saveas/" + urlbase64; |
157 | //设置pipeline参数 http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/ufoLive/ufo_avthumb_notify | 158 | //设置pipeline参数 http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/ufoLive/ufo_avthumb_notify |
158 | - StringMap params = new StringMap().putWhen("force", 1, true).putNotEmpty("pipeline", pipeline).put("notifyURL", "http://testapi.yohops.com/ufoLive/ufo_avthumb_notify"); | 159 | + StringMap params = new StringMap().putWhen("force", 1, true).putNotEmpty("pipeline", pipeline).put("notifyURL", "http://2.yohobuy.com/ufoLive/ufo_avthumb_notify"); |
159 | try { | 160 | try { |
160 | String persistid = operater.pfop(bucket, key, pfops, params); | 161 | String persistid = operater.pfop(bucket, key, pfops, params); |
161 | //打印返回的persistid | 162 | //打印返回的persistid |
-
Please register or login to post a comment