Hi,
I am trying to pipe video of mpegts format with mpeg4 codec to gstCamera on jetson tx2 but am unable to successfully pipe it.
I used the following pipe line for gstCamera:
ss << "udpsrc multicast-group=224.10.10.10 port=15004 !";
ss << " video/mpegts ! tsdemux ! decodebin ! nvvidconv ! video/x-raw,format=NV12,";
ss << "width="<< mWidth << ",height="<<mHeight << " !";
ss << " appsink name=mysink sync=false async=false";
However, I am able to pipe video on gstCamera of mpegts format with h264 codec with the same pipe line.
I tried using gstreamer on my terminal (using gst-launch) and its works.
Pipe line on terminal:
gst-launch-1.0 -v udpsrc multicast-group=224.10.10.10 port=15004 ! video/mpegts ! tsdemux ! avdec_mpeg4 ! xvimagesink sync=false async=false -e appsink
Thanks!
Hi,
We have removed mpeg4 decoding from Software Features. Can you try SW decoder:
ss << "udpsrc multicast-group=224.10.10.10 port=15004 !";
ss << " video/mpegts ! tsdemux ! avdec_mpeg4 ! videoconvert ! video/x-raw,format=NV12,";
ss << "width="<< mWidth << ",height="<<mHeight << " !";
ss << " appsink name=mysink sync=false async=false";
Hi DaneLLL,
Thanks for the reply, I tried SW decoder that you suggested and still unable to pipe the video out (it say failed to capture frame and unable to convert from NV12 to RGBA) . Is there other way to pipe it?
Thanks!
Hi,
Do you replace the upper launch string or lower string?
if( onboardCamera() )
{
#if NV_TENSORRT_MAJOR > 1 // if JetPack 3.1 (different flip-method)
const int flipMethod = 0;
#else
const int flipMethod = 2;
#endif
ss << "nvcamerasrc fpsRange=\"30.0 30.0\" ! video/x-raw(memory:NVMM), width=(int)" << mWidth << ", height=(int)" << mHeight << ", format=(string)NV12 ! nvvidconv flip-method=" << flipMethod << " ! "; //'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! ";
ss << "video/x-raw ! appsink name=mysink";
}
else
{
ss << "v4l2src device=/dev/video" << mV4L2Device << " ! ";
ss << "video/x-raw, width=(int)" << mWidth << ", height=(int)" << mHeight << ", ";
ss << "format=RGB ! videoconvert ! video/x-raw, format=RGB ! videoconvert !";
ss << "appsink name=mysink";
}
Hi DaneLLL,
I comment out the onboard camera section, so it will just run my own pipeline.
bool gstCamera::buildLaunchStr()
{
std::ostringstream ss;
ss << "udpsrc multicast-group=224.10.10.10 port=15004 !";
ss << " video/mpegts ! tsdemux ! avdec_mpeg4 ! videoconvert ! video/x-raw,format=NV12,";
ss << "width="<< mWidth << ",height="<<mHeight << " !";
ss << " appsink name=mysink sync=false async=false";
mLaunchStr = ss.str();
printf(LOG_GSTREAMER "gstreamer decoder pipeline string:\n");
printf("%s\n", mLaunchStr.c_str());
return true;
}
Thanks
Hi,
Please try
ss << "udpsrc multicast-group=224.10.10.10 port=15004 !";
ss << " video/mpegts ! tsdemux ! avdec_mpeg4 ! videoconvert ! video/x-raw,format=RGBA,";
ss << "width="<< mWidth << ",height="<<mHeight << " !";
ss << " appsink name=mysink sync=false async=false";
Not sure but it looks like the appsink accepts RGBA only.
Hi DaneLLL,
Yes, now I am able to pipe the video out!
Thank you so much!