SlideShare a Scribd company logo
1 of 10
Download to read offline
GStreamer
Black Magic and Witchcraft
--what it is not--
Marc Leeman
Barco Networking Division
Content
● Goal
● Introduction
● Common misconceptions
● Fun and Games
● Development
Goal
● The presentation should allow the audience to
leave the room and start playing with it
○ No fancy products
○ No hocus-pocus with hardware acceleration
○ No real-life examples
○ Really, nothing useful...
Introduction
● What is GStreamer
○ set of libraries with a couple of example
programs
○ highly configurable
○ streaming framework, modular
■ autoplugging
■ dynamic loading
■ caps, incremental buildup pipeline,
visualisation of procedure, ...
Common misconceptions
● GStreamer is slow
○ Pretty harmless: educate them
○ Performance issues are mostly due to bugs (e.g.
alsa, h.264 parsing, …)
● GStreamer is not for embedded
○ Stuck in the previous century?
○ Axis encoders, cell phones, Settop boxes, ...
Basic Tools
● What GStreamer instance do I have?
○ (jhbuild)marc@drd1812:~$ gst-inspect-1.0 |grep barco
○ barcortp: rtpsink: RtpSink
○ barcortp: rtpsrc: rtpsrc
○ barco: edgeblend: EdgeBlend
○ barco: vbcpsrc: VBCP client source
○ (jhbuild)marc@drd1812:~$ gst-inspect-1.0 rtpsink
○ Factory Details:
○ Rank: none (0)
○ Long-name: RtpSink
○ Klass: Generic/Bin/Sink
○ Description: Barco Rtp sink
○ Author: Thijs Vermeir <thijs.vermeir@barco.com>, Marc Leeman <marc.leeman@barco.com>, Paul Henrys
<visechelle@gmail.com>
○
○ Plugin Details:
○ Name: barcortp
○ Description: Barco RTP Plugins
○ Filename: /home/marc/gstreamer.jhbuild/build/lib/gstreamer-1.0/libgst-plugins-barcortp.so
○ Version: 1.0.0.11.1
○ License: LGPL
○ Source module: gst-plugins-barcortp
○ Binary package: Barco
○ Origin URL: http://www.barco.com/
….
● Experiment with gst-launch
Fun and Games
● Get a copy of GStreamer 1.x
○ apt-get install …
○ make menuconfig && make (hardcore)
● Here we go…
● Capture from the V4L2 interface, and show
○ $ gst-launch-1.0 v4l2src ! videoconvert ! xvimagesink
● Scale the video
○ $ gst-launch-1.0 v4l2src ! videoscale ! video/x-raw, width=640, height=360 ! videoconvert !
xvimagesink
● Do both
○ gst-launch-1.0 v4l2src ! tee name=t t. ! queue ! videoscale ! video/x-raw, width=640, height=360 !
videoconvert ! xvimagesink t. ! queue ! videoconvert ! videoflip method=2 ! xvimagesink
Fun and Games
● What is happening here?
○ gst-launch-1.0 v4l2src ! tee name=t t. ! queue ! videoscale ! video/x-raw, width=640, height=360 !
videoconvert ! xvimagesink t. ! queue ! videoconvert ! videoflip method=2 ! videocrop left=400
right=400 ! xvimagesink
● Capture red colour, live
○ gst-launch-1.0 v4l2src ! tee name=t t. ! queue ! videoscale ! video/x-raw, width=640, height=360 !
videoconvert ! xvimagesink t. ! queue ! videoflip method=2 ! videocrop left=400 right=400 ! alpha
method=custom target-r=245 target-g=0 ! videoconvert ! xvimagesink
● Use camera and overlay “snow in a box”
○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x-
raw,width=1280,height=720 ! videoconvert ! ximagesink sync=0 videotestsrc pattern=snow
timestamp-offset=3000000000 ! "video/x-raw,format=AYUV,width=640,height=480,framerate=
(fraction)30/1" ! timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 ! videoconvert ! mixer.
Fun and Games
● What about other formats?
○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x-raw,
width=1280,height=720 ! videoconvert ! fpsdisplaysink sync=0 videotestsrc timestamp-
offset=3000000000 horizontal-speed=1 ! "video/x-raw,format=AYUV,width=640,height=480,
framerate=(fraction)30/1" ! timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 !
videoconvert ! mixer.
● Something more nerdy?
○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x-raw,
width=1280,height=720 ! videoconvert ! fpsdisplaysink sync=0 filesrc
location=/home/marc/battlestar.galactica.blood.and.chrome.2012.1080p.bluray.x264-geckos.mkv !
decodebin ! videoconvert ! videoscale ! "video/x-raw,format=AYUV,width=640,height=480" !
timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 ! videoconvert ! mixer.
● More work
○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x-raw,
width=1280,height=720 ! videoconvert ! fpsdisplaysink sync=0 filesrc
location=/home/marc/battlestar.galactica.blood.and.chrome.2012.1080p.bluray.x264-geckos.mkv !
decodebin ! videoconvert ! videoscale ! "video/x-raw,format=AYUV,width=640,height=360" !
timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 ! videoconvert ! mixer.
Development
● Develop against git master
○ lots-a-fixes, lots-a-features
○ cooperation on IRC
○ avoid fixing something that was fixed
○ jhbuild (cerbero): standalone development
environment, free from system configuration
○ 0.10 is dead, long live 1.0
● Runs on lots-a OSes (Linux, OSX, Windows) on
lots-a architectures
○ Active development is mostly done in Linux
○ There is hardware impact

