mpv-player/mpv
🎥 Command line media player
C★ 37,919+37 that day#3 on trending
D49.1/100
Duplication67
4.9% in c, c-header, lua, swift, python, objectivec, bash, javascript, powershell, cppDead coden/a
the languages dead code reads are under 5% of the codeComplexity36
74.1% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
4.95%duplicated code · 12,432 of 251,393 lines
938clones in code
658code files of 756 scanned
7.13%duplicated over all files · 1,108 clones
Most complex files
- player/command.c1691 cx
- video/out/wayland_common.c1018 cx
- options/m_option.c1003 cx
- demux/demux.c990 cx
- demux/demux_mkv.c848 cx
- video/out/gpu/video.c776 cx
- player/loadfile.c661 cx
- player/lua/osc.lua661 cx
- video/out/w32_common.c624 cx
- video/out/vo_gpu_next.c580 cx
Dead code 31.44% unused · 1 findings
- player/javascript/defaults.jsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 18 lines in 210 placesc666 tokensaudio/aframe.c:1–18audio/chmap.c:1–18audio/chmap_avchannel.c:1–18audio/chmap_sel.c:1–18audio/decode/ad_dsd.c:1–18and 205 more
1/* 2 * This file is part of mpv. 3 * 4 * mpv is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * mpv is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty ofFirst 10 of 18 lines.
- 18 lines in 91 placesc-header664 tokensaudio/chmap.h:1–18audio/chmap_avchannel.h:1–18audio/chmap_sel.h:1–18audio/fmt-conversion.h:1–18audio/format.h:1–18and 86 more
1/* 2 * This file is part of mpv. 3 * 4 * mpv is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * mpv is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty ofFirst 10 of 18 lines.
- 18 lines in 14 placesswift665 tokensosdep/mac/app_hub.swift:1–18osdep/mac/dialog.swift:1–18osdep/mac/event_helper.swift:1–18osdep/mac/input_helper.swift:1–18osdep/mac/libmpv_helper.swift:1–18and 9 more
1/* 2 * This file is part of mpv. 3 * 4 * mpv is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * mpv is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty ofFirst 10 of 18 lines.
7 more
- 18 lines in 13 placesc667 tokens
- 15 lines in 12 placesc605 tokens
- 20 lines in 8 placesswift666 tokens
- 16 lines in 8 placesc663 tokens
- 14 lines in 6 placesc-header741 tokens
- 19 lines in 5 placesc-header704 tokens
- 19 lines in 5 placesc-header683 tokens
Largest clones over all files, tests and data included
- 18 lines in 221 placesc666 tokensaudio/aframe.c:1–18audio/chmap.c:1–18audio/chmap_avchannel.c:1–18audio/chmap_sel.c:1–18audio/decode/ad_dsd.c:1–18and 216 more
1/* 2 * This file is part of mpv. 3 * 4 * mpv is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * mpv is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty ofFirst 10 of 18 lines.
- 18 lines in 93 placesc-header664 tokensaudio/chmap.h:1–18audio/chmap_avchannel.h:1–18audio/chmap_sel.h:1–18audio/fmt-conversion.h:1–18audio/format.h:1–18and 88 more
1/* 2 * This file is part of mpv. 3 * 4 * mpv is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * mpv is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty ofFirst 10 of 18 lines.
- 1235 lines in 2 placestxttests19,085 tokens
1600 AVD: name=xyz12be chroma=0:0 flags=0x1 [be] 1601 0: p=0 st=6 o=0 sh=4 d=12 1602 1: p=0 st=6 o=2 sh=4 d=12 1603 2: p=0 st=6 o=4 sh=4 d=12 1604y1: fcsp=rgb ctype=uint 1605 Basic desc: [ba][bb][rgb][gray][le][uint] 1606 planes=1, chroma=0:0 align=1:1 1607 {8/[0:0] } 1608 0: 8bits {0:8/-7} {} {} {} 1609 Regular: planes=1 compbytes=1 bitpad=-7 chroma=1x1 ctype=uintFirst 10 of 1235 lines.
- 992 lines in 2 placestxttests15,336 tokens
- 628 lines in 2 placestxttests9,829 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| c | 359 | 198,250 | 708 | 9,056 | 4.57% |
| c-header | 205 | 25,431 | 178 | 2,568 | 10.1% |
| swift | 25 | 5,372 | 27 | 448 | 8.34% |
| lua | 31 | 15,312 | 12 | 160 | 1.04% |
| objectivec | 8 | 1,593 | 10 | 173 | 10.86% |
| bash | 13 | 1,463 | 3 | 27 | 1.85% |
| python | 13 | 1,880 | 0 | 0 | 0% |
| javascript | 1 | 862 | 0 | 0 | 0% |
| powershell | 2 | 646 | 0 | 0 | 0% |
| cpp | 1 | 584 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| c | 385 | 203,538 | 724 | 9,306 | 4.57% |
| c-header | 209 | 25,750 | 180 | 2,604 | 10.11% |
| txt | 13 | 12,378 | 108 | 7,637 | 61.7% |
| swift | 25 | 5,372 | 27 | 448 | 8.34% |
| yaml | 14 | 1,918 | 27 | 635 | 33.11% |
| lua | 31 | 15,312 | 12 | 160 | 1.04% |
| rest | 26 | 24,553 | 11 | 103 | 0.42% |
| objectivec | 8 | 1,593 | 10 | 173 | 10.86% |
| markup | 4 | 381 | 5 | 94 | 24.67% |
| bash | 14 | 1,480 | 3 | 27 | 1.82% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 7, 2026 | #3 | 37,919 (+37) | 756 | 297,425 | 1,108 | 7.13% | 4.95% | D 49.1 | 9028187 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.