Top Banner
MULTIPLE STILL GENERATION IN MEDIAMOSA Peter Forgacs, Madcap English presentation
56

Madcap mediamosa still_generation

Jan 21, 2015

Download

Documents

MediaMosa

Presentation by Peter Forgacs from Madcap at the MediaMosa Community day november 25th at SURFnet
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Madcap mediamosa still_generation

MULTIPLE STILL GENERATION IN MEDIAMOSA

Peter Forgacs, Madcap

English presentation

Page 2: Madcap mediamosa still_generation

Introduction

Who am I?

Software developer at Madcap

A developer of MediaMosa

Hobby: Internet, Music, Game development

Page 3: Madcap mediamosa still_generation

Introduction: MediaMosa

Connection between assets and videos.

Page 4: Madcap mediamosa still_generation

Introduction: MediaMosa

Asset is a container.

Asset

Page 5: Madcap mediamosa still_generation

Introduction: MediaMosa

Asset may have title, description etc.

Asset

TitleDescriptionDC, QDC fields

Page 6: Madcap mediamosa still_generation

Introduction: MediaMosa

Asset may have mediafiles.

Asset

TitleDescription

Mediafile

Page 7: Madcap mediamosa still_generation

Introduction: MediaMosa

A mediafile may have a video.

Asset

TitleDescription

Mediafile: Video (codec,filesize)

Page 8: Madcap mediamosa still_generation

Introduction: MediaMosa

We can transcode a mediafile to an other format.

Asset

TitleDescription

Mediafile: Video(Original)

Mediafile: Video(Transcoded)

Page 9: Madcap mediamosa still_generation

Introduction: MediaMosa

We can create an another mediafile (with video).

Asset

TitleDescription

Mediafile: Video(Original)

Mediafile: Video(Transcoded)

Mediafile: Video(Original)

Page 10: Madcap mediamosa still_generation

Introduction: MediaMosa

Every mediafile may have still images.

Asset

TitleDescription

Mediafile: Video(Original)

Mediafile: Video(Transcoded)

Mediafile: Video(Original)

Page 11: Madcap mediamosa still_generation

Introduction: MediaMosa

The asset has a default still (if there is any).

Asset

TitleDescription

Mediafile: Video(Original)

Mediafile: Video(Transcoded)

Mediafile: Video(Original)

Page 12: Madcap mediamosa still_generation

Introduction: MediaMosa

A video sites has assets with default stills.

Asset Title

Desc.

Asset Title

Desc.

Asset Title

Desc.

Asset Title

Desc.

Page 13: Madcap mediamosa still_generation

Introduction: MediaMosa

A video page has an asset with video(s) and still(s).

Asset

Title Description

Page 14: Madcap mediamosa still_generation

Main points

Generate still

Generate multiple stills

Upload still

Working with multiple stills

Page 15: Madcap mediamosa still_generation

Introduction WLE

WLE (White Label Ega) is a client side application for testing.

We will use this software in this presentation.

Page 16: Madcap mediamosa still_generation

A word without still images

Page 17: Madcap mediamosa still_generation

A video without still images

Page 18: Madcap mediamosa still_generation

People without faces

The still images are the face of the videos.

Page 19: Madcap mediamosa still_generation

Still type NONE

Page 20: Madcap mediamosa still_generation

Still type NONE

Page 21: Madcap mediamosa still_generation

REST interface, REST calls

The REST interface is a communication channelbetween the client application and the MediaMosa.

A REST call request can be GET or POST (PUT).- GET is for getting data from MediaMosa.- POST (PUT) is for changing data (eg. file upload).

The response is an XML about the status and the data.

Page 22: Madcap mediamosa still_generation

WLE REST interface

Page 23: Madcap mediamosa still_generation

MediaMosa.org API page

REST call: Parameters, Response fields, Exampleshttp://mediamosa.org/api

Page 24: Madcap mediamosa still_generation

MediaMosa.org API page

REST call: Parameters, Response fields, Exampleshttp://mediamosa.org/api

Page 25: Madcap mediamosa still_generation

