(d: dict)
| 169 | 1080p is large, and the MP4 export doesn't need it.""" |
| 170 | |
| 171 | def vhook(d: dict) -> None: |
| 172 | if job.cancel_requested: |
| 173 | raise JobCancelled() |
| 174 | if d.get("status") == "downloading": |
| 175 | total = d.get("total_bytes") or d.get("total_bytes_estimate") |
| 176 | if total: |
| 177 | p = float(d.get("downloaded_bytes", 0)) / float(total) |
| 178 | _set(job, stage=f"Fetching video {int(p * 100)}%") |
| 179 | |
| 180 | # Prefer H.264 (avc1) so the exported MP4 plays everywhere -- YouTube also |
| 181 | # serves AV1/VP9 in mp4 containers, which many players (Safari/iOS, older |
nothing calls this directly
no test coverage detected