Video JSON: missing "files" field

I filed an issue [1] to the youtube-dl issue tracker concerning the JSON object returned on GET /videos/{id} and eventually I also solved the mentioned problem with a PR [2] to youtube-dl.

Even though the downloading problem has been solved, I don’t clearly understand the function of the "files" field on the root level of the JSON object and why it can be omitted/replaced with "files" fields in "streamingPlaylists" array.

Can somebody clarify this for me? Thanks!



.files corresponds to webtorrent compatible files (with faststart etc) whereas streamingPlaylists[].files are fragmented mp4 files used by HLS playlists.

Our webtorrent streaming library does not support fragmented mp4, that are necessary for HLS playlists. It’s the reason why we need 2 different type of files.

Oh, I see. Thank you! :slightly_smiling_face:

If I get it right, the generation of these two kinds of files can be controlled via the webtorrent.enabled and hls.enabled fields in the config/production.yaml on the server side and that’s the reason why the returned JSON may contain either only one of them or both.

Yep exactly :slight_smile: I’ll add a section in the documentation, because we need to correctly explain these settings.