This post was updated on .
Hi,
Not sure if it makes sense about what I tried to do, for example, below worked fine as I was able to pipe in mjpeg from the IP camera on raspi3 to an external rtmp channel:
ffmpeg -i "rtsp://xxxx" -vcodec copy -f mjpeg -y - | \
gst-launch-1.0 \
-v fdsrc fd=0 \
! "image/jpeg,width=1280, height=720,framerate=25/1" \
! jpegparse \
! omxmjpegdec \
! omxh264enc \
! h264parse \
! queue \
! flvmux streamable=true \
! queue \
! rtmpsink location="rtmp://yyyy"
However, when I placed a fifo between omxmjpegdec and omxh264enc
For example
Session 1:
mkfifo
ffmpeg \
-i "rtsp://xxxx" -vcodec copy -f mjpeg -y - | \
gst-launch-1.0 \
-v fdsrc fd=0 \
! "image/jpeg,width=1280, height=720,framerate=25/1" \
! jpegparse \
! omxmjpegdec \
! filesink location=myfifo
And Session 2:
tail -F myfifo |
gst-launch-1.0 \
-v fdsrc \
! omxh264enc \
! h264parse \
! queue \
! flvmux streamable=true \
! queue \
! rtmpsink location="rtmp://yyyy"
Session 2 hung on 'Pipeline is PREROLLING...'. I could see session 1 worked fine as it did keep feeding data to the fifo. I am guessing maybe in session 2 I need to provide perhaps some sort of data format before it gets chaining into omxh264enc; I inserted "video/x-raw,width=1280, height=720,framerate=25/1" but no luck. Reason for placing a fifo is basically a trial to see whether I could manipulate the data before piping into omxh264enc, and I am stuck already in first step with fifo so perhaps such approach isn't going to work and I just wanted to know so I can start looking around other approach.
Many thanks and hope someone could help here.
|
Hello,
Try to look on probe. You can drop from stream.
Mikl From: gstreamer-devel <[hidden email]> on behalf of justyoung17 <[hidden email]>
Sent: Sunday, February 5, 2017 8:51:05 PM To: [hidden email] Subject: Manipulate data between omxmjpegdec and omxh264enc with a fifo on PI 3? Hi,
Not sure if it makes sense about what I tried to do, for example, below worked fine as I was able to pipe in jmpeg from the IP camera on raspi3 to an external rtmp channel: ffmpeg -i "rtsp://xxxx" -vcodec copy -f mjpeg -y - | \ gst-launch-1.0 \ -v fdsrc fd=0 \ ! "image/jpeg,width=1280, height=720,framerate=25/1" \ ! jpegparse \ ! omxmjpegdec \ ! omxh264enc \ ! h264parse \ ! queue \ ! flvmux streamable=true \ ! queue \ ! rtmpsink location="rtmp://yyyy" However, when I placed a fifo between omxmjpegdec and omxh264enc For example Session 1: mkfifo ffmpeg \ -i "rtsp://xxxx" -vcodec copy -f mjpeg -y - | \ gst-launch-1.0 \ -v fdsrc fd=0 \ ! "image/jpeg,width=1280, height=720,framerate=25/1" \ ! jpegparse \ ! omxmjpegdec \ ! filesink location=myfifo And Session 2: tail -F myfifo | gst-launch-1.0 \ -v fdsrc \ ! omxh264enc \ ! h264parse \ ! queue \ ! flvmux streamable=true \ ! queue \ ! rtmpsink location="rtmp://yyyy" Session 2 hung on 'Pipeline is PREROLLING...'. I could see session 1 worked fine as it did keep feeding data to the fifo. I am guessing maybe in session 2 I need to provide perhaps some sort of data format before it gets chaining into omxh264enc; I inserted "video/x-raw,width=1280, height=720,framerate=25/1" but no luck. Reason for placing a fifo is basically a trial to see whether I could manipulate the data before piping into omxh264enc, and I am stuck already in first step with fifo so perhaps such approach isn't going to work and I just wanted to know so I can start looking around other approach. Many thanks and hope someone could help here. View this message in context: Manipulate data between omxmjpegdec and omxh264enc with a fifo on PI 3? Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by justyoung17
On Sun, 2017-02-05 at 11:51 -0800, justyoung17 wrote: Hi, you fifo is probably stream-based, so it will destroy the packetisation of the decoded video data where 1 buffer = 1 frame = certain constant/fixed amount of bytes, which is what an h264 encoder will expect. Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |