Gstreamer将h264转码为vp8

时间:2014-12-04 20:15:43

标签: gstreamer transcoding

我有这样的gstreamer管道:

gst-launch v4l2src always-copy=false chain-ipipe=true \
! video/x-raw-yuv,format='(fourcc)'NV12, width=640, height=480, framerate='(fraction)'15/1 \
! dmaiaccel ! dmaienc_h264 ddrbuf=true encodingpreset=2 ratecontrol=4 maxbitrate=4000000 targetbitrate=2000000 \
! dmaiperf print-arm-load=true ! rtph264pay \
! queue ! udpsink port=3000 host=192.168.1.16 sync=false

我可以在我的主机上捕获它并使用命令播放它:

gst-launch udpsrc port=3000 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z2QAKK2EBUViuKxUdCAqKxXFYqOhAVFYrisVHQgKisVxWKjoQFRWK4rFR0ICorFcVio6ECSFITk8nyfk/k/J8nm5s00IEkKQnJ5Pk/J/J+T5PNzZprQFAeyA\,aO48sA\=\=\", payload=(int)96, ssrc=(guint)2498431066, clock-base=(guint)297251943, seqnum-base=(guint)34949" ! rtph264depay ! queue ! ffdec_h264 ! ffmpegcolorspace ! videoscale ! ximagesink sync=false show-preroll-frame=false

现在我想将其转码为vp8并将其重新链接到另一个端口。所以我一直在努力:

gst-launch udpsrc port=3000 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z2QAKK2EBUViuKxUdCAqKxXFYqOhAVFYrisVHQgKisVxWKjoQFRWK4rFR0ICorFcVio6ECSFITk8nyfk/k/J8nm5s00IEkKQnJ5Pk/J/J+T5PNzZprQFAeyA\,aO48sA\=\=\", payload=(int)96, ssrc=(guint)2498431066, clock-base=(guint)297251943, seqnum-base=(guint)34949" \
! rtph264depay ! queue ! ffdec_h264 ! ffmpegcolorspace ! videoscale ! queue \
! vp8enc bitrate=256000 speed=2 max-latency=1 error-resilient=true \
! rtpvp8pay ! udpsink host=192.168.1.16 port=5004

但它不起作用。我对gstreamer不熟悉,我想我的最后一个管道有问题。我该怎么做呢?

0 个答案:

没有答案