Help with transcoding h264 encoded TS on raspberry pi

Markus Fritsche fritsche.markus at gmail.com
Fri Dec 13 02:55:34 PST 2013


On Fri, 13 Dec 2013 11:31:52 +0100
Stefan Simon <stefansimon8 at gmail.com> wrote:

> gst-launch-1.0 filesrc location=<file.ts> ! tsdemux ! h264parse !
> omxh264dec ! omxh264enc ! filesink location=test.h264

Hmm - I switch to gstreamer-1.2, it seems to have some improvements in the de-/ muxers. I created a script for recoding ts files on the raspberry pi. It calls mediainfo to analyze the audio streams in the ts (I recode DVB-T from mp2 to aac) and the videostream.

Here is a typical pipeline for recoding a Terra-X encoding:

gst-launch-1.0 filesrc location='00001.ts' ! progressreport ! tsparse !  decodebin name=demux demux. ! queue ! audioconvert ! voaacenc bitrate=128000 ! queue ! mux. demux. ! queue ! deinterlace ! omxh264enc control-rate=1 target-bitrate=2500000 ! "video/x-h264,profile=high,width=704,height=576" ! queue ! h264parse ! mux. mpegtsmux name=mux ! filesink location='out.ts'

(the script does ask for an input name, output name, base bitrate and a diviver, for instance if I put divider 2, the dimensions will be devided by 2 and the bitrate by 2*2).

The script is written in lua (but not failsafe) - interested?

Kind regards,
  Markus

-- 
Markus Fritsche <fritsche.markus at gmail.com>


More information about the gstreamer-devel mailing list