{"id":12287,"date":"2025-04-18T19:26:53","date_gmt":"2025-04-18T11:26:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/12287.html"},"modified":"2025-04-18T19:26:53","modified_gmt":"2025-04-18T11:26:53","slug":"c%e8%b0%83%e7%94%a8ffmpeg%e5%ba%93%e6%9d%a5%e5%ae%9e%e7%8e%b0%e5%b0%86rtsp%e6%b5%81%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e7%9a%84%e8%a7%86%e9%a2%91%e6%b5%81%e6%8b%89%e5%8f%96%e4%b8%8b%e6%9d%a5","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/12287.html","title":{"rendered":"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f"},"content":{"rendered":"<h2>1. \u5f15\u5165ffmpeg\u7684Lib\u548c\u5934\u6587\u4ef6<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112652-680236fc7c21c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112652-680236fc89f51.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112652-680236fc9af44.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><\/p>\n<h2>2. \u5c06\u7a0b\u5e8f\u8fd0\u884c\u73af\u5883\u653e\u5165ffmpeg\u52a8\u6001\u5e93<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112652-680236fcaca5c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><\/p>\n<h2>2.\u4ee3\u7801\u5b9e\u73b0<\/h2>\n<h3>2.1 \u5f15\u5165\u5934\u6587\u4ef6<\/h3>\n<p>&#8220;`bash<br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;string&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;cstring&gt;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">extern<\/span> <span class=\"token string\">\\&#8221;C\\&#8221;<\/span> <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;libavformat\/avformat.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;libavcodec\/avcodec.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;libavutil\/avutil.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;libavutil\/imgutils.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;libavutil\/error.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;libswscale\/swscale.h&gt;<\/span><\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>2.2 \u6309\u6b65\u9aa4\u5206\u89e3\u5b9e\u73b0<\/h3>\n<p><span class=\"token function\">av_log_set_level<\/span><span class=\"token punctuation\">(<\/span>AV_LOG_DEBUG<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5f00\u542fFFmpeg\u65e5\u5fd7<\/span><\/p>\n<h4>av_log_set_level \u662f FFmpeg \u5e93\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u51fd\u6570\uff0c\u7528\u4e8e\u8bbe\u7f6e\u65e5\u5fd7\u8f93\u51fa\u7684\u7ea7\u522b\u3002<\/h4>\n<p>level\uff1a\u8fd9\u662f\u4e00\u4e2a\u6574\u6570\u7c7b\u578b\u7684\u53c2\u6570\uff0c\u7528\u4e8e\u6307\u5b9a\u65e5\u5fd7\u7684\u8f93\u51fa\u7ea7\u522b\u3002FFmpeg \u5b9a\u4e49\u4e86\u591a\u4e2a\u65e5\u5fd7\u7ea7\u522b\u5e38\u91cf\uff0c\u5e38\u89c1\u7684\u7ea7\u522b\u53ca\u5176\u542b\u4e49\u5982\u4e0b\uff1a<br \/>\nAV_LOG_QUIET\uff08\u503c\u4e3a -8\uff09\uff1a\u4e0d\u8f93\u51fa\u4efb\u4f55\u65e5\u5fd7\u4fe1\u606f\u3002<br \/>\nAV_LOG_PANIC\uff08\u503c\u4e3a 0\uff09\uff1a\u8f93\u51fa\u975e\u5e38\u4e25\u91cd\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u7a0b\u5e8f\u53ef\u80fd\u65e0\u6cd5\u7ee7\u7eed\u8fd0\u884c\u3002<br \/>\nAV_LOG_FATAL\uff08\u503c\u4e3a 8\uff09\uff1a\u8f93\u51fa\u81f4\u547d\u9519\u8bef\u4fe1\u606f\uff0c\u7a0b\u5e8f\u53ef\u80fd\u4f1a\u7ec8\u6b62\u3002<br \/>\nAV_LOG_ERROR\uff08\u503c\u4e3a 16\uff09\uff1a\u8f93\u51fa\u666e\u901a\u9519\u8bef\u4fe1\u606f\u3002<br \/>\nAV_LOG_WARNING\uff08\u503c\u4e3a 24\uff09\uff1a\u8f93\u51fa\u8b66\u544a\u4fe1\u606f\uff0c\u63d0\u793a\u53ef\u80fd\u5b58\u5728\u7684\u95ee\u9898\u3002<br \/>\nAV_LOG_INFO\uff08\u503c\u4e3a 32\uff09\uff1a\u8f93\u51fa\u4e00\u822c\u7684\u4fe1\u606f\uff0c\u5982\u7f16\u7801\u5668\u53c2\u6570\u3001\u6587\u4ef6\u4fe1\u606f\u7b49\u3002<br \/>\nAV_LOG_VERBOSE\uff08\u503c\u4e3a 40\uff09\uff1a\u8f93\u51fa\u8be6\u7ec6\u7684\u4fe1\u606f\u3002<br \/>\nAV_LOG_DEBUG\uff08\u503c\u4e3a 48\uff09\uff1a\u8f93\u51fa\u8c03\u8bd5\u4fe1\u606f\uff0c\u5305\u542b\u5927\u91cf\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u901a\u5e38\u7528\u4e8e\u5f00\u53d1\u548c\u8c03\u8bd5\u9636\u6bb5\u3002<br \/>\nAV_LOG_TRACE\uff08\u503c\u4e3a 56\uff09\uff1a\u8f93\u51fa\u6700\u8be6\u7ec6\u7684\u8ddf\u8e2a\u4fe1\u606f\u3002<\/p>\n<p>AVFormatContext<span class=\"token operator\">*<\/span> input_ctx <span class=\"token operator\">=<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nAVFormatContext<span class=\"token operator\">*<\/span> output_ctx <span class=\"token operator\">=<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 1. \u521d\u59cb\u5316\u7f51\u7edc\u534f\u8bae\uff08\u5fc5\u987b\uff01\u5426\u5219\u65e0\u6cd5\u5904\u7406rtsp\uff09<\/span><br \/>\n<span class=\"token function\">avformat_network_init<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>avformat_network_init \u662f FFmpeg \u5e93\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u51fd\u6570\uff0c\u4e3b\u8981\u7528\u4e8e\u521d\u59cb\u5316\u7f51\u7edc\u76f8\u5173\u7684\u7ec4\u4ef6\uff0c\u4ee5\u652f\u6301\u7f51\u7edc\u534f\u8bae\u7684\u4f7f\u7528\uff0c\u6bd4\u5982 RTSP\u3001HTTP \u7b49\u3002<\/h4>\n<p>\u8fd4\u56de\u503c\uff1a<\/p>\n<ul>\n<li>\u6210\u529f\uff1a\u8fd4\u56de\u503c\u4e3a 0\uff0c\u8868\u793a\u7f51\u7edc\u521d\u59cb\u5316\u6210\u529f\u3002<\/li>\n<li>\u5931\u8d25\uff1a\u8fd4\u56de\u4e00\u4e2a\u8d1f\u7684\u9519\u8bef\u7801\uff0c\u6307\u793a\u521d\u59cb\u5316\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4e86\u95ee\u9898\u3002<\/li>\n<\/ul>\n<p>\u529f\u80fd\u7528\u9014 \u5728\u4f7f\u7528 FFmpeg \u5904\u7406\u7f51\u7edc\u76f8\u5173\u7684\u97f3\u89c6\u9891\u6d41\u65f6\uff0c\u4f8b\u5982\u4ece RTSP \u670d\u52a1\u5668\u62c9\u53d6\u6d41\u3001\u901a\u8fc7 HTTP \u4e0b\u8f7d\u89c6\u9891\u6587\u4ef6\u7b49\uff0c\u9700\u8981\u5148\u8c03\u7528 avformat_network_init \u51fd\u6570\u6765\u521d\u59cb\u5316\u7f51\u7edc\u73af\u5883\u3002\u5b83\u4f1a\u521d\u59cb\u5316\u5e95\u5c42\u7684\u7f51\u7edc\u5e93\uff08\u5982 socket \u5e93\u7b49\uff09\uff0c\u786e\u4fdd\u540e\u7eed\u7684\u7f51\u7edc\u64cd\u4f5c\u80fd\u591f\u6b63\u5e38\u8fdb\u884c\u3002<\/p>\n<p><span class=\"token comment\">\/\/ 2. \u6253\u5f00\u8f93\u5165\u6d41\uff08RTSP\uff09<\/span><br \/>\nAVDictionary<span class=\"token operator\">*<\/span> options <span class=\"token operator\">=<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">av_dict_set<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>options<span class=\"token punctuation\">,<\/span> <span class=\"token string\">\\&#8221;rtsp_transport\\&#8221;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">\\&#8221;tcp\\&#8221;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5f3a\u5236\u4f7f\u7528TCP\u4f20\u8f93<\/span><br \/>\n<span class=\"token function\">av_dict_set<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>options<span class=\"token punctuation\">,<\/span> <span class=\"token string\">\\&#8221;stimeout\\&#8221;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">\\&#8221;5000000\\&#8221;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ \u8bbe\u7f6e\u8d85\u65f65\u79d2\uff08\u5355\u4f4d\u5fae\u79d2\uff09<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> <span class=\"token keyword\">char<\/span><span class=\"token operator\">*<\/span> input_url <span class=\"token operator\">=<\/span> <span class=\"token string\">\\&#8221;rtsp:\/\/127.0.0.1:554\/your_stream_key\\&#8221;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">int<\/span> ret <span class=\"token operator\">=<\/span> <span class=\"token function\">avformat_open_input<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>input_ctx<span class=\"token punctuation\">,<\/span> input_url<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&amp;<\/span>options<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>ret <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\n<span class=\"token comment\">\/\/std::cerr &lt;&lt; \\&#8221;\u65e0\u6cd5\u6253\u5f00\u8f93\u5165\u6d41: \\&#8221; &lt;&lt; av_err2str(ret) &lt;&lt; std::endl;<\/span><br \/>\n<span class=\"token keyword\">return<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>avformat_open_input \u662f FFmpeg \u5e93\u4e2d\u4e00\u4e2a\u975e\u5e38\u5173\u952e\u7684\u51fd\u6570\uff0c\u4e3b\u8981\u7528\u4e8e\u6253\u5f00\u8f93\u5165\u7684\u97f3\u89c6\u9891\u6587\u4ef6\u6216\u8005\u7f51\u7edc\u6d41\uff0c\u4e3a\u540e\u7eed\u7684\u97f3\u89c6\u9891\u6570\u636e\u8bfb\u53d6\u548c\u5904\u7406\u505a\u51c6\u5907\u3002<\/h4>\n<p>\u53c2\u6570\u89e3\u91ca<\/p>\n<ul>\n<li>AVFormatContext **ps\uff1a \u8fd9\u662f\u4e00\u4e2a\u6307\u5411 AVFormatContext \u6307\u9488\u7684\u6307\u9488\u3002AVFormatContext \u662f FFmpeg \u4e2d\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u7ed3\u6784\u4f53\uff0c\u5b83\u5305\u542b\u4e86\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u7684\u5168\u5c40\u4fe1\u606f\uff0c\u5982\u6587\u4ef6\u683c\u5f0f\u3001\u6d41\u4fe1\u606f\u7b49\u3002\u51fd\u6570\u4f1a\u5206\u914d\u5e76\u521d\u59cb\u5316\u4e00\u4e2a AVFormatContext \u7ed3\u6784\u4f53\uff0c\u5e76\u5c06\u5176\u6307\u9488\u5b58\u50a8\u5728 *ps \u4e2d\u3002<\/li>\n<li>const char *url\uff1a \u8f93\u5165\u6587\u4ef6\u6216\u6d41\u7684\u8def\u5f84\u6216 URL\u3002\u5982\u679c\u662f\u672c\u5730\u6587\u4ef6\uff0c\u5c31\u662f\u6587\u4ef6\u7684\u8def\u5f84\uff1b\u5982\u679c\u662f\u7f51\u7edc\u6d41\uff0c\u5c31\u662f\u5bf9\u5e94\u7684\u7f51\u7edc\u5730\u5740\uff0c\u5982 RTSP\u3001HTTP \u7b49\u534f\u8bae\u7684 URL\u3002<\/li>\n<li>ff_const59 AVInputFormat *fmt\uff1a \u6307\u5b9a\u8f93\u5165\u6587\u4ef6\u7684\u683c\u5f0f\u3002\u4e00\u822c\u8bbe\u7f6e\u4e3a NULL\uff0c\u8fd9\u6837 FFmpeg \u4f1a\u81ea\u52a8\u63a2\u6d4b\u8f93\u5165\u6587\u4ef6\u7684\u683c\u5f0f\u3002\u5982\u679c\u4f60\u660e\u786e\u77e5\u9053\u8f93\u5165\u6587\u4ef6\u7684\u683c\u5f0f\uff0c\u4e5f\u53ef\u4ee5\u4f20\u5165\u5bf9\u5e94\u7684 AVInputFormat \u6307\u9488\u3002<\/li>\n<li>AVDictionary **options\uff1a \u4e00\u4e2a\u6307\u5411 AVDictionary \u6307\u9488\u7684\u6307\u9488\uff0c\u7528\u4e8e\u4f20\u9012\u4e00\u4e9b\u989d\u5916\u7684\u9009\u9879\u53c2\u6570\u3002\u4f8b\u5982\uff0c\u5728\u6253\u5f00 RTSP \u6d41\u65f6\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e9b\u7f51\u7edc\u76f8\u5173\u7684\u53c2\u6570\u3002\u5982\u679c\u4e0d\u9700\u8981\u989d\u5916\u7684\u9009\u9879\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e3a NULL\u3002<\/li>\n<\/ul>\n<p>\u8fd4\u56de\u503c<\/p>\n<ul>\n<li>\u6210\u529f\uff1a\u8fd4\u56de\u503c\u4e3a 0\uff0c\u8868\u793a\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u6210\u529f\u6253\u5f00\u3002<\/li>\n<li>\u5931\u8d25\uff1a\u8fd4\u56de\u4e00\u4e2a\u8d1f\u7684\u9519\u8bef\u7801\uff0c\u6307\u793a\u6253\u5f00\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4e86\u95ee\u9898\u3002\u53ef\u4ee5\u4f7f\u7528 av_err2str \u51fd\u6570\u5c06\u9519\u8bef\u7801\u8f6c\u6362\u4e3a\u53ef\u8bfb\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<p><span class=\"token comment\">\/\/ 3. \u83b7\u53d6\u6d41\u4fe1\u606f<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token function\">avformat_find_stream_info<\/span><span class=\"token punctuation\">(<\/span>input_ctx<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\nstd<span class=\"token double-colon punctuation\">::<\/span>cerr <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">\\&#8221;\u65e0\u6cd5\u83b7\u53d6\u6d41\u4fe1\u606f\\&#8221;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token double-colon punctuation\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">avformat_close_input<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>input_ctx<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">return<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>avformat_find_stream_info \u662f FFmpeg \u5e93\u4e2d\u4e00\u4e2a\u7528\u4e8e\u83b7\u53d6\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u8be6\u7ec6\u4fe1\u606f\u7684\u91cd\u8981\u51fd\u6570<\/h4>\n<p>\u53c2\u6570\u89e3\u91ca<\/p>\n<ul>\n<li>AVFormatContext *ic\uff1a \u6307\u5411 AVFormatContext \u7ed3\u6784\u4f53\u7684\u6307\u9488\u3002AVFormatContext \u5305\u542b\u4e86\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u7684\u5168\u5c40\u4fe1\u606f\uff0c\u901a\u5e38\u662f\u5728\u8c03\u7528 avformat_open_input \u51fd\u6570\u6210\u529f\u6253\u5f00\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u540e\u5f97\u5230\u7684\u3002\u6b64\u51fd\u6570\u4f1a\u57fa\u4e8e\u8be5\u4e0a\u4e0b\u6587\u53bb\u5206\u6790\u6d41\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/li>\n<li>AVDictionary **options\uff1a \u4e00\u4e2a\u6307\u5411 AVDictionary \u6307\u9488\u7684\u6307\u9488\uff0c\u7528\u4e8e\u4f20\u9012\u989d\u5916\u7684\u9009\u9879\u53c2\u6570\u3002\u8fd9\u4e9b\u9009\u9879\u53ef\u4ee5\u5f71\u54cd\u4fe1\u606f\u67e5\u627e\u7684\u884c\u4e3a\u3002\u82e5\u4e0d\u9700\u8981\u989d\u5916\u9009\u9879\uff0c\u53ef\u5c06\u5176\u8bbe\u7f6e\u4e3a NULL\u3002<\/li>\n<\/ul>\n<p>\u8fd4\u56de\u503c<\/p>\n<ul>\n<li>\u6210\u529f\uff1a\u8fd4\u56de\u503c\u5927\u4e8e\u7b49\u4e8e 0\uff0c\u8868\u793a\u6210\u529f\u83b7\u53d6\u5230\u8f93\u5165\u6d41\u7684\u4fe1\u606f\u3002<\/li>\n<li>\u5931\u8d25\uff1a\u8fd4\u56de\u4e00\u4e2a\u8d1f\u7684\u9519\u8bef\u7801\uff0c\u4ee3\u8868\u5728\u67e5\u627e\u6d41\u4fe1\u606f\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4e86\u95ee\u9898\u3002\u53ef\u4ee5\u4f7f\u7528 av_err2str \u51fd\u6570\u5c06\u9519\u8bef\u7801\u8f6c\u6362\u4e3a\u53ef\u8bfb\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/li>\n<li><\/li>\n<\/ul>\n<p>\u529f\u80fd avformat_find_stream_info \u51fd\u6570\u7684\u4e3b\u8981\u529f\u80fd\u662f\u8bfb\u53d6\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u7684\u6570\u636e\u5305\uff0c\u5206\u6790\u5176\u4e2d\u7684\u4fe1\u606f\uff0c\u4ece\u800c\u586b\u5145 AVFormatContext \u7ed3\u6784\u4f53\u4e2d\u5173\u4e8e\u6d41\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u8fd9\u4e9b\u4fe1\u606f\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1a \u6bcf\u4e2a\u6d41\u7684\u7f16\u89e3\u7801\u5668\u4fe1\u606f\uff08\u5982\u89c6\u9891\u7684 H.264\u3001\u97f3\u9891\u7684 AAC \u7b49\uff09\u3002 \u89c6\u9891\u6d41\u7684\u5206\u8fa8\u7387\u3001\u5e27\u7387\u3002 \u97f3\u9891\u6d41\u7684\u91c7\u6837\u7387\u3001\u58f0\u9053\u6570\u7b49\u3002<\/p>\n<h4>avformat_close_input \u662f FFmpeg \u5e93\u4e2d\u7528\u4e8e\u5173\u95ed\u5df2\u6253\u5f00\u7684\u8f93\u5165\u6587\u4ef6\u6216\u6d41\uff0c\u5e76\u91ca\u653e\u76f8\u5173\u8d44\u6e90\u7684\u91cd\u8981\u51fd\u6570\u3002<\/h4>\n<p><span class=\"token comment\">\/\/ 4. \u521b\u5efa\u8f93\u51fa\u6587\u4ef6\uff08MP4\uff09<\/span><br \/>\n<span class=\"token keyword\">const<\/span> <span class=\"token keyword\">char<\/span><span class=\"token operator\">*<\/span> output_filename <span class=\"token operator\">=<\/span> <span class=\"token string\">\\&#8221;output.mp4\\&#8221;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">avformat_alloc_output_context2<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>output_ctx<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">,<\/span> output_filename<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span>output_ctx<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\nstd<span class=\"token double-colon punctuation\">::<\/span>cerr <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">\\&#8221;\u65e0\u6cd5\u521b\u5efa\u8f93\u51fa\u4e0a\u4e0b\u6587\\&#8221;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token double-colon punctuation\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">avformat_close_input<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>input_ctx<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">return<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>a<\/h4>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb879\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u5f15\u8a00\u5728 FFmpeg \u4e2d\uff0c\u683c\u5f0f\u4e0a\u4e0b\u6587\uff08Format Context\uff09\u662f\u4e00\u4e2a\u975e\u5e38\u6838\u5fc3\u4e14\u91cd\u8981\u7684\u6982\u5ff5\uff0c\u4e3b\u8981\u901a\u8fc7 AVFormatContext \u7ed3\u6784\u4f53\u6765\u8868\u793a\u3002\u5b9a\u4e49AVFormatContext \u662f FFmpeg \u5e93\u4e2d\u7528\u4e8e\u5b58\u50a8\u97f3\u89c6\u9891\u6587\u4ef6\u6216\u6d41\u7684\u5168\u5c40\u4fe1\u606f\u7684\u7ed3\u6784\u4f53\uff0c\u5b83\u53ef\u4ee5\u770b\u4f5c\u662f\u97f3\u89c6\u9891\u6570\u636e\u5904\u7406\u8fc7\u7a0b\u4e2d\u7684\u4e00\u4e2a \u201c\u4fe1\u606f\u5bb9\u5668\u201d\uff0c\u7ba1\u7406\u7740\u8f93\u5165\u6216\u8f93\u51fa\u6587\u4ef6\u7684\u5404\u79cd\u683c\u5f0f\u76f8\u5173\u4fe1\u606f\u3002\u4f5c\u7528\u8f93\u5165\u6587\u4ef6\u5904\u7406\u683c\u5f0f\u63a2\u6d4b\uff1a\u5f53\u6253\u5f00\u4e00\u4e2a\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u65f6\uff0cFFmpeg \u4f1a\u901a\u8fc7\u683c\u5f0f\u4e0a\u4e0b\u6587\u6765\u63a2\u6d4b\u6587\u4ef6\u7684\u683c\u5f0f\uff0c\u786e\u5b9a\u662f MP4\u3001AVI\u3001FLV \u7b49\u54ea\u79cd\u5177\u4f53\u7684\u6587\u4ef6\u683c\u5f0f\u3002_c++ rtsp\u6d41\u7f16\u7801\u683c\u5f0f\u8f6c\u6362<\/p>\n","protected":false},"author":2,"featured_media":12283,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,667,213,43],"topic":[],"class_list":["post-12287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c","tag-cffmpeg","tag-ffmpeg","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/12287.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb879\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u5f15\u8a00\u5728 FFmpeg \u4e2d\uff0c\u683c\u5f0f\u4e0a\u4e0b\u6587\uff08Format Context\uff09\u662f\u4e00\u4e2a\u975e\u5e38\u6838\u5fc3\u4e14\u91cd\u8981\u7684\u6982\u5ff5\uff0c\u4e3b\u8981\u901a\u8fc7 AVFormatContext \u7ed3\u6784\u4f53\u6765\u8868\u793a\u3002\u5b9a\u4e49AVFormatContext \u662f FFmpeg \u5e93\u4e2d\u7528\u4e8e\u5b58\u50a8\u97f3\u89c6\u9891\u6587\u4ef6\u6216\u6d41\u7684\u5168\u5c40\u4fe1\u606f\u7684\u7ed3\u6784\u4f53\uff0c\u5b83\u53ef\u4ee5\u770b\u4f5c\u662f\u97f3\u89c6\u9891\u6570\u636e\u5904\u7406\u8fc7\u7a0b\u4e2d\u7684\u4e00\u4e2a \u201c\u4fe1\u606f\u5bb9\u5668\u201d\uff0c\u7ba1\u7406\u7740\u8f93\u5165\u6216\u8f93\u51fa\u6587\u4ef6\u7684\u5404\u79cd\u683c\u5f0f\u76f8\u5173\u4fe1\u606f\u3002\u4f5c\u7528\u8f93\u5165\u6587\u4ef6\u5904\u7406\u683c\u5f0f\u63a2\u6d4b\uff1a\u5f53\u6253\u5f00\u4e00\u4e2a\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u65f6\uff0cFFmpeg \u4f1a\u901a\u8fc7\u683c\u5f0f\u4e0a\u4e0b\u6587\u6765\u63a2\u6d4b\u6587\u4ef6\u7684\u683c\u5f0f\uff0c\u786e\u5b9a\u662f MP4\u3001AVI\u3001FLV \u7b49\u54ea\u79cd\u5177\u4f53\u7684\u6587\u4ef6\u683c\u5f0f\u3002_c++ rtsp\u6d41\u7f16\u7801\u683c\u5f0f\u8f6c\u6362\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/12287.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T11:26:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112652-680236fc7c21c.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/12287.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/12287.html\",\"name\":\"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T11:26:53+00:00\",\"dateModified\":\"2025-04-18T11:26:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/12287.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/12287.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/12287.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/12287.html","og_locale":"zh_CN","og_type":"article","og_title":"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb879\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u5f15\u8a00\u5728 FFmpeg \u4e2d\uff0c\u683c\u5f0f\u4e0a\u4e0b\u6587\uff08Format Context\uff09\u662f\u4e00\u4e2a\u975e\u5e38\u6838\u5fc3\u4e14\u91cd\u8981\u7684\u6982\u5ff5\uff0c\u4e3b\u8981\u901a\u8fc7 AVFormatContext \u7ed3\u6784\u4f53\u6765\u8868\u793a\u3002\u5b9a\u4e49AVFormatContext \u662f FFmpeg \u5e93\u4e2d\u7528\u4e8e\u5b58\u50a8\u97f3\u89c6\u9891\u6587\u4ef6\u6216\u6d41\u7684\u5168\u5c40\u4fe1\u606f\u7684\u7ed3\u6784\u4f53\uff0c\u5b83\u53ef\u4ee5\u770b\u4f5c\u662f\u97f3\u89c6\u9891\u6570\u636e\u5904\u7406\u8fc7\u7a0b\u4e2d\u7684\u4e00\u4e2a \u201c\u4fe1\u606f\u5bb9\u5668\u201d\uff0c\u7ba1\u7406\u7740\u8f93\u5165\u6216\u8f93\u51fa\u6587\u4ef6\u7684\u5404\u79cd\u683c\u5f0f\u76f8\u5173\u4fe1\u606f\u3002\u4f5c\u7528\u8f93\u5165\u6587\u4ef6\u5904\u7406\u683c\u5f0f\u63a2\u6d4b\uff1a\u5f53\u6253\u5f00\u4e00\u4e2a\u8f93\u5165\u6587\u4ef6\u6216\u6d41\u65f6\uff0cFFmpeg \u4f1a\u901a\u8fc7\u683c\u5f0f\u4e0a\u4e0b\u6587\u6765\u63a2\u6d4b\u6587\u4ef6\u7684\u683c\u5f0f\uff0c\u786e\u5b9a\u662f MP4\u3001AVI\u3001FLV \u7b49\u54ea\u79cd\u5177\u4f53\u7684\u6587\u4ef6\u683c\u5f0f\u3002_c++ rtsp\u6d41\u7f16\u7801\u683c\u5f0f\u8f6c\u6362","og_url":"https:\/\/www.wsisp.com\/helps\/12287.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T11:26:53+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112652-680236fc7c21c.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/12287.html","url":"https:\/\/www.wsisp.com\/helps\/12287.html","name":"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T11:26:53+00:00","dateModified":"2025-04-18T11:26:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/12287.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/12287.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/12287.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"C++\u8c03\u7528ffmpeg\u5e93\u6765\u5b9e\u73b0\u5c06rtsp\u6d41\u670d\u52a1\u5668\u4e0a\u7684\u89c6\u9891\u6d41\u62c9\u53d6\u4e0b\u6765\uff0c\u5e76\u4fdd\u5b58\u6210MP4\u683c\u5f0f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/12287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=12287"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/12287\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/12283"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=12287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=12287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=12287"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=12287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}