64bit/Mediaplayer

From kJams Wiki
Jump to navigation Jump to search

Requirements

Deliverable

Using Qt Widgets & C++, you will create a cross-platform layer-compositing media player with these features:

  • create layered compositing pipeline (with transparency) that can consume video, graphics (32bit, and 4bit), and text (using my existing structures, but implemented in Qt) (kinda done but it's not HW accelerated, see below)
  • uses hardware decode for h.264 (i realize this may be an issue if working within a VM, we will have to figure this out)
  • uses hardware acceleration for playback for all code paths (openGL or native both mac and windows, user selectable depending on best performance)
  • has a transparent window background (for when no movie or video is shown) (ie: you can SEE the desktop in the background, and when playing media that has transparency, you can see behind it to the desktop)
  • allows three or more layers: background color (optionally transparent), Optional video (h.264), zero or more optional animated graphics (with transparency) (these may be 8 bit or 32bit) (again this is done but it's not fast)
  • animated graphic layer may be drawn into during playback real-time (text / bitmaps etc), eg: scrolling text along bottom
  • plays at HD size at 60fps even with video plus graphics
  • animation sources are "pull" model: polled at best frame rate, told what time to produce
  • all audio types (mp3, AAC, mp4, whatever else) decoded to PCM on disk, with callback to user space for optional realtime modification of audio stream as PCM eg: key changing, volume)
  • audio layer(s) may be composed into the output audio stream (from multiple PCM streams)
  • final composed video may be “split” and sent to more than one final window or window pane simultaneously (without degrading frame rate, ie: keep texture on GPU, reference from multiple windows)
  • ability to capture final composed video / audio and compress to h.264: this does NOT need to be realtime, nor displayed on screen, but must be able to be run on a background thread, with progress info sent to main thread, so as not to block UI operations
  • ability to load png files (with transparency) into CPixels class, display via pipeline (done)
  • implement "about kjams" rotating rainbow graphic, using pipeline (see reference app for how it looks) (works now but slow)
  • bonus (not required): actually implement high quality independent key and tempo changing
  • bonus (not required): volume normalizer (for when playing audio, make it sound like an average relative volume)

In the provided VM

  • you will have my already-working shell program which has:
    • preliminary menus and windows
    • “video” window shell where you will be displaying the video content, with preliminary code that plays a movie file (keep in mind that the final texture you show in the video window should be able to be shown in a frame in another window)
  • The reference app (kJams Pro) is already installed in the VM.


The Point of this project is to basically re-creating the kJams app functionality in Qt (64bit). This reference app already implements software playback version of what is described above (in a 32bit app).

Oops I forgot one thing

You will need to install the K-Lite codec pack to get h.264 playback. Later I'll be switching to using the built-in decoder, but that won't be ready until Qt 5.13, according to this bug report and the ensuing comments.

Milestones

10% payout at each milestone, with rest of payout at end / upon final acceptance

  1. playback of h.264 video (no audio) through compositing engine (with eg: composed text overlay)
  2. audio decompressed from video / mp3 into PCM, PCM played separately in sync with video (volume controller may be connected as proof of concept)
  3. transparent window (must implement both mac and windows)
  4. playback of composed text & graphics with transparency (so text / graphics appear to show on top of desktop or window that is behind video window (all done with hardware accell, eg: OpenGL)
  5. ability to capture final audio / video and re-compress to new h.264 file
  6. rest of work / finishing touches.