Repository: yt-dlp
Issue: [Panopto] Streams starting at different times
Labels: site-enhancement,triage

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

UK

### Example URLs

https://cambridgelectures.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=074cbf7a-04bb-4d1d-ae60-b11b00da3b2d

### Provide a description that is worded well enough to be understood

I downloaded a video from Panopto by using `yt-dlp -o video.mkv --cookies cookies.txt -f 399+3318 --video-multistreams https://cambridgelectures.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=074cbf7a-04bb-4d1d-ae60-b11b00da3b2d`.

However, the final merged file seems to have two video streams starting at different times, so I fixed it by using `ffmpeg -i video.mkv -itsoffset 400.5 -i video.mkv -c copy -map 0:v:0 -map 1:v:1 -map 1:a video.temp.mkv`.

As mentioned by @coletdjnz in https://github.com/yt-dlp/yt-dlp/issues/389#issuecomment-1110877580:
>I should also note that the streams may not start/end all at the same time.
>
>This can be seen commonly with Panopto (e.g. audio stream may start a little after video stream begins). I've also seen cases where video streams that end and start throughout, overlapping or not.
>
>Panopto provides timing data which is used in the web browser for syncing the streams.

there should be a way to get the timing data from the site, but I don't know how.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', '-o', 'video.mkv', '--cookies', 'cookies.txt', '-f', '399+3318', '--video-multistreams', 'https://cambridgelectures.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=074cbf7a-04bb-4d1d-ae60-b11b00da3b2d']
[debug] Encodings: locale cp65001, fs utf-8, pref cp65001, out utf-8, error utf-8, screen utf-8 
[debug] yt-dlp version nightly@2024.08.21.232751 from yt-dlp/yt-dlp-nightly-builds [6f9e65374] (pip) 
[debug] Python 3.11.5 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 3.0.9 30 May 2023) 
[debug] exe versions: ffmpeg 4.2.3, ffprobe 7.0.2-essentials_build-www.gyan.dev 
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.1.0, certifi-2023.07.22, mutagen-1.47.0, requests-2.32.3, sqlite3-3.42.0, urllib3-2.1.0, websockets-13.0 
[debug] Proxy map: {} 
[debug] Request Handlers: urllib, requests, websockets 
[debug] Loaded 1830 extractors 
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest 
Latest version: nightly@2024.08.21.232751 from yt-dlp/yt-dlp-nightly-builds 
yt-dlp is up to date (nightly@2024.08.21.232751 from yt-dlp/yt-dlp-nightly-builds) 
[Panopto] Extracting URL: https://cambridgelectures.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=074cbf7a-04bb-4d1d-ae60-b11b00da3b2d 
[Panopto] 074cbf7a-04bb-4d1d-ae60-b11b00da3b2d: Downloading JSON metadata 
[Panopto] 074cbf7a-04bb-4d1d-ae60-b11b00da3b2d: Downloading m3u8 information 
[Panopto] 074cbf7a-04bb-4d1d-ae60-b11b00da3b2d: Downloading m3u8 information 
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id 
[info] 074cbf7a-04bb-4d1d-ae60-b11b00da3b2d: Downloading 1 format(s): 399+3318 
[debug] Invoking hlsnative downloader on "https://d2hpwsdp0ihr0w.cloudfront.net:443/sessions/759aaae7-5d8d-4357-a628-b11b00da3b26/d530a8cb-ce2e-47d1-b6e8-b17100b70e7f.object.hls/396318/index.m3u8" 
[hlsnative] Downloading m3u8 manifest 
[hlsnative] Total fragments: 400 
[download] Destination: video.f399.mp4 
[debug] File locking is not supported. Proceeding without locking 
[download] 100% of  170.98MiB in 00:00:09 at 18.84MiB/s
[debug] Invoking hlsnative downloader on "https://d2hpwsdp0ihr0w.cloudfront.net:443/sessions/759aaae7-5d8d-4357-a628-b11b00da3b26/074cbf7a-04bb-4d1d-ae60-b11b00da3b2d-08cd791f-e4ba-4fec-b71d-b18201498c10.hls/3311131/index.m3u8" 
[hlsnative] Downloading m3u8 manifest 
[hlsnative] Total fragments: 332 
[download] Destination: video.f3318.mp4
[download] 100% of    1.15GiB in 00:01:55 at 10.20MiB/s
[debug] ffmpeg command line: ffprobe -show_streams file:video.f3318.mp4
[Merger] Merging formats into "video.mkv" 
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i file:video.f399.mp4 -i file:video.f3318.mp4 -c copy -map 0:v:0 -map 1:a:0 -bsf:a:0 aac_adtstoasc -map 1:v:0 -movflags +faststart file:video.temp.mkv
Deleting original file video.f399.mp4 (pass -k to keep) 
Deleting original file video.f3318.mp4 (pass -k to keep)
```