小李笔记
-
ffmpeg切片常用命令
1、转码(如果需要)
1ffmpeg -i 1.mkv -acodec copy -vcodec copy 1.mp42、mp4-> ts
1ffmpeg -y -i 1.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb 1.ts…
-
磁力链接与种子互转
抽空写了两个在线工具: 磁力链接转种子文件:https://www.xiaolee.net/tools/magnet2torrent.html 实现原理:直接再种子库寻找对应的ha…
-
xml提取工具
最近想用百度站长工具的主动推送进行url推送,无奈以前全是站点地图,从没有记录过所有的url。因此就想把sitemap中所有的loc提取出来,进行post推送。完成后的效果图如下:…
-
网站域名变更
更新:2018年1月26日 本站博客域名由 blog.nobibee.me 变为blog.xiaolee.net。原网址会自动跳转(一年有效期)到 http://blog.xiao…
-
Java直接读取zip文件,无需解压
需求:操作上传的zip文件,读取并上传每项文件(文件名称采用特定命名方式,便于保存)。 代码片段:
1234567891011121314151617181920212223242526272829public void testUnzip() throws Exception{String path = "C:\\demo.zip";ZipFile zf = new ZipFile(path,Charset.forName("GB2312"));InputStream stream = new FileInputStream(new File(path));ZipInputStream zipStream = new ZipInputStream(stream,Charset.forName("GB2312"));ZipEntry entry = null; File file = null;InputStream inputstream = null;FileOutputStream fos = null;int length;while(null != (entry = zipStream.getNextEntry())){if (entry.isDirectory()) {}else {long size = entry.getSize();if (size > 0) {inputstream=zf.getInputStream(entry);file = new File(path+"demo_"+entry.getName());fos = new FileOutputStream(file);byte[] b = new byte[1024];while((length = inputstream.read(b)) > -1){fos.write(b,0,length);}fos.flush();}}}fos.close();inputstream.close();zipStream.closeEntry();}