TwitchDownloader
TwitchDownloader copied to clipboard
[LOG] - 1 errors were encountered while downloading: The operation was canceled. at MoveNext
Checklist
- [X] I have checked the issue page for duplicates
- [X] I am running the latest version (download here)
Edition
Command Line Interface
Describe your issue here
The video is the same as this bug report: https://github.com/ihabunek/twitch-dl/issues/132
$ TwitchDownloaderCLI videodownload --oauth $OAUTH -u "https://www.twitch.tv/videos/694444624" -q best --temp-path ./TMP/ -o SURPRISE_TwitchDownloaderCLI.mp4
TwitchDownloaderCLI 1.53.2 Copyright (c) 2019 lay295 and contributors
[STATUS] - Fetching Video Info [1/5]
[STATUS] - Downloading 100% [2/5]
[LOG] - 1 errors were encountered while downloading: The operation was canceled. at MoveNext
[STATUS] - Verifying Parts 100% [3/5]
[STATUS] - Combining Parts 100% [4/5]
[STATUS] - Finalizing Video 100% [5/5]
Could you check if this issue is caused by a bad source (Twitch)? How can I seel the [LOG] file? Nothing is mentioned in documentation: https://github.com/lay295/TwitchDownloader/blob/master/TwitchDownloaderCLI/README.md
Add any related files or extra information here
No response
It is most likely that a single request just timed out and it is nothing to worry about. As for the log file, there is not one yet but I definitely would like to implement one sooner rather than later. This has a prerequisite though which is to rewrite the progress reporting system to be more flexible.
Yes, but the resulting files have errors when playing or converting them, in twitch-dl
issue I'm reporting all the errors, no idea if @ihabunek is still active. Since TwitchDownloader
doesn't say much I can't tell if this is a server side issue or local.
Yes, but the resulting files have errors when playing or converting them
Probably a problem with the source VOD. TwitchDownloader currently does do not re-encode the video when finalizing, though I think it might re-encode the audio? I'm still learning a lot about using FFmpeg. I am testing a new finalization step that for sure does not re-encode anything and is much faster, however I might also provide an option to do a full re-encode in case there are playback problems like in this case.
Also you can pass a CLI argument that will print the FFmpeg log to the console, and if you open the cache folder before finalization finishes, there will be an FFmpeg log file that will probably have the same corrupt packet warnings that twitch-dl was giving you.
Eventually there will be an option to save everything to a user specified log file, however that probably won't happen for a while. Lay and I work on this project in our free time after all.
Re-encoding will take a lot of time, and it's not needed to do that, since TS files are already fine.
After some tests, I think the problem for all corrupt mp4 files could be caused by ffmpeg
.
When some mp4 file has errors, I check the source output.ts and it doesn't have them, so the cause must be ffmpeg. It can be caused by the concatenate filter or by the musing to mp4.
Since ffmpeg it's used twice it's even worse:
- Using ffmpeg when combining parts into output.ts
- Converting output.ts to output.mp4 (no idea if converting to mkv causes the issue)
So the safest option for now is completely avoid ffmpeg unless the user requests it:
- Binary concatenation (parts.ts into output.ts)
- Copy/move output.ts to desired filename.ts
I've opened several feature requests for that, hope you can implement them!
Also adding such information to documentation would be great.
Another option to convert output.ts to output.mp4 (with metadata, which is the best part), is to try HandBrakeCLI. I think it could be used for both cases, merge all ts parts and convert ts to mp4. But for merging all ts parts I would just use cat, that will always work. https://handbrake.fr/docs/en/latest/cli/cli-options.html
Not sure it HandBrake can handle remuxing yet.
GPAC MP4Box could work as well for remuxing, but I think still needs lots of patches to handle ts files properly. https://gpac.wp.imt.fr/
Since ffmpeg it's used twice it's even worse:
- Using ffmpeg when combining parts into output.ts
- Converting output.ts to output.mp4 (no idea if converting to mkv causes the issue)
So the safest option for now is completely avoid ffmpeg unless the user requests it:
- Binary concatenation (parts.ts into output.ts)
- Copy/move output.ts to desired filename.ts
We perform binary concatenation, we do not use FFmpeg for that.
We perform binary concatenation, we do not use FFmpeg for that.
Great. Then it must be the remuxing to mp4 when it gets broken. It doesn't happen always or at the same timestamp.
After some checks this is what I've found:
-
twitch-dl
andTwitchDownloader
download exactly the same ts chunks for the same video, for example both download the same number of .ts chunks, and the files from one and the other match exactly, because they have the same SHA1. The difference is only in the numbering. Whiletwitch-dl
used 5 digits (00000.ts, 00190.ts) for all parts,TwitchDownloader
uses regular numbers (0.ts, 190.ts).
So in this part they are exactly the same.
-
twitch-dl
doesn't mux the ts parts into one ts file using binary concatenation, it uses ffmpeg even if output is ts:
TMPDIR=./TMP twitch-dl download $URL --auth-token $OAUTH -q source --max-workers 1 -o output.ts
So in this part twitch-dl
may always introduce errors in muxed file.
- Some programs merge with binary concatenation and others not:
Manually merging the 721 ts parts results in output.ts, file size of 5.757.606.722 bytes
. sha1 has same value using 3 methods:
-
cat
in MacOS -
pv
in MacOS -
copy /b
in Windows
Automatically merging output.ts by programs has same sha1 for both, but it's different from previous one. File size is 5.769.079.484 bytes
:
- TwitchDownloader (output.ts)
- Video DownloadHelper (output.m2ts)
So TwitchDownloader
and DownloadHelper
DON'T use binary concatenation, they must be using some other method which I don't know. They make output.ts files 11.472.762 bytes
bigger than binary concatenation.
- However the output.ts files made by
TwitchDownloader
andDownloadHelper
are good, and the ones made by binary concatenation have errors, so it should not be done this way:
Merged file in perfect condition:
$ mpv output_TwitchDownloader.ts
(+) Video --vid=1 (h264 1920x1080 60.000fps)
(+) Audio --aid=1 (aac 2ch 48000Hz)
AO: [coreaudio] 48000Hz stereo 2ch floatp
VO: [libmpv] 1920x1080 yuv420p
AV: 02:00:04 / 02:00:05 (100%) A-V: 0.000 Dropped: 5
Exiting... (End of file)
Merged file by binary concatenation with defects: MPV:
mpv output_cat.ts
(+) Video --vid=1 (h264 1920x1080 60.000fps)
(+) Audio --aid=1 (aac 2ch 48000Hz)
AO: [coreaudio] 48000Hz stereo 2ch floatp
VO: [libmpv] 1920x1080 yuv420p
AV: 01:04:47 / 02:00:05 (54%) A-V: 0.000
[ffmpeg/demuxer] mpegts: Packet corrupt (stream = 1, dts = 355607910).
[ffmpeg/demuxer] mpegts: PES packet size mismatch
[ffmpeg/demuxer] mpegts: Packet corrupt (stream = 0, dts = 355609050).
AV: 01:04:48 / 02:00:05 (54%) A-V: 0.000
[ffmpeg/audio] aac: Input buffer exhausted before END element found
Error decoding audio.
[ffmpeg/audio] aac: SBR was found before the first channel element.
[ffmpeg/audio] aac: Multiple frames in a packet.
[ffmpeg/audio] aac: Sample rate index in program config element does not match the sample rate index configured by the container.
[ffmpeg/audio] aac: channel element 0.0 duplicate
Error decoding audio.
Invalid audio PTS: 3889.194667 -> 3890.048000
Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).
AV: 01:04:55 / 02:00:05 (54%) A-V: 0.000 ct: 0.853 Dropped: 44
[ffmpeg/demuxer] mpegts: Packet corrupt (stream = 1, dts = 356284440).
AV: 01:04:56 / 02:00:05 (54%) A-V: 0.000 ct: 0.853 Dropped: 44
Invalid audio PTS: 3896.704000 -> 3900.032000
AV: 01:04:56 / 02:00:05 (54%) A-V: 3.288 ct: 0.893 Dropped: 46
[ffmpeg/video] h264: error while decoding MB 45 60, bytestream -5
AV: 01:05:04 / 02:00:05 (54%) A-V: 1.000 ct: 3.181 Dropped: 161
[ffmpeg/demuxer] mpegts: Packet corrupt (stream = 1, dts = 357208470).
AV: 01:05:06 / 02:00:05 (54%) A-V: 0.340 ct: 3.841 Dropped: 201
Invalid audio PTS: 3906.986667 -> 3910.016000
AV: 01:05:06 / 02:00:05 (54%) A-V: 3.203 ct: 4.008 Dropped: 211
[ffmpeg/video] h264: Invalid NAL unit 0, skipping.
[ffmpeg/video] h264: error while decoding MB 48 61, bytestream -8
AV: 01:05:07 / 02:00:05 (54%) A-V: 3.123 ct: 4.400 Dropped: 215
[ffmpeg/demuxer] mpegts: Packet corrupt (stream = 1, dts = 357691410).
AV: 01:05:07 / 02:00:05 (54%) A-V: 3.123 ct: 4.400 Dropped: 215
Invalid audio PTS: 3912.341333 -> 3920.021333
Reset playback due to audio timestamp reset.
[ffmpeg/video] h264: co located POCs unavailable
[ffmpeg/video] h264: co located POCs unavailable
AV: 01:05:12 / 02:00:05 (54%) A-V: 0.000
[ffmpeg/video] h264: Invalid NAL unit 0, skipping.
[ffmpeg/video] h264: cabac decode of qscale diff failed at 20 16
[ffmpeg/video] h264: error while decoding MB 20 16, bytestream 6
AV: 01:05:12 / 02:00:05 (54%) A-V: 0.000
Invalid video timestamp: 3912.365000 -> 3920.015000
(Paused) AV: 01:05:23 / 02:00:05 (54%) A-V: 0.000
VLC Nightly:
main debug: VLC media player - 4.0.0-dev Otto Chriek
main debug: Copyright © 1996-2023 the VideoLAN team
main debug: revision 4.0.0-dev-26013-g8d7695e6cf
main debug: configured with /Volumes/External/videolanci/builds/vCi6yJP3/0/videolan/vlc/extras/package/macosx/../../../configure '--prefix=/' '--enable-macosx' '--enable-merge-ffmpeg' '--enable-osx-notifications' '--enable-flac' '--enable-theora' '--enable-shout' '--enable-ncurses' '--enable-twolame' '--enable-libass' '--enable-macosx-avfoundation' '--disable-skins2' '--disable-xcb' '--disable-caca' '--disable-pulse' '--disable-vnc' '--without-x' '--build=x86_64-apple-darwin19' '--host=aarch64-apple-darwin19' '--with-macosx-version-min=10.11' '--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' 'build_alias=x86_64-apple-darwin19' 'host_alias=aarch64-apple-darwin19' 'CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'CFLAGS=-g -arch arm64 -Werror=incompatible-function-pointer-types -Werror=incompatible-pointer-types -Werror=missing-field-initializers' 'LDFLAGS=-arch arm64' 'CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' 'CXXFLAGS=-g -arch arm64 -Werror=incompatible-function-pointer-types -Werror=missing-field-initializers' 'OBJC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'OBJCFLAGS=-g -arch arm64 -Werror=incompatible-function-pointer-types'
main debug: EsOutProgramMeta: number=1
ts warning: lost synchro
ts debug: skipping 119 bytes of garbage at 3115131988
ts debug: resynced at 3115132107
main debug: EsOutProgramMeta: number=1
ts warning: discontinuity received 0xa instead of 0x5 (pid=257)
ts warning: discontinuity received 0xb instead of 0x6 (pid=256)
ts warning: discontinuity received 0xa instead of 0x9 (pid=0)
ts error: libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 9) for PID 0
ts debug: PATCallBack called
ts warning: discontinuity received 0xa instead of 0x9 (pid=4096)
ts error: libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 9) for PID 4096
ts debug: PMTCallBack called for program 1
main debug: EsOutProgramMeta: number=1
main debug: EsOutProgramMeta: number=1
main debug: EsOutProgramMeta: number=1
ts warning: lost synchro
ts debug: skipping 181 bytes of garbage at 3120619451
ts debug: resynced at 3120619632
ts warning: discontinuity received 0xc instead of 0x9 (pid=258)
main debug: EsOutProgramMeta: number=1
ts warning: discontinuity received 0x5 instead of 0xc (pid=257)
decoder warning: vt session error: 'kVTVideoDecoderBadDataErr'
decoder warning: restarting vt session (dec callback failed)
decoder warning: forcing output chroma (kCVPixelFormatType): 420v
decoder debug: session accepted first frame 0
ts warning: discontinuity received 0xb instead of 0xa (pid=256)
auhal warning: underrun of 1167928 bytes
decoder debug: output chroma (kCVPixelFormatType): 420v
auhal warning: underrun of 5184 bytes
main warning: picture is too late to be displayed (missing 2186 ms)
main warning: resetting master clock: coefficient too unstable: 3.960983
auhal warning: underrun of 112 bytes
ts warning: discontinuity received 0xf instead of 0xd (pid=0)
ts error: libdvbpsi error (PSI decoder): TS discontinuity (received 15, expected 13) for PID 0
ts debug: PATCallBack called
ts warning: discontinuity received 0xf instead of 0xd (pid=4096)
ts error: libdvbpsi error (PSI decoder): TS discontinuity (received 15, expected 13) for PID 4096
ts debug: PMTCallBack called for program 1
main debug: EsOutProgramMeta: number=1
auhal warning: underrun of 224 bytes
auhal warning: underrun of 608 bytes
main debug: EsOutProgramMeta: number=1
auhal warning: underrun of 168 bytes
main debug: EsOutProgramMeta: number=1
ts warning: lost synchro
ts debug: skipping 157 bytes of garbage at 3126287080
ts debug: resynced at 3126287237
ts warning: discontinuity received 0xb instead of 0x8 (pid=258)
main debug: EsOutProgramMeta: number=1
ts warning: discontinuity received 0x9 instead of 0xb (pid=257)
ts warning: discontinuity received 0xf instead of 0x4 (pid=256)
auhal warning: underrun of 1152736 bytes
auhal warning: underrun of 5176 bytes
auhal warning: underrun of 728 bytes
auhal warning: underrun of 1448 bytes
auhal warning: underrun of 616 bytes
auhal warning: underrun of 608 bytes
auhal warning: underrun of 616 bytes
main warning: resetting master clock: coefficient too unstable: 3.791182
auhal warning: underrun of 280 bytes
auhal warning: underrun of 608 bytes
ts warning: discontinuity received 0x4 instead of 0x2 (pid=0)
ts error: libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 2) for PID 0
ts debug: PATCallBack called
ts warning: discontinuity received 0x4 instead of 0x2 (pid=4096)
ts error: libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 2) for PID 4096
ts debug: PMTCallBack called for program 1
main debug: EsOutProgramMeta: number=1
ts warning: lost synchro
ts debug: skipping 45 bytes of garbage at 3128312185
ts debug: resynced at 3128312230
ts warning: discontinuity received 0xa instead of 0x1 (pid=258)
main debug: EsOutProgramMeta: number=1
ts warning: discontinuity received 0x8 instead of 0x2 (pid=257)
decoder warning: vt session error: 'kVTVideoDecoderBadDataErr'
decoder warning: restarting vt session (dec callback failed)
decoder warning: forcing output chroma (kCVPixelFormatType): 420v
decoder debug: session accepted first frame 3972032001
decoder debug: output chroma (kCVPixelFormatType): 420v
main debug: control type=0
main warning: original picture size is undefined
main debug: toggling resume
Playing with VLC the playlist playlist_downloaded.m3u8
generated in TMP by twitch-dl
also runs perfectly no problems at all, so all the ts parts provided by Twitch are fine like it's expected from a professional platform.
The problem is caused by using binary concatenation and if not by converting later to mp4 by ffmpeg.
@ScrubN can you explain which method are you using to merge the ts parts into output.ts? Your program is doing it perfectly and it's not binary concatenation. DownloadHelper the same, perfect job.
ffmpeg
has errors using Concat protocol to merge certain parts (all the others merge perfectly fine):
ffmpeg -i "concat:388.ts|389.ts|390.ts|391.ts|392.ts" -c copy output_ffmpeg.ts
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
Input #0, mpegts, from 'concat:388.ts|389.ts|390.ts|391.ts|392.ts':
Duration: 00:00:50.00, start: 3942.032000, bitrate: 4576 kb/s
Program 1
Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 174 kb/s
Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 90k tbn
Stream #0:2[0x102]: Data: timed_id3 (ID3 / 0x20334449)
Output #0, mpegts, to 'output_ffmpeg.ts':
Metadata:
encoder : Lavf60.3.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 60 tbr, 90k tbn
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 174 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x15b804080] Packet corrupt (stream = 1, dts = 355607910). 0.0kbits/s speed=N/A
concat:388.ts|389.ts|390.ts|391.ts|392.ts: corrupt input packet in stream 1
[mpegts @ 0x15b804080] PES packet size mismatch
[mpegts @ 0x15b804080] Packet corrupt (stream = 0, dts = 355609050).
[mpegts @ 0x15a7130d0] AAC bitstream not in ADTS format and extradata missing
[mpegts @ 0x15b804080] Packet corrupt (stream = 1, dts = 356284440).
concat:388.ts|389.ts|390.ts|391.ts|392.ts: corrupt input packet in stream 1
[mpegts @ 0x15b804080] Packet corrupt (stream = 1, dts = 357208470).
concat:388.ts|389.ts|390.ts|391.ts|392.ts: corrupt input packet in stream 1
[mpegts @ 0x15b804080] Packet corrupt (stream = 1, dts = 357691410).
concat:388.ts|389.ts|390.ts|391.ts|392.ts: corrupt input packet in stream 1
frame= 2119 fps=0.0 q=-1.0 Lsize= 27889kB time=00:00:49.99 bitrate=4570.3kbits/s speed= 346x
video:26159kB audio:734kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.703758%
MPV detects the errors:
$ mpv output_ffmpeg.ts
(+) Video --vid=1 (h264 1920x1080 60.000fps)
(+) Audio --aid=1 (aac 2ch 48000Hz)
AO: [coreaudio] 48000Hz stereo 2ch floatp
VO: [libmpv] 1920x1080 yuv420p
AV: 00:00:08 / 00:00:50 (18%) A-V: 0.000
[ffmpeg/audio] aac: Input buffer exhausted before END element found
Error decoding audio.
[ffmpeg/audio] aac: SBR was found before the first channel element.
[ffmpeg/audio] aac: Multiple frames in a packet.
[ffmpeg/audio] aac: Sample rate index in program config element does not match the sample rate index configured by the container.
[ffmpeg/audio] aac: channel element 0.0 duplicate
Error decoding audio.
Invalid audio PTS: 9.179667 -> 10.033000
Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).
AV: 00:00:16 / 00:00:50 (33%) A-V: 0.000 ct: 0.860 Dropped: 43
Invalid audio PTS: 16.689000 -> 20.017000
AV: 00:00:16 / 00:00:50 (33%) A-V: 3.301 ct: 0.886 Dropped: 44
[ffmpeg/video] h264: error while decoding MB 45 60, bytestream -5
AV: 00:00:26 / 00:00:50 (53%) A-V: 0.349 ct: 3.842 Dropped: 199
Invalid audio PTS: 26.971667 -> 30.001000
AV: 00:00:26 / 00:00:50 (54%) A-V: 3.211 ct: 4.009 Dropped: 209
[ffmpeg/video] h264: Invalid NAL unit 0, skipping.
[ffmpeg/video] h264: error while decoding MB 48 61, bytestream -8
AV: 00:00:27 / 00:00:50 (54%) A-V: 3.128 ct: 4.401 Dropped: 213
Invalid audio PTS: 32.326333 -> 40.006333
Reset playback due to audio timestamp reset.
[ffmpeg/video] h264: co located POCs unavailable
[ffmpeg/video] h264: co located POCs unavailable
AV: 00:00:32 / 00:00:50 (64%) A-V: 0.000
[ffmpeg/video] h264: Invalid NAL unit 0, skipping.
AV: 00:00:32 / 00:00:50 (64%) A-V: 0.000
[ffmpeg/video] h264: cabac decode of qscale diff failed at 20 16
[ffmpeg/video] h264: error while decoding MB 20 16, bytestream 6
AV: 00:00:32 / 00:00:50 (65%) A-V: 0.000
Invalid video timestamp: 32.350000 -> 40.000000
AV: 00:00:49 / 00:00:50 (100%) A-V: 0.000
Exiting... (End of file)
It's ffmpeg that causes the bug, because the output.ts files generated by TwitchDownloader and DownloadHelper don't have the issue at that particular moment of video.
According to some users binary concatenation must not be used for TS, could get corrupt files: https://superuser.com/questions/692990/use-ffmpeg-copy-codec-to-combine-ts-files-into-a-single-mp4
@superbonaci Thanks for the investigation, did not have time to chime in until now. Just FYI, twitch-dl
does not concatenate vods manually, I pass the m3u8 playlist as input to ffmpeg. (source)
I pass the m3u8 playlist as input to ffmpeg)
Can you find the TwitchDownloader's code where it merges all the parts? Whatever is doing is the right way to do it.
I think this is the part, he's using ffmpeg after all to combine the parts, and doesn't seem to fail: https://github.com/lay295/TwitchDownloader/blob/master/TwitchDownloaderCore/VideoDownloader.cs#L382C1-L427C10
I think this is the part, he's using ffmpeg after all to combine the parts, and doesn't seem to fail:
That's just remuxing from mpegts to mp4. Further down the file is where the parts are concatenated. I have nearly entirely rewritten the entire vod downloader, I can promise you that I know how it works. https://github.com/lay295/TwitchDownloader/blob/master/TwitchDownloaderCore/VideoDownloader.cs#L663-L698
Yeah I already had realised. It's using native .NET Framework functions to combine the ts files into output.ts, and certainly it's not a binary concatenation. If we just could find the source code where the function is implemented so see how it works...
.NET Core is open source. https://source.dot.net/
ive also been having this problem, although im using the GUI version. granted the vod im trying to download is part of a subathon, therefore the filesize is massive so theres more chance for problems, but since i dont have much time left to grab it im really hoping for a fix soon :’)
ive also been having this problem, although im using the GUI version. granted the vod im trying to download is part of a subathon, therefore the filesize is massive so theres more chance for problems, but since i dont have much time left to grab it im really hoping for a fix soon :’)
What exact part or the whole process is that?
ive also been having this problem, although im using the GUI version. granted the vod im trying to download is part of a subathon, therefore the filesize is massive so theres more chance for problems, but since i dont have much time left to grab it im really hoping for a fix soon :’)
What exact part or the whole process is that?
sorry, could you elaborate? i dont know what you mean—
ive also been having this problem, although im using the GUI version. granted the vod im trying to download is part of a subathon, therefore the filesize is massive so theres more chance for problems, but since i dont have much time left to grab it im really hoping for a fix soon :’)
What exact part or the whole process is that?
sorry, could you elaborate? i dont know what you mean—
Do you have issues merging the ts parts, or converting output.ts to output.mp4, or your mp4 has playback issues. What problem do you have?
ive also been having this problem, although im using the GUI version. granted the vod im trying to download is part of a subathon, therefore the filesize is massive so theres more chance for problems, but since i dont have much time left to grab it im really hoping for a fix soon :’)
What exact part or the whole process is that?
sorry, could you elaborate? i dont know what you mean—
Do you have issues merging the ts parts, or converting output.ts to output.mp4, or your mp4 has playback issues. What problem do you have?
from what i remember (this was a few days ago and my short term memory is dogshit), the download had a couple of movenext issues (which i dont even know what that means) and then the output file was unplayable. i managed to find a workaround by downloading the vod in pieces, but given that theres like 30 more vods to download i really dont wanna have to do that for all of them ☠️
from what i remember (this was a few days ago and my short term memory is dogshit), the download had a couple of movenext issues (which i dont even know what that means) and then the output file was unplayable. i managed to find a workaround by downloading the vod in pieces, but given that theres like 30 more vods to download i really dont wanna have to do that for all of them ☠️
If you get the .ts parts or the output.ts that's it, you've got all you need. You can try also with twitch-dl
which has several options to keep the whole file and generates playlists for the parts.
from what i remember (this was a few days ago and my short term memory is dogshit), the download had a couple of movenext issues (which i dont even know what that means) and then the output file was unplayable. i managed to find a workaround by downloading the vod in pieces, but given that theres like 30 more vods to download i really dont wanna have to do that for all of them ☠️
If you get the .ts parts or the output.ts that's it, you've got all you need. You can try also with
twitch-dl
which has several options to keep the whole file and generates playlists for the parts.
so if i get a functioning output.ts, can i just change the file extension to mp4/mpeg4/whatever other filetype i need-?
from what i remember (this was a few days ago and my short term memory is dogshit), the download had a couple of movenext issues (which i dont even know what that means) and then the output file was unplayable. i managed to find a workaround by downloading the vod in pieces, but given that theres like 30 more vods to download i really dont wanna have to do that for all of them ☠️
If you get the .ts parts or the output.ts that's it, you've got all you need. You can try also with
twitch-dl
which has several options to keep the whole file and generates playlists for the parts.
update: tried it again, the mp4 is completely unplayable… should i like?? cancel the finalizing process after the output.ts is combined??? im stupid and i recognize that but what am i meant to do here to get a file that actually works—
(the file im downloading is about 126gb if that matters)
@6xolotl if you get the output.ts leave it like that until some software can convert it to mp4 without breaking it. It's the best you can do. You can download directly the m2ts file with Video Download Helper if you enable it in options.
TS files are designed to be concatenated in binary mode, that is raw, without any modification of its contents.
This is done by the Stream.CopyToAsync
method.