More Related Content

Similar to What's inside 09 2013: gstreamer: black magic and witchcraft

Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalMichalis Kamburelis
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON
 
Frame accurate video client in the browser
Frame accurate video client in the browserFrame accurate video client in the browser
Frame accurate video client in the browserJordi Cenzano
 
Hacking with Pictures - Hack.LU 2014
Hacking with Pictures - Hack.LU 2014Hacking with Pictures - Hack.LU 2014
Hacking with Pictures - Hack.LU 2014Saumil Shah
 
HTML5 Multimedia Accessibility
HTML5 Multimedia AccessibilityHTML5 Multimedia Accessibility
HTML5 Multimedia Accessibilitybrucelawson
 
VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)Igalia
 
Cranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhoneCranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhoneNoel Llopis
 
Headless Android at AnDevCon3
Headless Android at AnDevCon3Headless Android at AnDevCon3
Headless Android at AnDevCon3Opersys inc.
 
Functional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformFunctional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformKiwamu Okabe
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images44CON
 
Keep Calm and Stegosploit - 44CON 2015
Keep Calm and Stegosploit - 44CON 2015Keep Calm and Stegosploit - 44CON 2015
Keep Calm and Stegosploit - 44CON 2015Saumil Shah
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
Martin Naumann "Life of a pixel: Web rendering performance"
Martin Naumann "Life of a pixel: Web rendering performance"Martin Naumann "Life of a pixel: Web rendering performance"
Martin Naumann "Life of a pixel: Web rendering performance"Fwdays
 
4Developers 2015: Gamedev-grade debugging - Leszek Godlewski
4Developers 2015: Gamedev-grade debugging - Leszek Godlewski4Developers 2015: Gamedev-grade debugging - Leszek Godlewski
4Developers 2015: Gamedev-grade debugging - Leszek GodlewskiPROIDEA
 
First steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROSFirst steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROSSergey Matyunin
 
Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11John Wilker
 
Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Jean-Philippe Doiron
 
mmsys2019 live streaming at scale
mmsys2019 live streaming at scalemmsys2019 live streaming at scale
mmsys2019 live streaming at scaleJordi Cenzano
 

Similar to What's inside 09 2013: gstreamer: black magic and witchcraft (20)

Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in Pascal
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
 
Frame accurate video client in the browser
Frame accurate video client in the browserFrame accurate video client in the browser
Frame accurate video client in the browser
 
Hacking with Pictures - Hack.LU 2014
Hacking with Pictures - Hack.LU 2014Hacking with Pictures - Hack.LU 2014
Hacking with Pictures - Hack.LU 2014
 
HTML5 Multimedia Accessibility
HTML5 Multimedia AccessibilityHTML5 Multimedia Accessibility
HTML5 Multimedia Accessibility
 
VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)
 
Cranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhoneCranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhone
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
Headless Android at AnDevCon3
Headless Android at AnDevCon3Headless Android at AnDevCon3
Headless Android at AnDevCon3
 
Functional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformFunctional IoT: Hardware and Platform
Functional IoT: Hardware and Platform
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
 
Keep Calm and Stegosploit - 44CON 2015
Keep Calm and Stegosploit - 44CON 2015Keep Calm and Stegosploit - 44CON 2015
Keep Calm and Stegosploit - 44CON 2015
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Martin Naumann "Life of a pixel: Web rendering performance"
Martin Naumann "Life of a pixel: Web rendering performance"Martin Naumann "Life of a pixel: Web rendering performance"
Martin Naumann "Life of a pixel: Web rendering performance"
 
4Developers 2015: Gamedev-grade debugging - Leszek Godlewski
4Developers 2015: Gamedev-grade debugging - Leszek Godlewski4Developers 2015: Gamedev-grade debugging - Leszek Godlewski
4Developers 2015: Gamedev-grade debugging - Leszek Godlewski
 
First steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROSFirst steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROS
 
Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11
 
Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill)
 
mmsys2019 live streaming at scale
mmsys2019 live streaming at scalemmsys2019 live streaming at scale
mmsys2019 live streaming at scale
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

