Giter Site home page Giter Site logo

scientiaetveritas / myslideslive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from so-cool/myslideslive

0.0 0.0 0.0 47 KB

Extract your SlidesLive presentation.

Home Page: https://so-cool.github.io/myslideslive

License: BSD 3-Clause "New" or "Revised" License

Python 27.62% Jupyter Notebook 72.38%

myslideslive's Introduction

mySlidesLive

...helps you to extract your SlidesLive presentation.

Licence Python PyPI Documentation

Install

pip install myslideslive

Usage

Python

In a Python console:

from myslideslive import SlidesLive

msl = SlidesLive('https://slideslive.com/38956531/'
                 'beyond-static-papers-'
                 'rethinking-how-we-share-scientific-understanding-in-ml')
msl.download_slides(slide=(1074, 1075))
msl.compose_video()

CLI

Directly from terminal:

msl --slide 1074 1075 \
https://slideslive.com/38956531/beyond-static-papers-rethinking-how-we-share-scientific-understanding-in-ml

Development

  • To develop this package you need nbdev.
  • The library (and Makefile) is built with nbdev_build_lib.
  • nbdev_update_lib updates the notebooks based on changes in the library.
  • The README.md is regenerated with nbdev_build_docs.
  • The git hooks are set up with nbdev_install_git_hooks.

Before commiting code changes make sure to run:

nbdev_install_git_hooks && \
nbdev_build_lib && \
nbdev_build_docs && \
nbdev_clean_nbs --clear_all True && \
nbdev_test_nbs

What about the SlidesLive video recording?

If you want to get the video recording of your SlidesLive presentation as well, youtube-dl can take care of that.

Cutting the video

Then you can cut the video with:

ffmpeg -i video_in.mp4 -ss [start] -t [duration] -c copy video_out.mp4

where [start] specifies the start time, e.g. 00:01:23.000 or 83 (in seconds); and [duration] specifies the duration in the same format. Alternatively to -t [duration], you may use -to [end], i.e.:

ffmpeg -i video_in.mp4 -ss [start] -to [end] -c copy video_out.mp4

NOTE: the order of ffmpeg flags seems to influence the precision of the video cut.

Picture-in-Picture embedding

To embed the video recording within the bottom-right part of the presentation video, preserving the audio stream from the former use:

ffmpeg -i embedded_video.mp4 -i main_video.mp4 \
  -filter_complex "[0] scale=iw/10:ih/10 [embed]; \
                   [1] fps=25 [bg]; \
                   [bg][embed] overlay=main_w-overlay_w:main_h-overlay_h" \
  -framerate 25 \
  -b:v 4810k \
  -b:a 126k \
  -ar 44100 \
  PiP_video.mp4

The sound stream is always taken from the first video in the input (-i) list; if you swap the input videos, you also need to swap [0] and [1] in the filter string (-filter_complex). To move the embedded video to a different position, you need to change the overlay parameter. For example, overlay=main_w-overlay_w:0 will place the embed in the top-right corner; overlay=0:0 in the top-left; and overlay=0:main_h-overlay_h in the bottom-left.

About

This Python module was inspired by:

PiP ffmpeg command comes from here.

myslideslive's People

Contributors

scientiaetveritas avatar so-cool avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.