+ All Categories
Home > Software > Video Transcoding with Raspberry Pi

Video Transcoding with Raspberry Pi

Date post: 19-Jan-2017
Category:
Upload: alfonso-peletier
View: 445 times
Download: 9 times
Share this document with a friend
11
Video Transcoding with Raspberry Pi June 2016
Transcript
Page 1: Video Transcoding with Raspberry Pi

Video Transcoding with Raspberry Pi

June 2016

Page 2: Video Transcoding with Raspberry Pi

What do we mean by#BeEpic!

A Team-centric vision…

The culture of Creativity Enjoy what you do, and how you do it Grow as a professional, grow as a person Make it sustainable Talent enjoys talent. Talent attracts talent

… and it is built for purpose

Let’s build something awesome!, let’s make it Epic!

Page 3: Video Transcoding with Raspberry Pi

Agenda• Starting with some context• Toolbox

–Raspberry PI–nginx–ffmpeg–Hardware acceleration components

• Putting all together• Benchmark

3

Page 4: Video Transcoding with Raspberry Pi

Starting with some context

❖ Media encoders working with high quality streams (10 Mbps)❖ Need of monitoring streams:

➢ From external tools/platform that could be out of device network

➢ Without the need of sending HD streams to the monitoring tools

➢ Preprocessing of the stream■ Audio extraction■ Audio spectrum analyzer■ Black screen

Page 5: Video Transcoding with Raspberry Pi

❖ RPI to the rescue!❖ Low cost computer❖ Optimized for video

➢ HW Acceleration➢ Up to 1080p and 50Mbps➢ Did I say RPI is a computer?

❖ Pretty flexible➢ It can do tons of things!

Toolbox - Raspberry PI

Page 6: Video Transcoding with Raspberry Pi

❖ Nginx: High performance HTTP reverse proxy.

❖ Why a HTTP reverse proxy???➢ nginx-rtmp-module!➢ Flexible➢ Easy to install, deploy and

configure rtmp relay server❖ And not just RTMP!

➢ HLS repackaging➢ DASH repackaging

Toolbox - nginx

Page 7: Video Transcoding with Raspberry Pi

Toolbox - ffmpeg❖ Available for many different

platforms and cpus (RPI included)❖ Easy to use tool to:

➢ Transcode ➢ Forward streams from one point

to otherFFmpeg

But what about the CPU???

Page 8: Video Transcoding with Raspberry Pi

Toolbox - Hardware acceleration

• FFmpeg with hardware encoding/decoding support– MMAL (--enable-mmal)– OMX (--enable-omx --enable-omx-rpi )

Page 9: Video Transcoding with Raspberry Pi

Putting all together

ffmpeg

10 Mbps

300 Kbps

Page 10: Video Transcoding with Raspberry Pi

Benchmark• Software decoding/encoding

– libx264 encoding– 98% CPU load

• Software decoding/hardware encoding– OMX HW encoding– 60-65% CPU load

• Hardware decoding/encoding– MMAL HW decoding– OMX HW encoding– 20-25% CPU load

ffmpeg -i bbb_sunflower_1080p_30fps_normal.mp4 -vcodec libx264 -b:v 100k -s 320x200 -map v -f flv rtmp://localhost/small/test

ffmpeg -i bbb_sunflower_1080p_30fps_normal.mp4 -vcodec h264_omx -b:v 100k -s 320x200 -map v -f flv rtmp://localhost/small/test

ffmpeg -vcodec h264_mmal -i bbb_sunflower_1080p_30fps_normal.mp4 -vcodec h264_omx -b:v 100k -s 320x200 -map v -f flv rtmp://localhost/small/test

Page 11: Video Transcoding with Raspberry Pi

#BeEpic!

epiclabs.io


Recommended