# Multiview Decoding in Libavcodec and FFmpeg CLI > [! note]- > The content of this page is generated by audio/video transcription and text transformation from the content and links of this source. Source: [https://fosdem.org/2025/schedule/event/fosdem-2025-6023-multiview-decoding-in-libavcodec-and-ffmpeg-cli/](https://fosdem.org/2025/schedule/event/fosdem-2025-6023-multiview-decoding-in-libavcodec-and-ffmpeg-cli/) <video src="https://video.fosdem.org/2025/k3401/fosdem-2025-6023-multiview-decoding-in-libavcodec-and-ffmpeg-cli.av1.webm" controls></video> ## Summary & Highlights: This session at FOSDEM 2025, presented by Anton Khirnov, delves into the recent advancements in multiview decoding within the libavcodec library, part of the FFmpeg project. The focus is on decoding multiview HEVC (MV-HEVC) video, which is essential for stereoscopic 3D applications. The talk covers the technical implementation details, the associated support in the FFmpeg CLI transcoder, and the implications of these developments for future video processing capabilities. **Introduction to Multiview Decoding** The session introduces the concept of multiview video, explaining its significance in video encoding, particularly for stereoscopic 3D. Multiview involves encoding multiple video streams that are semi-independent but share redundancies, which can be optimized to reduce bitrate. **Technical Implementation** The implementation of multiview decoding in libavcodec involves significant changes to the HEVC decoder. The work includes restructuring the decoder to handle multiple layers and contexts, improving frame output logic, and ensuring compatibility with existing APIs. **Challenges and Solutions** Anton Khirnov discusses the challenges faced during the implementation, such as updating frame threading to support multiple output frames per packet and handling multilayer properties dynamically. The session also highlights the use of new APIs to simplify code and improve performance. **Applications and Future Prospects** The advancements in multiview decoding open new possibilities for video applications, including VR and 3D video. The session concludes with a discussion on potential future developments and the importance of these innovations for the broader video processing community. ## Importance for an eco-social transformation The advancements in multiview decoding are significant for eco-social transformation as they enable more efficient video processing, reducing the computational resources required for stereoscopic 3D and other complex video formats. This efficiency can contribute to lower energy consumption in video streaming and processing, which is crucial for sustainable digital practices. For eco-social designers, these tools can be applied to create immersive and interactive media experiences that promote environmental awareness and social change. However, challenges remain in ensuring widespread adoption and compatibility with existing systems, as well as addressing potential ethical concerns related to privacy and data security in video applications. ## Slides: | | | | --- | --- | | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_001.jpg\|300]] | The first slide introduces the topic of multiview decoding in libavcodec and FFmpeg CLI, presented by Anton Khirnov from FFLabs at FOSDEM 2025. It sets the stage for a technical discussion on implementing multiview HEVC video decoding. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_002.jpg\|300]] | This slide explains what multiview video is, highlighting its importance in encoding multiple video streams for applications like stereoscopic 3D, where different views are encoded efficiently to reduce redundancy. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_003.jpg\|300]] | The slide describes MV-HEVC, a method for packing multiple semi-independent video streams within a single HEVC bitstream. It is based on multi-layer extensions and supports up to 63 layers, though only two layers are supported in this implementation. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_004.jpg\|300]] | The slide outlines why MV-HEVC is important, particularly for stereoscopic 3D and other multi-layer features like alpha. It challenges existing assumptions and requires updates to video processing workflows to handle multiple output frames and streams. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_005.jpg\|300]] | This slide discusses the implementation challenges in the HEVC decoder, particularly the need to manage state per layer rather than globally. It critiques common approaches that obfuscate code and emphasizes the importance of clear structuring. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_006.jpg\|300]] | The slide continues discussing HEVC decoder challenges, focusing on distinguishing global from per-layer state, updating frame output logic, and the efficiency of frame threading for multiview decoding. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_007.jpg\|300]] | This slide addresses challenges in avcodec generic code, particularly the need for multiple output frames per input packet and the transition from a simple API to a more flexible receive_frame API, supported by refstruct. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_008.jpg\|300]] | The slide highlights public API challenges, such as communicating multilayer properties to callers and allowing view selection through callbacks, with frames containing side data indicating their view. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_009.jpg\|300]] | This slide presents a general overview of the FFmpeg CLI transcoding pipeline, illustrating how input streams are processed through various decoding and encoding stages, including filtergraphs and stream copying. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_010.jpg\|300]] | The slide outlines goals for a multithreading project from 2022-2024, aiming to align code structure with data flow, separate components into standalone objects, and improve throughput and CPU utilization. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_011.jpg\|300]] | This slide reports the status of the multithreading project, noting that most work has been merged for version 7.0, with improvements in standalone decoders and filtergraph chaining. | ![[FOSDEM 2025/assets/Multiview-decoding-in-libavcodec-and-ffmpeg-CLI/preview_012.jpg\|300]] | The final slide covers multiview support in the FFmpeg CLI, detailing native support for selecting views by ID, index, or position, and the potential for generalizing these capabilities to other features like closed captions. ## Links [FFmpeg project homepage](https://ffmpeg.org) [Video recording (AV1/WebM) - 83.9 MB](https://video.fosdem.org/2025/k3401/fosdem-2025-6023-multiview-decoding-in-libavcodec-and-ffmpeg-cli.av1.webm) [Video recording (MP4) - 639.5 MB](https://video.fosdem.org/2025/k3401/fosdem-2025-6023-multiview-decoding-in-libavcodec-and-ffmpeg-cli.av1.mp4) [Video recording subtitle file (VTT)](https://video.fosdem.org/2025/k3401/fosdem-2025-6023-multiview-decoding-in-libavcodec-and-ffmpeg-cli.vtt) [Chat room(web)](https://fosdem.org/2025/chat/web) [Chat room(app)](https://fosdem.org/2025/chat/app) [Submit Feedback](https://fosdem.org/2025/feedback)