abcthings / vimeo-audio-video Goto Github PK
View Code? Open in Web Editor NEWDownload segmented video from Vimeo
Download segmented video from Vimeo
hi great tool, thx.
only dowsnside is that the joining of the audio and video files with ffmpeg takes too long and is very cpu heavy.
the easier and faster way is to use mkvmerge, with this it will only take a few secs to join the files.
install mkvmerge on mac with brew: https://formulae.brew.sh/cask/mkvtoolnix
print('Combining video and audio...')
cmd = 'mkvmerge -o ' + output_file
cmd += ' '
cmd += filenameAudio
cmd += ' '
cmd += filenameVideo
Looks like vimeo may have changed it's URL format a bit. Here's an example master.json URL:
https://64vod-adaptive.akamaized.net/exp=1611093556~acl=%2F1067c142-d328-4648-9f98-cd17b940bd5f%2F%2A~hmac=dbe84d80b267aaf41180a01f8c7a90cf19f2e690e84d413995cb87cd76a1ef58/1067c142-d328-4648-9f98-cd17b940bd5f/sep/video/c0539fd6,0bc94fd1,2b5b55b0,e76f545f,c018328e/audio/3e2c571b,d0179731/master.json?base64_init=1
Notice, there are now multiple video segments separated by commas. The Vimeo player looks to be fetching a URL that looks like this:
https://64vod-adaptive.akamaized.net/exp=1611095880~acl=%2F1067c142-d328-4648-9f98-cd17b940bd5f%2F%2A~hmac=0b4e80ea6e3cfc519280d0d8e104f2ddbf7b0909d26412bb9d45561023a93563/1067c142-d328-4648-9f98-cd17b940bd5f/sep/video/0bc94fd1/chop/segment-1.m4s
However, in the python script the 'segment_url' being extracted is not the same as above, and results in a 404:
https://64vod-adaptive.akamaized.net/exp=1611093556~acl=%2F1067c142-d328-4648-9f98-cd17b940bd5f%2F%2A~hmac=dbe84d80b267aaf41180a01f8c7a90cf19f2e690e84d413995cb87cd76a1ef58/1067c142-d328-4648-9f98-cd17b940bd5f/sep/video/c0539fd6,0bc94fd1,2b5b55b0,e76f545f,c018328e/audio/e76f545f/chop/segment-1.m4s
Base url: https://64vod-adaptive.akamaized.net/exp=1611093556~acl=%2F1067c142-d328-4648-9f98-cd17b940bd5f%2F%2A~hmac=dbe84d80b267aaf41180a01f8c7a90cf19f2e690e84d413995cb87cd76a1ef58/1067c142-d328-4648-9f98-cd17b940bd5f/sep/video/c0539fd6,0bc94fd1,2b5b55b0,e76f545f,c018328e/audio/e76f545f/chop/
Saving VIDEO to video_e76f545f.mp4
0%| | 0/1221 [00:00<?, ?it/s]not 200!
<Response [404]>`
The app should check before doing any further step if ffmpeg is available on host computer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.