Madcap mediamosa still_generation

586 views

Published on

Presentation by Peter Forgacs from Madcap at the MediaMosa Community day november 25th at SURFnet

  • Be the first to comment

  • Be the first to like this

Madcap mediamosa still_generation

  1. 1. MULTIPLE STILL GENERATION IN MEDIAMOSA Peter Forgacs, Madcap English presentation
  2. 2. Introduction Who am I? Software developer at Madcap A developer of MediaMosa Hobby: Internet, Music, Game development
  3. 3. Introduction: MediaMosa Connection between assets and videos.
  4. 4. Introduction: MediaMosa Asset is a container. Asset
  5. 5. Introduction: MediaMosa Asset may have title, description etc. Asset Title Description DC, QDC fields
  6. 6. Introduction: MediaMosa Asset may have mediafiles. Asset Title Description Mediafile
  7. 7. Introduction: MediaMosa A mediafile may have a video. Asset Title Description Mediafile: Video (codec, filesize)
  8. 8. Introduction: MediaMosa We can transcode a mediafile to an other format. Asset Title Description Mediafile: Video (Original) Mediafile: Video (Transcoded)
  9. 9. Introduction: MediaMosa We can create an another mediafile (with video). Asset Title Description Mediafile: Video (Original) Mediafile: Video (Transcoded) Mediafile: Video (Original)
  10. 10. Introduction: MediaMosa Every mediafile may have still images. Asset Title Description Mediafile: Video (Original) Mediafile: Video (Transcoded) Mediafile: Video (Original)
  11. 11. Introduction: MediaMosa The asset has a default still (if there is any). Asset Title Description Mediafile: Video (Original) Mediafile: Video (Transcoded) Mediafile: Video (Original)
  12. 12. Introduction: MediaMosa A video sites has assets with default stills. Asset Title Desc. Asset Title Desc. Asset Title Desc. Asset Title Desc.
  13. 13. Introduction: MediaMosa A video page has an asset with video(s) and still(s). Asset Title Description
  14. 14. Main points Generate still Generate multiple stills Upload still Working with multiple stills
  15. 15. Introduction WLE WLE (White Label Ega) is a client side application for testing. We will use this software in this presentation.
  16. 16. A word without still images
  17. 17. A video without still images
  18. 18. People without faces The still images are the face of the videos.
  19. 19. Still type NONE
  20. 20. Still type NONE
  21. 21. REST interface, REST calls The REST interface is a communication channel between 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.
  22. 22. WLE REST interface
  23. 23. MediaMosa.org API page REST call: Parameters, Response fields, Examples http://mediamosa.org/api
  24. 24. MediaMosa.org API page REST call: Parameters, Response fields, Examples http://mediamosa.org/api
  25. 25. Still type NONE REST call mediafile/$mediafile_id/still/create POST: still_type=NONE (This is the default value)
  26. 26. Black still? Is it possible?
  27. 27. Black still? Is it possible? No, it isn't.
  28. 28. Black still? MediaMosa try to avoid unicolor (black, white, pink ...) images.
  29. 29. Black still - NO!
  30. 30. 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)
  31. 31. Still type NORMAL mediamosa/$mediafile_id/still/create [POST] still_type=NORMAL&still_per_mediafile=3
  32. 32. Black still check?
  33. 33. Black still check? Just for still type NONE.
  34. 34. Still type SECOND mediamosa/$mediafile_id/still/create still_type=SECOND&still_every_second=5
  35. 35. Padding Still default size, padding (YES, NO). still_type=NONE&h_padding=0&v_padding=15&size=352x288
  36. 36. 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
  37. 37. Still type SCENE mediamosa/$mediafile_id/still/create still_type=SCENE
  38. 38. 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.
  39. 39. Still type SCENE result
  40. 40. Uploading still images asset/$asset_id/still/upload mediafile_id=$mediafile_id
  41. 41. Uploading still result
  42. 42. Working with multiple stills Ordering Make default Delete
  43. 43. Ordering stills asset/$asset_id/still/order mediafile_id=$mediafile_id &still_id=$still_id &order=-3
  44. 44. Ordering stills
  45. 45. Make still as default asset/$asset_id/still/default mediafile_id=$mediafile_id &still_id=$still_id
  46. 46. Make still as default
  47. 47. Delete still Deleting from asset, from mediafile, or delete a unique still asset/$asset_id/still/delete POST: <nothing> or mediafile_id or still_id
  48. 48. Delete still
  49. 49. 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 named foo-001.jpeg, foo-002.jpeg, etc. Images will be rescaled to fit the new WxH values.
  50. 50. Summary Generate still Generate multiple stills * Normal * Second * Scene Upload still Working with multiple stills * Order * Set default * Delete
  51. 51. Videos with stills
  52. 52. Videos with stills
  53. 56. Questions? Thank you! Peter Forgacs [email_address]

×