尊龙凯时人生就是搏

ÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐжàýÌåÎļþµÄתÂëºÍ¼ô¼­£¿

ÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐжàýÌåÎļþµÄתÂëºÍ¼ô¼­£¿

Ëæ×ÅÊý×Ö»¯Ê±´úµÄÉú³¤£¬¶àýÌåÎļþµÄʹÓÃÒѾ­³ÉΪÎÒÃÇÒ»Ñùƽ³£ÉúÑÄÖв»¿É»òȱµÄÒ»²¿·Ö¡£È»¶ø£¬¶àýÌåÎļþµÄÃûÌú;Þϸ¶àÖÖ¶àÑù£¬ÓÐʱÎÒÃÇÐèÒª¶ÔÆä¾ÙÐÐתÂëºÍ¼ô¼­ÒÔ˳Ӧ²î±ðµÄÐèÇó¡£÷è÷ë²Ù×÷ϵͳ×÷Ϊһ¿î¿ªÔ´µÄ²Ù×÷ϵͳ£¬ÌṩÁ˸»ºñµÄ¹¤¾ßºÍ¿â£¬Ê¹µÃ¶àýÌåÎļþµÄתÂëºÍ¼ô¼­±äµÃÔ½·¢¼òÆӺ͸ßЧ¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐжàýÌåÎļþµÄתÂëºÍ¼ô¼­£¬²¢ÌṩÏà¹ØµÄ´úÂëʾÀý¡£

Ò»¡¢¶àýÌåÎļþתÂë

×°ÖÃFFmpeg¿â

FFmpegÊÇÒ»¿îÇ¿Ê¢µÄ¶àýÌå´¦Àí¿â£¬¹ØÓÚ¶àýÌåÎļþתÂëÊ®·ÖÀû±ã¡£Ê×ÏÈ£¬ÎÒÃÇÐèÒªÔÚ÷è÷ë²Ù×÷ϵͳÉÏ×°ÖÃFFmpeg¿â£º

sudo apt-get install ffmpeg

µÇ¼ºó¸´ÖÆ

ʹÓÃFFmpeg¿â¾ÙÐÐתÂë

תÂë²Ù×÷¿ÉÒÔͨ¹ýFFmpeg¿âÌṩµÄÏÂÁîÐй¤¾ßʵÏÖ¡£ÒÔÏÂÊÇÒ»¸öʹÓÃFFmpeg¾ÙÐÐÊÓƵÎļþתÂëµÄʾÀý£º

ffmpeg -i input.mp4 -c:v libx264 -c:a aac -strict experimental output.mp4

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬-i²ÎÊýÖ¸¶¨ÊäÈëÎļþ£¬-c:v²ÎÊýÖ¸¶¨ÊÓƵ±àÂëÆ÷£¬-c:a²ÎÊýÖ¸¶¨ÒôƵ±àÂëÆ÷£¬-strict experimental²ÎÊýÓÃÓÚÖ§³ÖAACÒôƵ±àÂë¡£Çëƾ֤ÐèÒªÐ޸IJÎÊýºÍÎļþ·¾¶¡£

¶þ¡¢¶àýÌåÎļþ¼ô¼­

×°ÖÃOpenCV¿â

OpenCVÊÇÒ»¸öÆÕ±éÓ¦ÓÃÓÚͼÏñºÍÊÓƵ´¦ÀíµÄ¿ªÔ´¿â£¬¿ÉÒÔÓÃÓÚ¶àýÌåÎļþµÄ¼ô¼­¡£ÔÚ÷è÷ë²Ù×÷ϵͳÉÏ×°ÖÃOpenCV¿â£º

sudo apt-get install libopencv-dev

µÇ¼ºó¸´ÖÆ

ʹÓÃOpenCV¿â¾ÙÐмô¼­

ʹÓÃOpenCV¿â¾ÙÐжàýÌåÎļþµÄ¼ô¼­¿ÉÒÔͨ¹ý¶ÁÈ¡ºÍдÈëÏñËØÊý¾ÝÀ´ÊµÏÖ¡£ÒÔÏÂÊÇÒ»¸öʹÓÃOpenCV¾ÙÐÐÊÓƵ¼ô¼­µÄʾÀý£º

#include <opencv2/opencv.hpp>

int main() {
    cv::VideoCapture cap("input.mp4");
    int frameCount = cap.get(CV_CAP_PROP_FRAME_COUNT);
    int fps = cap.get(CV_CAP_PROP_FPS);

    cv::VideoWriter writer("output.mp4", CV_FOURCC('M', 'P', '4', 'V'), fps, cv::Size(cap.get(CV_CAP_PROP_FRAME_WIDTH), cap.get(CV_CAP_PROP_FRAME_HEIGHT)));

    for(int i=0; i<frameCount; i++) {
        cv::Mat frame;
        cap >> frame;

        // ÔÚÕâÀï¶ÔÊÓƵ֡¾ÙÐмô¼­´¦Àí

        writer.write(frame);
    }

    cap.release();
    writer.release();

    return 0;
}

µÇ¼ºó¸´ÖÆ

ÒÔÉÏ´úÂëʹÓÃOpenCV¿â¶ÁÈ¡ÊäÈëÊÓƵÎļþ£¬²¢ÖðÖ¡¾ÙÐмô¼­´¦Àí£¬×îºó½«´¦ÀíºóµÄ֡дÈëÊä³öÊÓƵÎļþ¡£Çëƾ֤ÐèÒªÐÞ¸ÄÎļþ·¾¶ºÍ¼ô¼­´¦Àí²¿·ÖµÄ´úÂë¡£

×ÛÉÏËùÊö£¬÷è÷ë²Ù×÷ϵͳÌṩÁËÇ¿Ê¢µÄ¹¤¾ßºÍ¿â£¬Ê¹µÃ¶àýÌåÎļþµÄתÂëºÍ¼ô¼­±äµÃÔ½·¢¼òÆӺ͸ßЧ¡£Í¨¹ý×°ÖúÍʹÓÃFFmpegºÍOpenCV¿â£¬ÎÒÃÇ¿ÉÒÔÇáËɵØʵÏÖ¶àýÌåÎļþµÄתÂëºÍ¼ô¼­²Ù×÷¡£Ï£Íû±¾ÎĶÔÄúÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐжàýÌåÎļþµÄתÂëºÍ¼ô¼­ÌṩÁË×ÊÖú¡£

ÒÔÉϾÍÊÇÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐжàýÌåÎļþµÄתÂëºÍ¼ô¼­£¿µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