What's inside 09 2013: gstreamer: black magic and witchcraft

  • 1. GStreamer Black Magic and Witchcraft --what it is not-- Marc Leeman Barco Networking Division
  • 2. Content ● Goal ● Introduction ● Common misconceptions ● Fun and Games ● Development
  • 3. Goal ● The presentation should allow the audience to leave the room and start playing with it ○ No fancy products ○ No hocus-pocus with hardware acceleration ○ No real-life examples ○ Really, nothing useful...
  • 4. Introduction ● What is GStreamer ○ set of libraries with a couple of example programs ○ highly configurable ○ streaming framework, modular ■ autoplugging ■ dynamic loading ■ caps, incremental buildup pipeline, visualisation of procedure, ...
  • 5. Common misconceptions ● GStreamer is slow ○ Pretty harmless: educate them ○ Performance issues are mostly due to bugs (e.g. alsa, h.264 parsing, …) ● GStreamer is not for embedded ○ Stuck in the previous century? ○ Axis encoders, cell phones, Settop boxes, ...
  • 6. Basic Tools ● What GStreamer instance do I have? ○ (jhbuild)marc@drd1812:~$ gst-inspect-1.0 |grep barco ○ barcortp: rtpsink: RtpSink ○ barcortp: rtpsrc: rtpsrc ○ barco: edgeblend: EdgeBlend ○ barco: vbcpsrc: VBCP client source ○ (jhbuild)marc@drd1812:~$ gst-inspect-1.0 rtpsink ○ Factory Details: ○ Rank: none (0) ○ Long-name: RtpSink ○ Klass: Generic/Bin/Sink ○ Description: Barco Rtp sink ○ Author: Thijs Vermeir <thijs.vermeir@barco.com>, Marc Leeman <marc.leeman@barco.com>, Paul Henrys <visechelle@gmail.com> ○ ○ Plugin Details: ○ Name: barcortp ○ Description: Barco RTP Plugins ○ Filename: /home/marc/gstreamer.jhbuild/build/lib/gstreamer-1.0/libgst-plugins-barcortp.so ○ Version: 1.0.0.11.1 ○ License: LGPL ○ Source module: gst-plugins-barcortp ○ Binary package: Barco ○ Origin URL: http://www.barco.com/ …. ● Experiment with gst-launch
  • 7. Fun and Games ● Get a copy of GStreamer 1.x ○ apt-get install … ○ make menuconfig && make (hardcore) ● Here we go… ● Capture from the V4L2 interface, and show ○ $ gst-launch-1.0 v4l2src ! videoconvert ! xvimagesink ● Scale the video ○ $ gst-launch-1.0 v4l2src ! videoscale ! video/x-raw, width=640, height=360 ! videoconvert ! xvimagesink ● Do both ○ gst-launch-1.0 v4l2src ! tee name=t t. ! queue ! videoscale ! video/x-raw, width=640, height=360 ! videoconvert ! xvimagesink t. ! queue ! videoconvert ! videoflip method=2 ! xvimagesink
  • 8. Fun and Games ● What is happening here? ○ gst-launch-1.0 v4l2src ! tee name=t t. ! queue ! videoscale ! video/x-raw, width=640, height=360 ! videoconvert ! xvimagesink t. ! queue ! videoconvert ! videoflip method=2 ! videocrop left=400 right=400 ! xvimagesink ● Capture red colour, live ○ gst-launch-1.0 v4l2src ! tee name=t t. ! queue ! videoscale ! video/x-raw, width=640, height=360 ! videoconvert ! xvimagesink t. ! queue ! videoflip method=2 ! videocrop left=400 right=400 ! alpha method=custom target-r=245 target-g=0 ! videoconvert ! xvimagesink ● Use camera and overlay “snow in a box” ○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x- raw,width=1280,height=720 ! videoconvert ! ximagesink sync=0 videotestsrc pattern=snow timestamp-offset=3000000000 ! "video/x-raw,format=AYUV,width=640,height=480,framerate= (fraction)30/1" ! timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 ! videoconvert ! mixer.
  • 9. Fun and Games ● What about other formats? ○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x-raw, width=1280,height=720 ! videoconvert ! fpsdisplaysink sync=0 videotestsrc timestamp- offset=3000000000 horizontal-speed=1 ! "video/x-raw,format=AYUV,width=640,height=480, framerate=(fraction)30/1" ! timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 ! videoconvert ! mixer. ● Something more nerdy? ○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x-raw, width=1280,height=720 ! videoconvert ! fpsdisplaysink sync=0 filesrc location=/home/marc/battlestar.galactica.blood.and.chrome.2012.1080p.bluray.x264-geckos.mkv ! decodebin ! videoconvert ! videoscale ! "video/x-raw,format=AYUV,width=640,height=480" ! timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 ! videoconvert ! mixer. ● More work ○ gst-launch-1.0 videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! video/x-raw, width=1280,height=720 ! videoconvert ! fpsdisplaysink sync=0 filesrc location=/home/marc/battlestar.galactica.blood.and.chrome.2012.1080p.bluray.x264-geckos.mkv ! decodebin ! videoconvert ! videoscale ! "video/x-raw,format=AYUV,width=640,height=360" ! timeoverlay ! queue2 ! mixer. v4l2src ! timeoverlay ! queue2 ! videoconvert ! mixer.
  • 10. Development ● Develop against git master ○ lots-a-fixes, lots-a-features ○ cooperation on IRC ○ avoid fixing something that was fixed ○ jhbuild (cerbero): standalone development environment, free from system configuration ○ 0.10 is dead, long live 1.0 ● Runs on lots-a OSes (Linux, OSX, Windows) on lots-a architectures ○ Active development is mostly done in Linux ○ There is hardware impact