# 抖音去水印代码 **Repository Path**: wpz136/tiktok-de-watermark-code ## Basic Information - **Project Name**: 抖音去水印代码 - **Description**: 去除抖音的原视频的水印 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 9 - **Forks**: 4 - **Created**: 2022-05-22 - **Last Updated**: 2024-01-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 抖音去水印代码 #### 介绍 去除抖音的原视频的水印 #### 软件架构 软件架构说明 #### 安装教程 实现思路: 从抖音上复制链接,大概长这样“https://v.douyin.com/JB9Fveb/ 复制此链接,打开【抖音短视频】,直接观看视频!”,这里我们只需要链接地址,在浏览器打开链接,然后按F12打开调试,再点Network,刷新下页面,我们再来看,这里有一条Get请求调用了后台并传递了item_ids=6558232015454342407,手机模式下。 .然后我们发现这个id其实在就在现在的页面链接中,所以只需要截取这个url就能获得id。然后我们打开https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6558232015454342407,发现返回了一条json字符串。 ` https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6558232015454342407` ``{ "ab_type": 1, "extra": { "now": 1599530291000, "logid": "202009080958110101980590270803414C" }, "status_code": 0, "item_list": [ { "desc": "", "video_labels": null, "is_live_replay": false, "forward_id": "0", "create_time": 1526957381, "author": { "platform_sync_info": null, "policy_version": null, "nickname": "王大锤丶", "avatar_larger": { "uri": "fa21000c9b3316043950", "url_list": [ "https://p3-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038", "https://p29-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038", "https://p26-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038" ] }, "avatar_thumb": { "url_list": [ "https://p3-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038", "https://p6-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038", "https://p9-dy.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038" ], "uri": "fa21000c9b3316043950" }, "avatar_medium": { "uri": "fa21000c9b3316043950", "url_list": [ "https://p3-dy-ipv6.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038", "https://p9-dy.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038", "https://p29-dy.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038" ] }, "unique_id": "ys288374851", "type_label": null, "uid": "91648641566", "short_id": "288374851", "signature": "我的皮,你无法想想", "followers_detail": null, "geofencing": null }, "cha_list": null, "video": { "has_watermark": true, "bit_rate": null, "play_addr": { "uri": "v0200f500000bc1oaeqkr6g02kqoredg", "url_list": [ "https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200f500000bc1oaeqkr6g02kqoredg&ratio=720p&line=0" ] }, "cover": { "uri": "86630006a8d2fba39389", "url_list": [ "https://p6-dy-ipv6.byteimg.com/aweme/300x400/86630006a8d2fba39389.jpeg?from=2563711402_large", "https://p26-dy.byteimg.com/aweme/300x400/86630006a8d2fba39389.jpeg?from=2563711402_large", "https://p3-dy-ipv6.byteimg.com/aweme/300x400/86630006a8d2fba39389.jpeg?from=2563711402_large" ] }, "height": 1024, "width": 576, "dynamic_cover": { "uri": "866100107a055008ea0b", "url_list": [ "https://p1-dy-ipv6.byteimg.com/obj/866100107a055008ea0b?from=2563711402_large", "https://p26-dy.byteimg.com/obj/866100107a055008ea0b?from=2563711402_large", "https://p3-dy-ipv6.byteimg.com/obj/866100107a055008ea0b?from=2563711402_large" ] }, "ratio": "720p", "duration": 15053, "origin_cover": { "uri": "866200085211de482240", "url_list": [ "https://p3-dy-ipv6.byteimg.com/866200085211de482240~tplv-dy-360p.jpeg?from=2563711402", "https://p9-dy.byteimg.com/866200085211de482240~tplv-dy-360p.jpeg?from=2563711402", "https://p1-dy-ipv6.byteimg.com/866200085211de482240~tplv-dy-360p.jpeg?from=2563711402" ] }, "vid": "v0200f500000bc1oaeqkr6g02kqoredg" }, "text_extra": [ ], "duration": 15053, "video_text": null, "group_id": 6555430327911714000, "aweme_id": "6558232015454342407", "music": { "position": null, "status": 1, "id": 6558232022232337000, "mid": "6558232022232337165", "author": "王大锤丶", "cover_medium": { "url_list": [ "https://p9-dy.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038", "https://p3-dy-ipv6.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038", "https://p6-dy-ipv6.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038" ], "uri": "fa21000c9b3316043950" }, "cover_thumb": { "url_list": [ "https://p26-dy.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038", "https://p3-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038", "https://p6-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038" ], "uri": "fa21000c9b3316043950" }, "play_url": { "uri": "http://p1-dy.byteimg.com/obj/8626000202c985cd3ca9", "url_list": [ "http://p1-dy.byteimg.com/obj/8626000202c985cd3ca9", "http://p9-dy.byteimg.com/obj/8626000202c985cd3ca9" ] }, "title": "@王大锤丶创作的原声", "cover_hd": { "uri": "fa21000c9b3316043950", "url_list": [ "https://p3-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038", "https://p26-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038", "https://p6-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038" ] }, "cover_large": { "url_list": [ "https://p3-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038", "https://p26-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038", "https://p6-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038" ], "uri": "fa21000c9b3316043950" }, "duration": 15 }, "image_infos": null, "risk_infos": { "warn": false, "type": 0, "content": "" }, "geofencing": null, "label_top_text": null, "long_video": null, "statistics": { "digg_count": 0, "play_count": 0, "aweme_id": "6558232015454342407", "comment_count": 0 }, "aweme_type": 4, "comment_list": null, "is_preview": 0, "share_url": "https://www.iesdouyin.com/share/video/6558232015454342407/?region=&mid=6558232022232337165&u_code=48&titleType=", "share_info": { "share_desc": "在抖音,记录美好生活", "share_title": "@王大锤丶发了一个抖音短视频,你尽管点开,不好看算我输!", "share_weibo_desc": "#在抖音,记录美好生活#@王大锤丶发了一个抖音短视频,你尽管点开,不好看算我输!" }, "author_user_id": 91648641566, "promotions": null } ] }[/mw_shl_code] 然后其中有这么一条数据,里面包含了一条url,记下这条URl,我们返回最开始的页面 [Asm] 纯文本查看 复制代码"video": { "has_watermark": true, "bit_rate": null, "play_addr": { "uri": "v0200f500000bc1oaeqkr6g02kqoredg", "url_list": [ "https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200f500000bc1oaeqkr6g02kqoredg&ratio=720p&line=0" ] }, 4.点击播放,我们发现这么个玩意,是不是很眼熟对比之前记下的url,一模一样,所以我们知道这条url就是最终我们需要的可以下载视频的url 5.到这里其实并没有获取到真正的视频连接,这个链接还是有水印的,而真正的链接只需要把"https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200f500000bc1oaeqkr6g02kqoredg&ratio=720p&line=0" 这个视频链接的playwm换成play就可以wm就是watermark,单词水印的简写,所以我们现在获取到的链接是"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200f500000bc1oaeqkr6g02kqoredg&ratio=720p&line=0" 现在获取到的已经是可以打开看的视频链接了,但是用代码下载这个还是不行 6.到这一步,其实还是没有获取到真实能够下载的视频地址,真的视频地址藏在这个页面的header中,有一个location属性对应的链接就是真正的视频地址,截图为在idea 访问该链接debug状态下显示的location属性, 这个链接是没法打开的,但是我们下载视频时还是根据和这个来下载的http://v6-dy.ixigua.com/005c16bcf90383e23825d74215d69f07/5f5ed840/video/tos/cn/tos-cn-ve-15/5cc141796ba34080ac85e1a911d3b908/?a=1128&br=2619&bt=873&cr=0&cs=0&cv=1&dr=0&ds=6&er=&l=2020091409405201019808213350CD540C&lr=&mime_type=video_mp4&qs=0&rc=amc6N3ZlODo3dzMzZ2kzM0ApaDRoZ2hmOWU1N2g6PGdlPGdlZDJvMXNlc2FfLS01LS9zczRhYzE0M15jYTRgNWFfNTU6Yw%3D%3D&vl=&vr=,所以只需要根据链接进行下载就可以了 #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)