Preview Paper-edit video

Component/part description

Implementations Options considered

BBC Video context "EDL JSON"

BBC Video context previously video compositor.

Preview/ BBC Video compositorarrow-up-right

This is the sequence taken in by tge BBC video compositor to be able to render a video preview in canvas. It takes two tracks, but for our porpuses we can just pass one track. Needs adding type “video”, change startTime to start. And add duration instead of endTime.

Popcorn js

Vanilla js

Two players

Various options see jsfiddle example. Overall popcornjs altho deprecated, was the smoothest one.

Option: PopcornJS preview sequence.

Downside is that it creates canvas(?) and need to re-implement “video” controls for preview as well as progress bar etc.. becomes a very involved component.

It uses Canvas?

JSfiddle: https://jsfiddle.net/pietrops/0adkfke9/arrow-up-right Not working, coz no popcorn js CDN but code is correct.

Documentation https://github.com/mozilla/popcorn-docs/blob/gh-pages/modules/_posts/2012-12-12-sequence.mdarrow-up-right

Option: HTML5 Video

JSfidde: https://jsfiddle.net/pietrops/q9uwtdee/arrow-up-right Description: a plain vanilla javascript that makes the most of the HTML5 Video element to play a sequence of video segments continuosly, where src, inp point and out point are specified. Notes: Needs refactoring to remove side effects from methods.

→ Option: HTML5 Video - media fragment

JSFiddle: https://jsfiddle.net/pietrops/dyxpws41/arrow-up-right HTML5 Video Play sequence of video segments using format http://solutions.brightcove.com/bcls/assets/videos/Bird_Titmouse.mp4#t=2,4arrow-up-right

More on media fragments: https://youtu.be/LfRRYp6mnu0arrow-up-right

https://www.html5rocks.com/en/tutorials/video/basics/arrow-up-right

Webm example for nwjs (nwjs does not support mp4)

Issue: flicker white in between videos

https://stackoverflow.com/questions/26670048/video-flicker-once-upon-change-of-sourcearrow-up-right

https://stackoverflow.com/questions/32843507/html5-play-movie-from-multiple-parts-without-flashing-screenarrow-up-right

Issue sometimes it says src undefined. I think I needs some if counter < videosequence.kength

Improved version : https://jsfiddle.net/pietrops/u5usa10f/arrow-up-right using setTimeout

Version with namespace https://jsfiddle.net/pietrops/98b07h4m/arrow-up-right

→ Version with pause state object to resume from paused point within clip segment https://jsfiddle.net/pietrops/kus10b48/arrow-up-right Relies on adding vars to window object.

HML5 video API https://www.w3.org/2010/05/video/mediaevents.htmlarrow-up-right Option: client side ffmpeg video concat https://bgrins.github.io/videoconverter.js/arrow-up-right

Option: moviemasher

It’s in angular tho http://www.moviemasher.com/arrow-up-right http://www.moviemasher.com/demo/arrow-up-right http://www.moviemasher.com/docs/arrow-up-right

Option: BBC HTML5 Video compositor

https://github.com/bbc/html5-video-compositorarrow-up-right

https://github.com/bbc/html5-video-compositor/wiki/Quick-Start-Guidearrow-up-right

https://github.com/bbc/html5-video-compositor/wiki/Playlistsarrow-up-right

EDL Json / playlist:

Media source:

However this is now deprecated in favour of BBC video context.

Option: BBC Video Context

https://github.com/bbc/videocontextarrow-up-right

Some more research has been done

https://github.com/bbc/VideoContext/issues/42#issuecomment-296155545arrow-up-right

To try and add as script tag while figure out how to include in browserify. Add it in nwjs folder and reference from there. With just /

Current implementation

Data structures in view components.

Data structures in paper-edit view components

What needs refactoring

Last updated