Still type NONE REST call

mediafile/$mediafile_id/still/createPOST: still_type=NONE (This is the default value)

Page 26: Madcap mediamosa still_generation

Black still?

Is it possible?

Page 27: Madcap mediamosa still_generation

Black still?

Is it possible? No, it isn't.

Page 28: Madcap mediamosa still_generation

Black still?

MediaMosa try to avoid unicolor (black, white, pink ...) images.

Page 29: Madcap mediamosa still_generation

Black still - NO!

Page 30: Madcap mediamosa still_generation

Multiple stills

One still good, multiple stills are better.

Types - Normal (creating N stills from a video) - Second (creating stills in every N second) - Scene (creating stills, when the video has a scene change)

Page 31: Madcap mediamosa still_generation

Still type NORMAL

mediamosa/$mediafile_id/still/create [POST]still_type=NORMAL&still_per_mediafile=3

Page 32: Madcap mediamosa still_generation

Black still check?

Page 33: Madcap mediamosa still_generation

Black still check?

Just for still type NONE.

Page 34: Madcap mediamosa still_generation

Still type SECOND

mediamosa/$mediafile_id/still/createstill_type=SECOND&still_every_second=5

Page 35: Madcap mediamosa still_generation

Padding

Still default size, padding (YES, NO).

still_type=NONE&h_padding=0&v_padding=15&size=352x288

Page 36: Madcap mediamosa still_generation

Scene stills

Create stills on the video scene changes.

Requirements:

- Patch ffmpeg (NORMAL, SCENE too)

- lav2yuv: * Part of MJPEG Tools * apt-get install mjpegtools * MediaMosa status page

Page 37: Madcap mediamosa still_generation

Still type SCENE

mediamosa/$mediafile_id/still/createstill_type=SCENE

Page 38: Madcap mediamosa still_generation

I, robot

It is not easy to decide what is a scene change.The computer is not human.Is it a perfect tool? No, it doesn't.Accuracy ~70%. With our fixes ~80%.It is useful, if we know the advantages and disadvantages of scene stills.

Page 39: Madcap mediamosa still_generation

Still type SCENE result

Page 40: Madcap mediamosa still_generation

Uploading still images

asset/$asset_id/still/uploadmediafile_id=$mediafile_id

Page 41: Madcap mediamosa still_generation

Uploading still result

Page 42: Madcap mediamosa still_generation

Working with multiple stills

Ordering

Make default

Delete

Page 43: Madcap mediamosa still_generation

Ordering stills

asset/$asset_id/still/ordermediafile_id=$mediafile_id&still_id=$still_id&order=-3

Page 44: Madcap mediamosa still_generation

Ordering stills

Page 45: Madcap mediamosa still_generation

Make still asdefault

asset/$asset_id/still/defaultmediafile_id=$mediafile_id&still_id=$still_id

Page 46: Madcap mediamosa still_generation

Make still as default

Page 47: Madcap mediamosa still_generation

Delete still

Deleting from asset,from mediafile,or delete a unique still

asset/$asset_id/still/deletePOST:<nothing> ormediafile_id orstill_id

Page 48: Madcap mediamosa still_generation

Delete still

Page 49: Madcap mediamosa still_generation

FFmpeg tricks

Creating multiple stills without using MediaMosa (and without patching ffmpeg).

For extracting images from a video:

ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg

This will extract one video frame per second from the video and will output them in files namedfoo-001.jpeg, foo-002.jpeg, etc.Images will be rescaled to fit the new WxH values.

Page 50: Madcap mediamosa still_generation

Summary

Generate still

Generate multiple stills * Normal * Second * Scene

Upload still

Working with multiple stills * Order * Set default * Delete

Page 51: Madcap mediamosa still_generation

Videos with stills

Page 52: Madcap mediamosa still_generation

Videos with stills

Page 53: Madcap mediamosa still_generation
Page 54: Madcap mediamosa still_generation
Page 55: Madcap mediamosa still_generation
Page 56: Madcap mediamosa still_generation

Questions?

Thank you!

Peter [email protected]