尊龙凯时人生就是搏

nginxÔõÑùÉèÖÃrtmp

ÔÚ nginx ÖÐÉèÖà rtmp µÄ°ì·¨ÓУº×°Öà rtmp Ä£¿é±à¼­ nginx ÉèÖÃÎļþ£¬Ìí¼Ó rtmp ÉèÖý¨ÉèÓÃÓÚÍÆËͺÍÀ­È¡Á÷µÄ rtmp Á÷Ô´ÖØÆô nginxʹÓà vlc ²¥·ÅÆ÷ÑéÖ¤ÉèÖÃ

ÔõÑùÔÚ Nginx ÖÐÉèÖÃ RTMP

ΪÁËÔÚ Nginx ÖÐÉèÖà RTMP£¬Çëƾ֤ÒÔÏ°취²Ù×÷£º

1. ×°Öà RTMP Ä£¿é

apt-get install nginx-module-rtmp

µÇ¼ºó¸´ÖÆ

2. ÉèÖÃ Nginx

ÔÚ Nginx ÉèÖÃÎļþ /etc/nginx/nginx.conf ÖУ¬Ìí¼ÓÒÔÏÂÄÚÈÝ£º

rtmp {
    server {
        listen 1935;
        chunk_size 4096;

        application live {
            push  "push.stream";
            pull  "live.stream";
            live  on;
        }
    }
}

µÇ¼ºó¸´ÖÆ

3. ½¨Éè RTMP Á÷Ô´

½¨ÉèÁ½¸öÁ÷Ô´£¬Ò»¸öÓÃÓÚÍÆËÍÁ÷£¬Ò»¸öÓÃÓÚÀ­È¡Á÷£º

# ÍÆËÍÁ÷Ô´
ffmpeg -re -i input.mp4 -vcodec libx264 -acodec aac -f flv rtmp://localhost:1935/live/push.stream

# À­È¡Á÷Ô´
ffmpeg -i rtmp://localhost:1935/live/live.stream output.mp4

µÇ¼ºó¸´ÖÆ

4. ÖØÆô Nginx

systemctl restart nginx

µÇ¼ºó¸´ÖÆ

5. ÑéÖ¤ÉèÖÃ

Äú¿ÉÒÔʹÓà VLC ýÌå²¥·ÅÆ÷ÅþÁ¬µ½ RTMP Á÷Ô´ÒÔÑéÖ¤ÉèÖãº

ÍÆËÍÁ÷£ºrtmp://localhost:1935/live/push.stream

À­È¡Á÷£ºrtmp://localhost:1935/live/live.stream

ÒÔÉϾÍÊÇnginxÔõÑùÉèÖÃrtmpµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

13452372176

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

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

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