question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Short stutter at beginning of Vod downloaded by CLI

See original GitHub issue

Checklist

Edition

Command Line Interface

Describe your issue here

Hi,

I’ve been using the CLI tool to programmatically download sections of VODs (not clips), but noticed that sometimes there will be a ~0.5 second stutter at the beginning of the downloaded mp4.

It’s quite noticeable, and looks like a few dropped frames perhaps? I’ve attached an example exactly as it was produced by the CLI.

The command to generate this was: .\TwitchDownloaderCLI.exe videodownload --id 1723455246 -o clips/clip-1.mp4 -b 17269 -e 17280.

Not sure if this is a known issue or how to resolve it.

Thanks.

https://user-images.githubusercontent.com/69974492/215920797-2124ad94-433c-410f-8b0b-4572f96f0b1f.mp4

Issue Analytics

  • State:open
  • Created 8 months ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lay295commented, Feb 1, 2023

For #154 could maybe parse out the BANDWIDTH for the average bitrate to generate an estimate? Around here or something maybe? Could also instead maybe just do a few extra network requests in that and send a HEAD request to the first segment of each playlist and read the content length header? (assuming Twitch servers support/allow that). Don’t think we would actually need to download a segment to estimate the size.

#EXTM3U
#EXT-X-TWITCH-INFO:NODE="video-edge-dc3ca6.ord56",MANIFEST-NODE-TYPE="weaver_cluster",MANIFEST-NODE="video-weaver.ord56",SUPPRESS="true",SERVER-TIME="1675236599.82",TRANSCODESTACK="2017TranscodeQS_V2",USER-IP="69.131.111.165",SERVING-ID="0b0ad0e23e4b498e95db4be456964d0c",CLUSTER="ord56",ABS="false",VIDEO-SESSION-ID="1723903581413011412",BROADCAST-ID="41793516843",STREAM-TIME="18602.819343",FUTURE="true",B="false",USER-COUNTRY="US",MANIFEST-CLUSTER="ord56",ORIGIN="pdx05",C="aHR0cHM6Ly92aWRlby1lZGdlLTFiNGJjZS5wZHgwMS5hYnMuaGxzLnR0dm53Lm5ldC92MS9zZWdtZW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hxZUwySi50cw",D="false"
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="chunked",NAME="1080p60 (source)",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-STREAM-INF:BANDWIDTH=6841847,RESOLUTION=1920x1080,CODECS="avc1.64002A,mp4a.40.2",VIDEO="chunked",FRAME-RATE=60.000
https://video-weaver.ord56.hls.ttvnw.net/v1/playlist/CqYFfJkMatY53YI-nVtZsCVZ5Re9wkq8C1lkxuSR6_0TJGI73sF_LzWhQJ4hEhkC3VwcCRgtxn4Yl_dzcH6GwnO10lk4hgARFRIMJvrzb7xY4JTkp8Ruc28FbnBLjyXY_eNyR-fhkC6bnPBpzq4nJQ2iTTtKzt7ni7l-UPVWf2ssHiwbtpqheH1wVQLXnCgFdMr_zCzRm2wBUKNYoI-SQnVB2LvtP8YZ0ZOR3PVM4T4kvm2DNsuOgBk3aOke2hYSHixU5XPKHR_zzwO5_eNwU2DRGiwnjSAbDdi1sM20JKw30p_iNMJC_Ed6-SlaTlYcm1fa5KfLjwDSvtKgEp7GYXWYoJfW8JUoSYrSIFkMvOj8ghLqg-0qgsoIXIJZtMx2Yu4FHLX1ztBXuSgJ35U9DeTRNi9VTRNeUvkc-f0Yt4k-u8CRGAesZKNRtzhrQvBy8-v6VypqgXr7ZmeeHwGACHCep1TctFLaP0Wia-dlWW6RI2HqN2JdmT0TM_yce3ii_vqYUXYlf1Bd48xS41fcXQg_O0cSWqp_pPhXHqWApARIZM6XPibvZGy59yX5zyA1zjnprgZgOG0m3f-qogrnOyG5TzuKBXynIrjvuKb7XI0R8vkp2sOCRjOg10w6zjakSNbrxFmmxLU6X1gndmMFCsqAkqLaNYvV2597a0AxsiUuU2guOzuO9W42gtwgCAJPgE5IZj6mWiZH15bNsG1JnKEAf6qsxCuvab1WuX63kok7g8k5DxOBXIEqtg4lLZVFaqNwB9DaTHn3SMLPOKBs0m35KAcp7wTMoyUIgTvn5S32J9qjCFGpw3zxgUFeKByq1Df2V4ehgvD_6qM5blVqWY1tUqK7DaNrOZilqdqHpTQJlZyWQSEqN9GudViq6VxInmv-TjBxeMsqGgwkuRuDrxKMN-IXYxQgASoJdXMtd2VzdC0yMOEF.m3u8
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="720p60",NAME="720p60",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-STREAM-INF:BANDWIDTH=3422999,RESOLUTION=1280x720,CODECS="avc1.4D401F,mp4a.40.2",VIDEO="720p60",FRAME-RATE=60.000
https://video-weaver.ord56.hls.ttvnw.net/v1/playlist/CqQF0l5kWGpsx6nSsPKL53Ks8yBtv2JRFjc9n3BbFDGZQknXxnh4cAh9uoDRgJe-SwwEWfnO2fw86zO5DgVR3FC0zPQwGVOZKs0JOflOrnpaMPhoFaQcI4PAE8znS8wNOoE00JEJRMNvZ79s3JW-u5xj0mXv6wBJJFqXDNKefvCUf6YBXZ5BXFGt8tMTGgNY--KBD1kPK6luUWu0yb5QznZO_p-n2KMuzEBJ0qySbCj1Bvja27L8vngoUDh2H0atBFyR7yfsBy5fbUQwsXXmKZ-bu2BjoHJrXbkFa4nWzTorQtc9X__WgVrmKbY-ySKMXbk8_ukFHq2oLNPF5jlk2uNLywgrgmUyDpl9RHGh6O_N4UVvazICPKhguPmzBmcEKExjRvzvB5qjDAo5OhlngDhrnuPao6JH6btHBvYUeA5BZT7wHXA-NSczOALVQkItDCBY6McxDVuiuNCq25-u9U9yqu0Bpfjbv8LMqr0yprVW1nW6JCfW4qzkDNW_PFS5X7W5FJVGuEma8UQlW_zVcqK6FKXYil5T6kXCww0QT5f3qc_XrZ_1UYuvC38efx-EGptzHsIRNzlM_bq2q9dDOwDErYYbBr6RzW997CDXg_cxZE2MEw3kH1KhJ7D_OuwIOiBaLv1y2IrpM6knkR7quv2WITZQdNlPy7878kAKSB5d4zvRp_vbnjdxPLGWTOXvl6VyNTORhLSDD5MMRBxeeMtPLU7FLRgZumumcqsZ_2wQydom-X2fJzwdePdmp1j1QAhh620xsrsmW8YOvZTv8b58nlNYewTEdHacyqi7HRR03oSKx9cAdK9bQi1Q8B9n2EH2-Wbo8ztoMEOJl1NrPoPy2qCOmXY8eRnxpPHT76ou_O2hx2aSm0Y4xaH5U9cFdXjZuxxW0RoMPGRBYpI2SkFUDF5nIAEqCXVzLXdlc3QtMjDhBQ.m3u8
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="480p30",NAME="480p",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-STREAM-INF:BANDWIDTH=1427999,RESOLUTION=852x480,CODECS="avc1.4D401F,mp4a.40.2",VIDEO="480p30",FRAME-RATE=30.000
https://video-weaver.ord56.hls.ttvnw.net/v1/playlist/CqQFHGHuk_LU3zI_H2JjFc_UDlWwPX73PI_p765EZ5PLNhF8yd0fAgUYMoNxHPm8NKVEEGyZc5CwqeISza1bWU_ZOXz5JoJ5yN37Oy5J1Ff8D9F0qCcUzsAhDqGOh1QXDe698837Q4ndqEFZvq-RZUfeVlxli_X5CbEvmzaKabIUxETWO_kVtVTSGnJZZms3pZkj_VxNLPO4OUheMTJycLYuE1VWsxKvIFfJZOvYmftJu0DG8HbJkzrSUeV9dq2Monz3G08D-7pH6KYrZ9Xy5sLHWo4JANAPIc8So36VH9TREQhcIsTG0wWToyVgxROsLpAgn97U2_oCceeYMas3u2panxfjuEu-NpNnTyrmf1V-ISq57zq4SC774Wkhb4XkvWZThnCoMzlckrF0I7JHiwSWH1S9xDLKIgCZic7HSphy0uc4Dx5y-61swrNz9pEl1T2JiYpiLAkozlkWAFC3INWLkEAdi5qMgjXcnoHopQgRczY7dcWnsujsLM9O6Uj7trK_6joiHWr1ws22BKpcLNg1bzze7UgcJ4EHyRRMd_Na0ery2hGmkNy56Ryu1OYPdSEaNClcEJnW42KtNHaZfYS2w1dUJh3GgRNWVFIOj30dELNwbOdt0XkcOLbQemJqRhGEzm16G2WLtwZGRaDNMa7YdCc9Ob6oSb96eUbna3kt12n1rYjYD9am4OBjT5BU_BdHfjRkcrGEwHgvvbdLxbHf4-QJvD6ziN60o6s4Nw_AfR4sIH0v4LKJNMo9S7nRlT0hFqV6MEoDGdhB8-PajovwwGy5tNsO_BP9z85BTwxux57ZkpUcMT5e-tvxWaLbRGqnQh5JaZ8WZvdAJzYgjePIoqJkNiSla-evUOv9lZ1MGxmah2r0MzvQo3HPI5NI7V80UkmH5BoMJrP0OlDppsq2j9qMIAEqCXVzLXdlc3QtMjDhBQ.m3u8
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="360p30",NAME="360p",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-STREAM-INF:BANDWIDTH=630000,RESOLUTION=640x360,CODECS="avc1.4D401F,mp4a.40.2",VIDEO="360p30",FRAME-RATE=30.000
https://video-weaver.ord56.hls.ttvnw.net/v1/playlist/CqQFnP7MNkOu1dJQ10ymsmbKIq9ovnQZ0Xfuesvzoib0e9MCo7CWmS411uWxxNFWaRO41e8oGPF7lGtoudsupfalFYr1kuS3wX_OS1XnJNKGjfUpIKWnOzdPWz5oS7u9_MHtM37gCJ6ZKF9oowcEkzb8sX5UuWAM0fiFJTpKvExgq2QeadTuraoFE6bsNmVFUVybzFq9gBuDHjknbpwbR89xTm-SirEE3e5hOjOlLQis_dt1trPct1j6t0mzyPKPzPp7X4STITWXMViadXvbXDBUL6EYh9IHZJTIN4qnd5ydRkcjE1IQDBAjQlY0skVRH6K7Y-lvdjXGu5BCit_EkhVqlYk0WjLgICJhb7UmxPAvPhY261sET-r0zTycNFzI3t49I2doJpMGvRAU8G6k6CrPg5JIdqHgwRHX3MXqDtZqDCg8F0ElxmsbbUB0M_kCJFjIUdQmGcZyi2ghmilPI85zEkqR1aXGNM2QnUpdbZkT28EXNzsPSuN7ds8pPAhjt6qO-7DaauSHi5DTYEo5iUxFjj9XCeNRLB6jmxByL7txUcGK8r4Tnndjl6TPfiYxZy87jmp_uaJRtxYJFOjg8ZwHFB7t2Vj5u1XyzT9YDSozUYdDF7GT4mcwDMrYKyNO5zlKGbc8grsIhk7gW5rk_LaAGwV7HO2zmodfNvSHm1viiMdN1PWFDL388DgwMp2spkX-XRp3H3kawjQ7Ol1mHx_ANXa-JSS3g219mIH2JBFwHcw08A5xmPuEvIKfwYgkU6w9DJJXPxzY9ti-97FN24eekO_TyEGeKGjb9BsmcHnTuaci0PSQbR4bhX-h0KTEx-U_srHT3Jx55JifjMg0p78dk5mRU30A7g4U0LEoCtQ36yw8n9iZ8THSpnuzxbc7T5no2dTSHBoMp-5YuX2vRap4fimTIAEqCXVzLXdlc3QtMjDhBQ.m3u8
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="160p30",NAME="160p",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-STREAM-INF:BANDWIDTH=230000,RESOLUTION=284x160,CODECS="avc1.4D401F,mp4a.40.2",VIDEO="160p30",FRAME-RATE=30.000
https://video-weaver.ord56.hls.ttvnw.net/v1/playlist/CqQF8nhbA7T-Vx0dvUCPUQEUlEpEqpmPZqucbwfLMON5ErHdsURE1E5XA1g70fp_0mSImhfdmAcSi6H_M9NFbju2p6jMurx4SD-MCmDRjhdHyxJRln_J3fea3oQEHnK2KA3_3oKWXdIjfcM6_cqBccR4t2zXHGNMDLbwQucVHArrhRL0AD8dSQE9aul-i5zkTweavYv_k7Y7MMIhFluSRP-9i2niBhhN3DTWPlkgrGjKnfe8fV-_zD-I9hhlndKTdfrFvQeKBeIzvk2iThyxkJtDByOkEE-1HdoyIQk1Z7Q4BhEOBLgO0NLROlpjYDPTinJ3Gf4DcJSKDPbvfBeu95-pt55MdmzN4C1Att4llgEiTmpokRcoxUtI3RchvroAbRlFQIPVdBgRNRE8amx8HvYNlRW2TuHadX9lHfSxiiria9_EHiPD9ccTdRUYTG69zLsWMMxiKBFam-3L-nXd39gxWaH3xTzJdkYLkYCbUk0fiI-f_wWbTQYeXWJaalHKyWwDtk00FbVkQ8y9GwlodgdOqBrfnkfcGLxaeJplinGoAAXOBYPXydSk3bDHIArAWGr4tGPKuQL9DULTz4TkjVKuABHeWtGTsFjrU3oekp3ZAjtEFNwIeU9WtOc25v0hdiq4WCVQlQprgqYRCGIYtmDln0D-Agn-E1QNuZDW0-YNkL7H8wbrb6jPvgXOsilovDXjmhHdC4AGc-1DDBhImZRN-EW0HTWqJaKq7qqyNyeDte6KDXeOhU88wvY_7sQs98l1v56AkXPChHzncj4lEuRowwUdTe-oN6XX2j-7xXb9iMsGCia4Jxlpm9SOs7wQ34bUIztLfYmVij-FiqCNcPjMEywOU4AntjwCil7Unydr8whMxMnHRQJAnjChlIJSjDnFxc6qaxoMf9E30mn1_qOlSsR0IAEqCXVzLXdlc3QtMjDhBQ.m3u8

