2023java攻克了抖音视频去水印视频下载

2023java攻克了抖音视频去水印视频下载

1、过滤链接

bash 复制代码
/**
     * 过滤链接,获取http连接地址
     * @param url
     * @return
     */
    public static String decodeHttpUrl(String url) {
        int start = url.indexOf("http");
        int end = url.lastIndexOf("/");
        String decodeurl = url.substring(start, end);
        return decodeurl;
    }

2、获取视频链接

bash 复制代码
 Connection con = Jsoup.connect(url);
        con.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1");
        Connection.Response resp = con.method(Connection.Method.GET).execute();
        String strUrl = resp.url().toString();
        String videoId = strUrl.substring(strUrl.indexOf("video/"), strUrl.lastIndexOf("/")).replace("video/", "");
        String b = "https://m.douyin.com/share/video/"+videoId;
        String finalVideoAddress = getVideoStreamUrl2(b);

3、下载视频链接

bash 复制代码
/**
     * 下载
     * @param videoAddress
     * @param desc
     */
    private static String downloadVideo(String videoAddress,String desc) {
        try {
            videoAddress = "https:"+videoAddress;
            System.out.println(videoAddress);
            String file2 = "C:\\data\\douyin";
            String ids= UUID.randomUUID().toString().replace("-", "");
            String file1=file2+"\\"+ids+"";
            File file = new File(file1+".mp4");
            file.createNewFile();
            BaseAdapter adapter = new SpliderAdapter();
            Map<String, String> maps = new HashMap<>();
            System.out.println("\n-----视频保存路径-----\n" + file1+".mp4");
            return adapter.getVideo(file1, videoAddress, maps, "mp4");
        } catch (IOException e) {
        }
        return "";
    }
相关推荐
Black蜡笔小新2 小时前
EasyAIS+国标GB28181视频监控平台EasyCVR强强联动,全域视频AI识别能力落地!
大数据·人工智能·音视频
数字融合5 小时前
透明化视场时空配准视频孪生多视域空间融合技术
人工智能·音视频·virtualenv
神奇霸王龙7 小时前
DeepSeek医疗RAG降本60%实战
人工智能·gpt·ai·prompt·音视频·医疗·ai医疗
Yeauty8 小时前
2026 年在 Rust 里处理音视频,该走哪条路?
rust·ffmpeg·音视频·视频
weixin_495248408 小时前
短剧视频翻译配音指南:投流素材和完整剧集译制有何不同?
音视频
气泡音人声分离1 天前
音频 Key 和 BPM 识别原理:歌曲调性和速度是如何分析出来的?
音视频·升降调·音频变速
海带紫菜菠萝汤1 天前
WebCodecs API 实战:浏览器原生视频编解码的原理与性能测试
前端·javascript·音视频·视频编解码
kriston20261 天前
2026音频指纹识别方案准确率对比:主流厂商差距与选型指南
音视频
薛定谔的猫-菜鸟程序员1 天前
基于 Electron 的本地短视频解析与下载工具:架构设计与工程实践
java·electron·音视频
程序员大辉1 天前
seedance2.0做的视频太贵?开源免费最佳替代方案:bernini生视频,ltx2.3来配音
音视频·视频大模型·ltx2.3·bernini