-
Notifications
You must be signed in to change notification settings - Fork 21
Nginx_http_mp4 module for pseudo cutting on Debian
#Nginx_http_mp4 module for pseudo cutting on Debian
The idea would be to radically simplify video cutting for devrooms, possibly even for main tracks using pseudo streaming and pseudo cutting. If we pull this off, we gain basic level cutting. No staff involvement required during the conference, and hardly any afterwards at all. No heavy extra task on the devroom manager's shoulders during the conference either, as this person can distribute the load. So read on...
Ideally, we dump one file per room per day, something like http://video.fosdem.org/2017/aw1125_saturday.mp4 . Multiple partial ones would also work in case of calamities).
Then we provide a simple html page in git(hub) per room per day, containing talk titles and the url to the mp4 with empty start & stop time. One line could look like:
The new and shiny devnull backup system, prof. dr. P. Withfire
Next step is we delegate all permissions to this entire repo (including granting extra access rights) to all devroom managers. We could also have trusted video volunteers (like djnamurlug) handle main tracks and lightning talks.
The resulting pseudocut urls could be into the main website and/or video.fosdem.org. They play in any modern browser without any plugin. They are also trivial to wget should we want to physically split up the files after the pseudocut urls have ceased (for use on video mirrors for example?).
##Caveats It is critical to have reliable PiP dumps for all rooms in order for this to work. The text file is flexible enough to cut full tracks from partial files except for the talk divided by the gap. It is absolutely critical though for the two video sources to be somewhat in sync.
Not 100% related to this problem, but.. Some people will be unhappy we are recording everything in their room. We might want to try and accomodate some of them in some way at the source. Like a sheet of cardboard in front of the camera, saying "Sorry, this is a closed conversation for a good reason.".
A full, seekable mp4 is only available at the end of a period. It needs to be made seekable in the exact right way and put into a place accessible to the people involved. That is trivially simple, fast, and it's possible to automate it entirely.
##Feedback I've thoroughly asked one devroom manager for his opinion. He's absolutely in favour. And I don't think is because he thought that would increase his chances to get a devroom again this year :-) --Mark
##Build the nginx http_mp4 module
Get the tools:
apt-get install dpkg-dev
Get the source:
apt-get source nginx
Get the build deps:
apt-get build-dep nginx
Make the http_mp4 module build config changes:
cd nginx-1.10.1 vi debian/rules > --with-http_mp4_module
Note: make this change at the bottom of the --with config
bits, or it will get confused
Build the updated package:
dpkg-buildpackage -b
##Install the package and verify
cd ~ dpkg -i nginx-full nginx -V | grep mp4
##Configure a directory for video serving
vi /etc/nginx/sites-enabled/default
Add a location other than the default one for video:
location /video/ { mp4; mp4_buffer_size 1m; mp4_max_buffer_size 5m; mp4_limit_rate on; mp4_limit_rate_after 30s; }
##Optimise a video for seeking
qt-faststart foo.mp4 bar.mp4
Might also want to have a second pass with -movflags faststart
http://stackoverflow.com/questions/8061798/post-processing-in-ffmpeg-to-move-moov-atom-in-mp4-files-qt-faststart
...and drop it in whatever location you defined for video ...