Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • OpenCV - CvVideoWriter codec error in raspbian

    10 novembre 2013, par user2975978

    I'm making something like black box in raspberry pi.

    I set OpenCV 2.4.3 and many video libraries. ( I referred this site - Opencv cannot acces my webcam )

    And I compiled this sample code.

    #include 
    #include "opencv/cv.h"
    #include "opencv/highgui.h"
    #include "opencv/cxcore.h"
    
    int main(void){
        CvCapture* capture = cvCaptureFromCAM(0);
        cvNameWindow("video", 1);
    
        double fps = cvGetCaptureProperty(capture, CV_CAP_PROP_FPS);
        CvSize frame_size = cvSize((int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH), (int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT));
        CvVideoWriter* writer = cvCreateVideoWriter("out.avi", -1, fps, frame_size, 1);
    
        IpImage* frame;
        while(1){
            frame = cvQueryFrame(capture);
            cvShowImage("video", frame);
            if(cvWaitKey(38) == 27){
                break;
            }
        }
    
        cvReleaseVideoWriter(&writer);
        cvReleaseCapture(&capture);
        cvDestroyWindow("video");
    
        return 0;
    }
    

    This code compiled successfully.

    But when i run this process, there are some error.

    OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open, file /home/pi/OpenCV-2.4.3/modules/highgui/src/cap_gstreamer.cpp, line 479
    terminate called after throwing an instance of 'cv::Exception'
    what(): /home/pi/OpenCV-2.4.3/modules/highgui/src/cap_gstreamer.cpp:479: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open
    
    Aborted
    

    So, i changed codec part in 'cvCreateVideoWriter' instead of -1. I tried many types of codec like 'CV_FOURCC('M','J','P','G')' and so on..

    but I cannot fix this problem.

    How can i solve this problem? Please help me..

  • Can not open file from avformat_open_input in android

    10 novembre 2013, par ssrp

    I have called av_register_all() function in my onLoad() function, but I get the -1330794744 return value when I try to open a .mp4 file in my sdcard. what would be the problem please help.

  • how does the FFmpegFrameRecorder record portrait video ?

    10 novembre 2013, par user1329261

    i hava use the javacv FFmpegFrameRecorder to record a video on android ,finally i found that this recorder only record landscape video,can anyone tell me how to record video in portrait direction?

    thank you very much!

  • How to give a file path in FFmpeg for Android

    10 novembre 2013, par ssrp

    I am developing a movie player using FFmpeg libraries. So far I have built FFmpeg for android and can call a native function through JNI. I want to give a file to be opened by FFMpeg open_file function, I want to know how to give a file to the function that is stored inside the external storage in the device. I am using HTC One x for debugging the app. And I know how to get the absolute path of the file in Java. Please help.

  • iOS- ffmpeg stop rtsp stream

    9 novembre 2013, par user2964075

    I am developing an iOS application that streams rtsp feeds. My application can only stream one feed at a time. My question is how can I stop/close the stream so that I can load a new rtsp feed and start streaming it?

    Thanks a lot.