Skip to content

Instantly share code, notes, and snippets.

View nikanar's full-sized avatar

Nikana nikanar

  • Montreal, Canada
View GitHub Profile
@iluxonchik
iluxonchik / jwplayer_downloader.py
Created December 14, 2017 08:38
Download JWPlayer .ts files, merge them into a single file and then convert the file to .mp4
"""
For my Neuroengineering course presentation my group wanted to download some videos,
the problem is that those videos were played by the JWPlayer, so obtaining the video
files was a little tricky. What I noticed from observing the network traffic is that
JWPlayer downloads the video files in chunks (each chunk was 4 seconds long) and
in .ts format. My goal was to combine all of those small video segments into a single
one and then convert the file to .mp4. To combine the multiple video chunks into one
I used the "cat" command and to convert resulting .ts file to .mp4 I used the "ffmpeg"
tool.