element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Streaming an SD/HD DVB-T channel via HLS on Raspberry Pi4
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kk99
  • Date Created: 22 Sep 2019 7:01 PM Date Created
  • Views 947 views
  • Likes 3 likes
  • Comments 0 comments
Related
Recommended

Streaming an SD/HD DVB-T channel via HLS on Raspberry Pi4

kk99
kk99
22 Sep 2019

image

Today I have make an initial configuration of Raspberry Pi4 for purpose of streaming an DVB-T live channel via HLS. Basic idea is to use DVB-T USB dongle to receive an MUX with channels. I have used tzap tool to record audio and video PIDs of interested channel. This recording was a source for ffmpeg which transcoded this audio/video data. In final result we got an HLS manifest used by client application.

 

First step is configuration of HTTP server. I have used a Apache application with enabled directory in user home. Below there is list of commands to do this:

sudo apt-get install apache2
mkdir ~/public_html
sudo a2enmod userdir
sudo systemctl restart apache2

 

Next step is scanning of DVB-T channels. I have used w_scan tool. Below there is list of commands to scan DVB-T channels :

sudo apt-get install w-scan
mkdir ~/.tzap
w_scan -c PL -ft -A1 -X > ~/.tzap/channels.conf

 

To record an DVB-T channel we could use tzap application. Recorded data is available at following location in system: /dev/dvb/adapter0/dvr0. Below there is example command to do this:

sudo apt-get install dvb_apps
tzap -r "channel_name"

 

Next step is compile of last version of ffmpeg with enabled support for hardware decoding and encoding for H264 codec. We could to it with following commands:

./configure --prefix=$HOME/bin --enable-gpl --enable-nonfree --enable-mmal --enable-omx --enable-omx-pi --arch=armel --target-os=linux
make -j4

 

Then we could start ffmpeg with enabled hardware decoding of input stream and hardware transcoding to achieve given bitrate. Then we are able to start ffmpeg with enabled hardware decoding of input stream and hardware encoding to achieve given bitrate. That made data is segmented and client HLS playlist is created. In attached video there are two examples of ffmpeg configuration for live streaming via HLS of SD and HD DVB-T channels. The performance of hardware decoder/encoder is really good. In case of HD channels transcoding we need to increase size of memory reserved to GPU. In both cases I have used 256 MB for GPU.

 

Here is video with example of streaming for SD and HD channel with usage of HLS from Raspberry Pi4:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

In next attempt I would like to check performance of hardware h265 decoder and usage of external USB3.0 storage, because in this case I have used only internal SD card. Additionally I would like to try to encode multiple variants of the same video stream e.g. in different resolutions in bitrates.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube