Bug #2654
closedRPI Openmax Transcoder.
0%
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
Updated by Jaroslav Kysela over 11 years ago
Attach or give an URL for a stream example (redirect the output to a mpegts file).
Updated by danny skjodt over 11 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
Updated by danny skjodt over 11 years ago
Updated by danny skjodt over 11 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.
Updated by danny skjodt over 11 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.
Updated by danny skjodt over 11 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.
Updated by Jaroslav Kysela about 11 years ago
- Status changed from New to Invalid
It seems like a not TVH issue.
Updated by Jan g over 10 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?