Opencv error on Gstreamer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Opencv error on Gstreamer

Akrita
Hi
i develop this code on jetson tk1 and UBUNTU 14.04

  cv::VideoCapture cap(0);
  std::string pipeline = "appsrc !
video/x-raw,width=640,height=480,format=(string)YUY2 ! videoconvert  !    
  omxh264enc ! matroskamux ! filesink location=test.mp4 ";
  cv::VideoWriter writer;  
  writer.open(pipeline,0, (double)30, cv::Size(640, 480), true);
  if (!writer.isOpened()) {
        printf("=ERR= can't create video writer\n");
        return -1;
  }
  if(cap.isOpened()){
      cv::Mat frame;  
      while(1){
          cap >> frame;
          if (!frame.empty()){
                    cv::imshow( "Frame", frame );
                   writer<<frame;
                  char c=(char)cv::waitKey(40);
                  if(c==27)
                  break;
            }
       }
  }
        cap.release();
       

 but i got these error
 Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set
DPB and  
  MjstreamingGStremer plugin:Embedded video playback halted;module appsrc0
reported:Internal Data flow
  error.

 Best Regards
 Akrita

   




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Opencv error on Gstreamer

Akrita
Hi
I also developed this

cv::VideoCapture cap(0);
std::string pipeline = "appsrc ! autovideoconvert ! omxh265enc ! matroskamux
! filesink    
    location=test.mkv ";
        cv::VideoWriter writer;
    writer.open(pipeline,0, (double)30, cv::Size(640, 480), true);
         if (!writer.isOpened()) {
        printf("=ERR= can't create video writer\n");
        return -1;
    }
        if(cap.isOpened()){
          cv::Mat frame;  
      while(1){
        cap >> frame;
        if (!frame.empty()){
                    cv::imshow( "Frame", frame );
                        writer<<frame;
           char c=(char)cv::waitKey(40);
           if(c==27)
             break;
 
        }

but got this error!!!!!!!!
GStreamer Plugin: Embedded video playback halted; module appsrc0 reported:
Internal data flow error.

i dont really know what should i do &lt;smiley
image=&quot;anim_confused.gif&quot;/>

Regards,






--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel