Project

General

Profile

Bug #2654

RPI Openmax Transcoder.

Added by danny skjodt almost 10 years ago. Updated almost 9 years ago.

Status:
Invalid
Priority:
Normal
Category:
Muxers
Target version:
-
Start date:
2015-02-01
Due date:
% Done:

0%

Estimated time:
Found in version:
Latest master git
Affected Versions:

Description

So today I played arround openmax as transcoder for tvheadend, this new pipe function is awesome.

pipe://gst-launch-1.0 souphttpsrc location="http://127.0.0.1:9981/stream/channelname/Boomerang" is-live=true ! decodebin name=demux demux. ! queue ! audioresample ! audioconvert dithering=0 ! audio/x-raw,channels=1 ! voaacenc bitrate=64000 ! mux. mpegtsmux name=mux ! filesink location=/dev/stdout demux. ! queue ! videoconvert ! omxh264enc target-bitrate=1000000 control-rate=variable ! h264parse ! mux.

This works quite good, but only with http clients using passthrough muxer, htsp and matroska clients results in what looks like only the audio is parsed in input kb/s and nothing is passed to output.

It might boil down to invalid, non monotonically increasing dts, or sps/pps.


Files

test.ts (7.42 MB) test.ts Using voaacenc. danny skjodt, 2015-02-01 13:04
test2.ts (9.9 MB) test2.ts Using twolame mp2enc danny skjodt, 2015-02-01 13:11

History

#1

Updated by Jaroslav Kysela almost 10 years ago

Attach or give an URL for a stream example (redirect the output to a mpegts file).

#2

Updated by danny skjodt almost 10 years ago

Jaroslav Kysela wrote:

Attach or give an URL for a stream example (redirect the output to a mpegts file).

Sure, ive made this using "filesink location=test.ts" and with voaacenc. I will make one with twolame also, as it seems it produces less errors.

[mpegts @ 0xb46060] aac bitstream not in adts format and extradata missing

#3

Updated by danny skjodt almost 10 years ago

#4

Updated by danny skjodt almost 10 years ago

This pipe works for intel vaapi encoding.

gst-launch-1.0 souphttpsrc location="http://127.0.0.1:9981/stream/channelname/Boomerang?mux=matroska" is-live=true ! matroskademux ! vaapidecode ! vaapiencode_h264 ! mpegtsmux ! filesink location=/dev/stdout

Havent figured out the audio yet.

But this video stream goes through tvheadends matroska muxer with no problems.

#5

Updated by danny skjodt almost 10 years ago

gst-launch-1.0 souphttpsrc location="http://127.0.0.1:9981/stream/channelname/Boomerang?mux=matroska" is-live=true ! \
matroskademux name=demux demux. ! queue ! h264parse ! vaapidecode ! vaapiencode_h264 ! mux. mpegtsmux name=mux ! filesink location=/dev/stdout demux. ! queue ! mpegaudioparse ! mux.

Intel vaapi encoding with passthrough audio, works! :)

Next problem is mpeg2video input.

#6

Updated by danny skjodt over 9 years ago

gst-launch-1.0 souphttpsrc location="http://127.0.0.1:9981/stream/channelname/National+Geographic+Channel?mux=matroska" is-live=true ! matroskademux name=demux demux. ! queue ! vaapidecode ! vaapipostproc ! vaapiencode_h264 ! mux. mpegtsmux name=mux ! filesink location=/dev/stdout demux. ! queue ! mpegaudioparse ! mux.

For some reason you NEED vaapipostproc to link vaapidecode and vaapiencode_h264 when the input is mpeg2 !
Some might ask what is vaapi encoding ?! Well its a mix of qsv and gl shaders, and is the best thing we will have on linux since intel have commercialized their linux version off their media sdk.

With these pipelines I can transcode something like 20 MPEG2 SD channels at once to H264 on a 2600k only using the gpu. Never cpu's should do much more.

#7

Updated by Jaroslav Kysela over 9 years ago

  • Status changed from New to Invalid

It seems like a not TVH issue.

#8

Updated by Jan g almost 9 years ago

root@raspberrypi:~# gst-launch-1.0 souphttpsrc location="http://192.168.1.59:9981/stream/channelid/596036334" is-live=true ! matroskademux name=demux demux. ! queue ! vaapidecode ! vaapipostproc ! vaapiencode_h264 ! mux. mpegtsmux name=mux ! filesink location=/dev/stdout demux. ! queue ! mpegaudioparse ! mux.
WARNING: erroneous pipeline: could not link queue0 to vaapidecode0

what is the problem?

Also available in: Atom PDF