Raspberry PI2 integrating progress report

Currently PI2 integration is in progress. Something is working something not, some conclusions also I have.

  • ffmpeg or avlib can not be used  for transcoding, because to transcode with pure CPU power is not possible. PI2 does not have enought this CPU power. But, this is not a show stopper, PI2 have HW support of h264 encoding with gstreamer. So currently im trying to add also possibility to add gstreamer support.
  • To transcode mpeg2 streams (most broadcasters for SD channels still use mpeg2 format) it is necessary to buy licence. But it is not expensive http://swag.raspberrypi.org/products/mpeg-2-license-key
  • With current gstreamer wich comes togather with raspbian is not possible to transcode due to some bDone:ugs in this package so gstreamer should be build from source, but this is not a hard job. There is already script, but do not forget to remove gstreamer in case if you installed it from repository. Script and description can be found here. http://www.onepitwopi.com/raspberry-pi/gstreamer-1-2-on-the-raspberry-pi/
  • Currently for some reason i can transcode only SD channels, for some reason HD channels transcoding does not work. No idea why.
  • Quality of the stream is not perfect, using other transport methods than HLS stream have better quality.


Things to be done:

  • Adjust settings to there will be possibility to transcode HD channels.
  • Video quality problems


  • No idea how to scale proportionally, for example if i want transcode video to 480px with how to get height with proportianal.
  • Need to adjust in php code, how to pass quality and audio stream settings from UI.
  • Some other small fixes


    • At least some protoype config string i have already.

 $conf[“parameters”] = “souphttpsrc location=\”{stream_url}\” is-live=true ! decodebin name=demux ! queue ! audioconvert ! \”audio/x-raw,channels=1\” ! avenc_aac  compliance=experimental ! mux. mpegtsmux name=mux ! hlssink max-files=5 location={stream_dir}segment%05d.ts playlist-location={stream_dir}ystream.m3u8 target-duration=5  demux. ! queue ! videoconvert ! deinterlace ! omxh264enc target-bitrate=2000000 control-rate=variable inline-header=true periodicty-idr=1  interval-intraframes=50 ! video/x-h264,profile=high,width=720,height=576 ! h264parse config-interval=1 ! mux. -m”

  • Process control like a stop/start is working.

 $conf[“command”] = “gst-launch-1.0”;

Knowledge support especially for optimal gstreamer parameters are welcome.

Also I would like to thanks Johan for helping to get all this done.

5 thoughts on “Raspberry PI2 integrating progress report

  1. Thank you for every other informative blog. Where else
    may just I get that kind of info written in such
    a perfect approach? I’ve a project that I’m simply now running on, and I’ve been on the look out for such information.

  2. I’m not sure where you’re getting your information, but good topic.

    I needs to spend some time learning much more or understanding more.
    Thanks for wonderful info I was looking for this information for my mission.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.