vlc audio video outputs
play

VLC audio/video outputs Linux.conf.au Multimedia & Music R emi - PowerPoint PPT Presentation

VLC audio/video outputs Linux.conf.au Multimedia & Music R emi Denis-Courmont VideoLAN project Auckland, 12th January 2015 Outline Pipeline Audio output Video output Forewords Pipeline Audio output Video output End Note well


  1. VLC audio/video outputs Linux.conf.au Multimedia & Music R´ emi Denis-Courmont VideoLAN project Auckland, 12th January 2015

  2. Outline Pipeline Audio output Video output

  3. Forewords Pipeline Audio output Video output End Note well The opinions hereby expressed represent the personal views of the author.

  4. Forewords Pipeline Audio output Video output End Attendees advisory • I speak fast. • I may not articulate adequately.

  5. Forewords Pipeline Audio output Video output End Attendees advisory • I speak fast. • I may not articulate adequately. Do interrupt me if needed.

  6. Forewords Pipeline Audio output Video output End Outline Pipeline Audio output Video output

  7. Forewords Pipeline Audio output Video output End Pipeline • defacto standard among multimedia frameworks • enforced by the specifications

  8. Forewords Pipeline Audio output Video output End Pipeline overview • byte stream reader • format parser • (packetizers) • decoders: audio, video, text

  9. Forewords Pipeline Audio output Video output End Pipeline overview • byte stream reader • format parser • (packetizers) • decoders: audio, video, text • filters • blending / overlay • outputs

  10. Forewords Pipeline Audio output Video output End Driving the pipeline • buffers here and there • rate control, drift compensation and lip sync

  11. Forewords Pipeline Audio output Video output End Outline Pipeline Audio output Video output

  12. Forewords Pipeline Audio output Video output End Buffers Media playback has audibly long buffers • avoids underruns due to scheduling: no stutter

  13. Forewords Pipeline Audio output Video output End Buffers Media playback has audibly long buffers • avoids underruns due to scheduling: no stutter • reduces (or even eliminates) periodic interrupts: lower power

  14. Forewords Pipeline Audio output Video output End Buffers Media playback has audibly long buffers • avoids underruns due to scheduling: no stutter • reduces (or even eliminates) periodic interrupts: lower power • unlike games and UIs: needs special support to avoid latency and glitches

  15. Forewords Pipeline Audio output Video output End Buffer requirements • Play-out latency estimate • Maintain lip synchronization • Control upstream pipeline rate • Drain or fill levels estimate: • Normal EOS without loosing last samples

  16. Forewords Pipeline Audio output Video output End Interactive requirements • Flush: user stop or exit • Pause/resume (some APIs cycle their playout buffer) • Volume and mute control • interactive volume control • per stream (not whole device!)

  17. Forewords Pipeline Audio output Video output End Misc. requirements • Device enumeration, hotplug events • Configuration and format negotiation

  18. Forewords Pipeline Audio output Video output End Common problems • confusing total latency and buffer usage (or no timing infos whatsoever), • no (glitch-free) pause/resume • no explicit drain and/or flush operations • device-wide volume controls only • no channels layout • missing or broken device management

  19. Forewords Pipeline Audio output Video output End JACK • specific constraints: • low latency • manually routing • always single precision • works around most of the requirements • not adequate for general use

  20. Forewords Pipeline Audio output Video output End ALSA - channels • channels count • hardware cap, not physical speakers setup • plug plugin drops extra channels silently

  21. Forewords Pipeline Audio output Video output End ALSA - channels • channels count • hardware cap, not physical speakers setup • plug plugin drops extra channels silently • channels map • not until recently (and not all drivers) • also not necessarily wired speakers • SW defaults to stereo with per-app knobs • digital output: similar problems

  22. Forewords Pipeline Audio output Video output End ALSA (cont’d) • no stream volume (and HW volume controls a big unabstracted mess)

  23. Forewords Pipeline Audio output Video output End ALSA (cont’d) • no stream volume (and HW volume controls a big unabstracted mess) • defective device management: • no hot plug/unplug events (and no udev integration) • confused channels and outputs

  24. Forewords Pipeline Audio output Video output End OSS • Questionable API design ( ioctl ) • Most outstanding functional issues fixed in version 4. • Mostly dead: last version 4.2 in 2010

  25. Forewords Pipeline Audio output Video output End sndio • Not Invented Here syndrome from OpenBSD • also RoarAudio server on Linux (almost dead) • each and every possible mistake

  26. Forewords Pipeline Audio output Video output End sndio • Not Invented Here syndrome from OpenBSD • also RoarAudio server on Linux (almost dead) • each and every possible mistake • OK, except per-stream volume

  27. Forewords Pipeline Audio output Video output End PulseAudio • Decent and well documented (seems to borrow from Windows Vista) • Some bugs, maintainance handed over poorly • Bonuses: live fail-over, stream meta infos

  28. Forewords Pipeline Audio output Video output End Overall • Low-latency and manual setup: JACK • Embedded: ALSA (without plugins) • All else: PulseAudio (I wish)

  29. Forewords Pipeline Audio output Video output End Outline Pipeline Audio output Video output

  30. Forewords Pipeline Audio output Video output End Requirements • YCbCr colour space • colour subsampling • more than 8-bits per component (very near future) • planar picture formar • scaling • blending (subs, overlay)

  31. Forewords Pipeline Audio output Video output End Goodies • filtering • deinterlacing • gamma correction • noise reduction (nice to have) • hardware decoding acceleration and pass-through?

  32. Forewords Pipeline Audio output Video output End Video output with X11 • base (+ MIT-SHM) • XVideo extension (+ MIT-SHM) • GLX extension • Render extension • VDPAU-X11 • VA-X11 • EGL-X11

  33. Forewords Pipeline Audio output Video output End Video output with Wayland • base • XVideo • (Wayland-EGL) • Wayland scaler ( wl s caler ) • VDPAU • VA-Wayland • Wayland-EGL

  34. Forewords Pipeline Audio output Video output End XVideo extension • originally meant for dedicated hardware overlay • no compositing, no blending • except with pixmaps support • inconsistent cropping • provided for backward compability • overdue for deprecation

  35. Forewords Pipeline Audio output Video output End Renger extension • roughly equivalent to wl s caler (but more boilerplate) • only RGB • only 8-bits per component

  36. Forewords Pipeline Audio output Video output End DRM • X11, Wayland, headless • hardware-dependant • not provided by, err, some drivers • intended for GL (and VA), not for applications (say Wayland/Weston developers)

  37. Forewords Pipeline Audio output Video output End VDPAU & VA • not vendor-neutral • VDPAU: AMD(Mesa), NVIDIA, Nouveau(Mesa) • VA: Intel OSC • XvBA: AMD(Catalyst) • high-depth coming? • vvvv ??

  38. Forewords Pipeline Audio output Video output End OpenGL • versions and extensions hell • shaders for colour space convesion • supports high-depth • code reuse on other platforms • interoperable with VDPAU

  39. Forewords Pipeline Audio output Video output End Overall • VDPAU or VA where applicable especially hardware-accelerated decoding • OpenGL • buggy drivers...

  40. Forewords Pipeline Audio output Video output End Thanks to VideoLAN for sponsporing most of the costs. Any questions?

Recommend


More recommend