HLS and jumpy videos

1,114 views
Skip to first unread message

Marcel

unread,
Feb 2, 2022, 5:20:11 PM2/2/22
to Video DownloadHelper Q&A
I had problems with videodownloadhelper creating jumpy videos for HLS sources and the problem seems to be more general as there are other threads on the subject. Often there are workaround solutions like using VLC to play the files (which often does not help) or to reencode files (which is not always a good idea). The fundemental problem however seems to be that VideodownloadHelper really creates brken mp4 files from HLS downloads, at least in certain circumstances. However by experimenting and looking around a bit, I found a better solution. in fact, by using an alternate HLS downlaoder, I did not have the jumpyness problem. However because that other downloader was poo in funtionality and did not work on many sites, that was not a solution. It however gave me a hint for a solution with videodownloadHelper. In fact, that other downloader created M"TS files, and not MP4 files. Now in VideodonloadHelper, there is an option to make it download HLS as M2TS files.  I tried that option, and behold, VideodownloadHelper now downloads HLS videos without jumpyness.
Now M2TS files are less conveniant than MP4 or MKV files. However you can use FFMPEG to repackage the files. Be sure however to just do a repackage, not a reencode. A reencode makes you loose quality and takes a lot more time.
E.g. using someting like ffmpg -i name.m2ts -c copy name.mp4

jcv...@gmail.com

unread,
Feb 3, 2022, 1:21:40 AM2/3/22
to Video DownloadHelper Q&A
thanks for the feedback !
jerome

The Lightworker

unread,
Apr 30, 2022, 12:43:03 PM4/30/22
to Video DownloadHelper Q&A
Hello,

I'm new to this forum, but I've been using VideoDownloadHelper for years and I'm happy with it, except of one thing: The obvious flaw when downloading HLS streams as MP4 (unfortunately that's set as default). Almost any video I downloaded via HLS to MP4 is jumpy and more or less unusable with any player I've tried it with, including  VLC.  To say it clearly: MP4 downloads from HLS streams create damaged video (and shouldn't be default, from my point of view, as long as this problem isn't  fixed).

I can confirm that the only reliable workaround with VDH  is downloading to M2TS and remuxing afterwards,  as suggest by Marcel. Jumpy video in already downloaded MP4 might be fixable by re-encoding, but each time I tried to do that I encountered masses of dropped just followed duped frames, which doesn't happen with M2TS and might indicate that something is wrong with the timestamps. I believe to see that VDH creates invalid timestamps upon muxing the MPEG- TS stream (provided by HLS) to MP4. It could be that this happens only if negative timestamps exist at the very beginning  of the stream (representing a constant stream delay). 

I found that Youtube-dl, using the URL revealed by the VDH creates valid results,  i.e. it doesn't produce jumpy videos.

Referring to threads on this forum  and Google searches it seems to me that VDH  has been aware of this problem for quite a while and I'm wondering, is this issue scheduled be fixed any time soon?

mig

unread,
May 2, 2022, 3:53:00 AM5/2/22
to Video DownloadHelper Q&A
There is indeed an issue with MP4 files generated from HLS streams. However as far as we experienced and users reported, the jumpiness happens only when the resulting video file is played on QuickTime. Players like VLC are able to auto-correct the file corruption.
There is a fix in progress but currently blocked by ffmpeg licensing issues. We have no release date for this fix to be published. Sorry.

Wild Willy

unread,
May 2, 2022, 4:22:17 AM5/2/22
to Video Download Helper Google Group
Licensing issues with ffmpeg? Is that what is holding up this?

https://groups.google.com/g/video-downloadhelper-q-and-a/c/S4K1QgvT-K4/m/sRCSmxmjAAAJ

What exactly is the licensing issue? You've always included your own build of ffmpeg in
VDH. What's the problem now?

mig

unread,
May 2, 2022, 4:37:22 AM5/2/22
to Video DownloadHelper Q&A
The licensing issue is that the coapp is GPL, hence using the GPL version of ffmpeg. But to allow downloading HLS directly from ffmpeg, you need to access HTTPS URLs (HTTP is now mostly obsolete) and the OpenSSH library, does not allow GPL. We tried changing the coapp license from GPL to LGPL but then a bunch of other libraries are not compatible anymore.
Message has been deleted

Sergey Sivushkin

unread,
Apr 25, 2023, 11:01:51 AM4/25/23
to Video DownloadHelper Q&A
Here is a powershell script to convert all downloaded videos from m2ts format in a folder to mp4. That fix the problem.
ffmpeg must be in system PATH.

$folder = "path to videos"
Get-ChildItem -Path $folder -Recurse -Filter *.m2ts | ForEach-Object {
    $target = $_.FullName -replace '\.m2ts$', '.mp4'
    & ffmpeg -y -i $_.FullName -c copy $target 2>&1 | Write-Host
}

Thanks!
Reply all
Reply to author
Forward
0 new messages