{"guid":"f5d0b872-2142-4f1c-88a8-081429b87b1c","title":"Getting Your Hands Dirty with Video Output on Linux Using C++","subtitle":null,"slug":"froscon2025-3316-getting_your_hands_dirty_with_video_output_on_linux_using_c","link":"https://programm.froscon.org/2025/events/3316.html","description":"Most people will use some video app to obtain video output on Linux. But video\noutput is still generally steeped in mystery and viewed as a magic blackbox\namong the Linux community.  However the Lumiera team were confronted with having\nto examine the magic blackbox themselves.\n\nIn this talk we demonstrate several well established mechanisms that can be used\nto display video frames from a Linux desktop application.  We explain the technical\nprerequisites to display video frames, discuss the challenges and we show some\nwidely available technologies used to implement video display.\n\n\u003ci\u003eLumiera\u003c/i\u003e is a video editing application under development in C++ — which we\nuse here to illustrate how raw video output is at the heart of a video processing\nrender engine.\n\nMost video formats are compressed and packed into containers for performance and\nstorage reasons. To edit a video it is essential to use a video in a \u003ci\u003eraw format\u003c/i\u003e\nas a sequence of individual frames. Raw video is processed as \u003ci\u003ebuffers filled\nwith pixel data.\u003c/i\u003e The pixels are encoded with respect to some colour space, and\nthere are a variety of standard mechanisms available, which will be discussed\nin the talk.\n\nHandling raw video requires to access, process and transfer an enormous amount\nof data. While modern CPUs are more than capable of managing such tasks in real\ntime, modern special purpose hardware (GPU) is geared towards mastering these\nsteps with precision and speed. The downside is obviously that addressing the\nGPU requires hardware specific programming, i.e., slightly different software\nimplementations for the various GPUs on the market. Fortunately the variations\nof the hardware implementations can be accommodated by a software stack comprising\nvendor specific micro code, a driver in the kernel, and several layers of adaptor\nlibraries in userland.\n\nFor this talk we focus on displaying direct video output from a C++ application\nthat uses some long and well established standard frameworks that are widely\navailable not only on GNU/Linux, but on various Unix flavours:\n\u003cul\u003e\n\u003cli\u003eXVideo\u003c/li\u003e\n\u003cli\u003eSDL\u003c/li\u003e\n\u003cli\u003eOpenGL\u003c/li\u003e\n\u003cli\u003eVulkan\u003c/li\u003e\n\u003c/ul\u003e\n\nX Window System (aka X11, X) is a graphics protocol most widely used on Linux\nand even older than Linux itself. It has several implementations, e.g., Xorg\nserver. There is an extension to X to accommodate video output which is capable\nof using video hardware to achieve optimum output while not taxing the CPU. This\nis known as the X Video Extension (aka \"Xv\").\n\nThe X protocol specifies only primitive drawing features, so in addition to\nusing X other graphic layers can be used that provide the user with more\nhigh-level graphic tools: OpenGL and Vulkan.\n\nIn this talk we would like to present a bare-bone application in C++ to play and\ndisplay a sequence of raw video frames to illuminate the various aforementioned\nframeworks.\n\nLicensed to the public under http://creativecommons.org/licenses/by/4.0","original_language":"eng","persons":["Hermann Voßeler","mebenn"],"tags":["3316","2025","froscon2025","Development","HS 4","froscon2025-eng","Day 1"],"view_count":216,"promoted":false,"date":"2025-08-16T10:00:00.000+02:00","release_date":"2025-08-16T00:00:00.000+02:00","updated_at":"2026-04-06T19:15:06.420+02:00","length":3113,"duration":3113,"thumb_url":"https://static.media.ccc.de/media/events/froscon/2025/3316-f5d0b872-2142-4f1c-88a8-081429b87b1c.jpg","poster_url":"https://static.media.ccc.de/media/events/froscon/2025/3316-f5d0b872-2142-4f1c-88a8-081429b87b1c_preview.jpg","timeline_url":"https://static.media.ccc.de/media/events/froscon/2025/3316-f5d0b872-2142-4f1c-88a8-081429b87b1c.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/events/froscon/2025/3316-f5d0b872-2142-4f1c-88a8-081429b87b1c.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/froscon2025-3316-getting_your_hands_dirty_with_video_output_on_linux_using_c","url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_title":"FrOSCon 2025","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025","related":[],"recordings":[{"size":251,"length":3113,"mime_type":"video/webm;codecs=av01","language":"eng","filename":"froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_av1-hd.webm","state":"new","folder":"av1-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2025-08-16T14:21:55.553+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2025/av1-hd/froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_av1-hd.webm","url":"https://api.media.ccc.de/public/recordings/90147","event_url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025"},{"size":47,"length":3113,"mime_type":"audio/mpeg","language":"eng","filename":"froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2025-08-16T13:33:53.187+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2025/mp3/froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/90095","event_url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025"},{"size":29,"length":3113,"mime_type":"audio/opus","language":"eng","filename":"froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2025-08-16T13:33:12.991+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2025/opus/froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_opus.opus","url":"https://api.media.ccc.de/public/recordings/90087","event_url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025"},{"size":289,"length":3113,"mime_type":"video/webm","language":"eng","filename":"froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_webm-hd.webm","state":"new","folder":"webm-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2025-08-16T14:20:23.390+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2025/webm-hd/froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_webm-hd.webm","url":"https://api.media.ccc.de/public/recordings/90138","event_url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025"},{"size":112,"length":3113,"mime_type":"video/webm","language":"eng","filename":"froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2025-08-16T13:39:16.538+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2025/webm-sd/froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/90112","event_url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025"},{"size":101,"length":3113,"mime_type":"video/mp4","language":"eng","filename":"froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2025-08-16T13:33:18.676+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2025/h264-sd/froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_sd.mp4","url":"https://api.media.ccc.de/public/recordings/90088","event_url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025"},{"size":310,"length":3113,"mime_type":"video/mp4","language":"eng","filename":"froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2025-08-16T13:05:22.371+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2025/h264-hd/froscon2025-3316-eng-Getting_Your_Hands_Dirty_with_Video_Output_on_Linux_Using_C_hd.mp4","url":"https://api.media.ccc.de/public/recordings/90070","event_url":"https://api.media.ccc.de/public/events/f5d0b872-2142-4f1c-88a8-081429b87b1c","conference_url":"https://api.media.ccc.de/public/conferences/froscon2025"}]}