Looks like the bandwidth is actually the max bitrate not the average, but maybe that’s what we want anyways since it would be the upper bound

image

0reactions
jafrizzellcommented, Feb 1, 2023

#67

Looks like I made the change in a1fa85a to have the cropping be inaccruate but is to the nearest 10 second segment, looks like it got reverted at some point though…

Cropping always on 10-second intervals would be a pain to work with, but it would be doable.

I’m clueless when it comes to encoders, sorry I can’t be of help here.

Interestingly, I tried playing the mp4 in VLC player and there was no stutter/desync at the beginning. Not sure if that has some significance but I thought I’d point it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Choppy audio when downloading live twitch streams. ...
Recently I've been having issues with capturing live twitch streams. The result is choppy audio, the audio remains in sync, just every few ......
Read more >
Why does the video on HLS stream downloads from certain ...
Using VideoDownloadHelper I notice that all the streams from a particular site have an issue with the video subtly stuttering/jerking.
Read more >
choppy slow motion - Apple Community
I am running blind here. Origin of the footage is from twitch VOD, downloaded by software called "Twitch Leecher" and it should be...
Read more >
All videos streamed on my phone have a lag, how do I fix it?
1. Try reducing the resolution of the video while streaming. Not all phones support HD/FHD/UHD video playback. Try playing a 360p or a...
Read more >
FIX Alert Box Notifications QUICK ! - YouTube
Diagnose and fix Streamlabs Online Alert Box issues using a variety of troubleshooting and testing techniques. I've previously uploaded a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found