lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.52k stars 260 forks source link

Cropped VOD downloads have incorrect length in metadata if only start is selected #1022

Closed jacob-song5 closed 3 months ago

jacob-song5 commented 3 months ago

Checklist

Edition

Windows GUI Application

Describe your issue here

When downloading vods with only the start time selected, the output mp4 file has the correct file size and start time, but it still has the full length of the vod in the metadata. So if you try to download the last 10 minutes of an 8 hour vod for example, the file size will be appropriately small and the video will start at the correct point in time of the vod. However, the file will show up as an 8 hour long mp4 file and therefore affect playback functionality such as time seeking in video players such as VLC. Otherwise, VLC seems to be able to playback the video properly, but if you seek past the true length of the video file, it will simply end playback.

There is a very simple workaround for this currently, which is to simply set the end time for the vod when downloading, which defaults to the very end of the vod anyways. Doing so will create an mp4 file with the correct length.

Example: image image

Add any related files or extra information here

VOD ID:2105185100 Crop Video: Start = 9:10:0 Do not set end time Output video will report a length of 9:13:15

ScrubN commented 3 months ago

I'm unable to reproduce the issue. Can you send the video file so I can check the metadata? Untitled

jacob-song5 commented 3 months ago

https://github.com/lay295/TwitchDownloader/assets/34046849/601e0cf2-e660-41bd-87dd-534c701f5948

Here is a smaller example started from timestamp 9:13:05 to reduce file size. Chrome's built-in video player seems to handle the length just fine, but VLC and the newer Windows Media Player app both seem to report the full video length as does the file properties in Windows Explorer.

ScrubN commented 3 months ago

I was unable to reproduce when testing on the latest commit, however I was able to reproduce when using the latest release. This makes me think that the issue may have already been fixed.

You can help me verify that it has been fixed by testing a workflow build.

jacob-song5 commented 3 months ago

You're right, I just tested on that workflow build and the output video had the correct length. Thanks for the help, I'll mark the issue as closed.