转:Windows Live Writer 支持的博客

转:http://www.cnblogs.com/me115/archive/2010/03/14/1685454.html
 

安装WLWSupport插件组合使用Windows Live Writer,完美支持标签编辑,别名,摘要,上传;完全可视化。

Windows Live Writer支持有metaweblog api的博客。独立博客用户好说,一般都有。

比较著名的,外国有Live Spaces,blogger , wordpress, radio userland,livejournal等

国内有博客园、CSDN、网易博客、bokee.com博客、myspace.cn博客,支持Writer;不支持的有,新浪博客、QQ空间、赛我网(Cyworld)、blogcn.com博客、和讯博客,使用这些的朋友还是趁早找个博客搬家工具换个地方

测试:

1. Live Space

需要:用户名 密码

2. 网易博客

需要:选日志主页URL:http://**.blog.163.com

163的博客设置简单,好用

3. CSDN博客

需要:选日志主页URL:http://blog.csdn.net/**

选日志类型:Metaweblog API

选远程发布URL: http://blog.csdn.net/**/services/MetaBlogApi.aspx

CSDN集成的是Discuz的Uhome

注册3个月才能用API

4. BlogBus

需要:选日志主页URL:http://**.blogbus.com

选日志类型:Atom Publishing Protocol

选远程发布URL: http://**.blogbus.com/api

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
cv::VideoWriter 可以用来将 OpenCV 的图像序列写入本地视频文件,而不是网络流。如果你要将视频流写入网络流,你需要使用不同的库和方法。例如,FFmpeg 是一个流媒体处理库,它可以将视频数据编码为流,并将其发送到网络。你可以使用 FFmpeg 的 API 在 C++ 中编写代码来实现这一点。以下是一个使用 FFmpeg 将本地视频文件写入网络流的简单示例: ```c++ #include <iostream> #include <sstream> #include <string> #include <cstdio> #include <chrono> #include <thread> #include <cstdlib> #include <cstring> #include <stdexcept> #include <sstream> #include <opencv2/opencv.hpp> extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libavutil/opt.h> #include <libavutil/imgutils.h> } using namespace std; using namespace cv; int main(int argc, char** argv) { // Open the local video file VideoCapture cap("video.mp4"); if (!cap.isOpened()) { cerr << "Error: Unable to open video file" << endl; return -1; } // Initialize FFmpeg av_register_all(); avcodec_register_all(); avformat_network_init(); // Create the output context AVFormatContext* outctx = nullptr; if (avformat_alloc_output_context2(&outctx, nullptr, "flv", "rtmp://localhost/live") < 0) { cerr << "Error: Unable to create output context" << endl; return -1; } // Open the output stream AVStream* outstream = avformat_new_stream(outctx, nullptr); if (!outstream) { cerr << "Error: Unable to create output stream" << endl; return -1; } // Copy the codec parameters from the input stream AVCodecParameters* inparams = cap.getBackendType() == VideoCapture::CAP_V4L ? nullptr : avcodec_parameters_alloc(); if (inparams) { inparams->codec_type = AVMEDIA_TYPE_VIDEO; inparams->codec_id = AV_CODEC_ID_H264; inparams->width = cap.get(CV_CAP_PROP_FRAME_WIDTH); inparams->height = cap.get(CV_CAP_PROP_FRAME_HEIGHT); inparams->format = AV_PIX_FMT_BGR24; inparams->profile = FF_PROFILE_H264_BASELINE; inparams->bit_rate = 1000000; inparams->bit_rate_tolerance = 10000000; inparams->ticks_per_frame = 2; inparams->time_base.num = 1; inparams->time_base.den = 30; avcodec_parameters_to_context(outstream->codecpar, inparams); } // Open the codec AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_H264); if (!codec) { cerr << "Error: Unable to find codec" << endl; return -1; } AVCodecContext* codecctx = avcodec_alloc_context3(codec); if (!codecctx) { cerr << "Error: Unable to create codec context" << endl; return -1; } avcodec_parameters_to_context(codecctx, inparams); codecctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; if (avcodec_open2(codecctx, codec, nullptr) < 0) { cerr << "Error: Unable to open codec" << endl; return -1; } avcodec_parameters_from_context(outstream->codecpar, codecctx); // Open the output stream if (avio_open(&outctx->pb, "rtmp://localhost/live", AVIO_FLAG_WRITE) < 0) { cerr << "Error: Unable to open output stream" << endl; return -1; } avformat_write_header(outctx, nullptr); // Write the frames to the output stream AVPacket pkt; av_init_packet(&pkt); Mat frame; while (cap.read(frame)) { // Encode the frame AVFrame* avframe = av_frame_alloc(); avframe->format = codecctx->pix_fmt; avframe->width = codecctx->width; avframe->height = codecctx->height; av_frame_get_buffer(avframe, 32); Mat dst(codecctx->height, codecctx->width, CV_8UC3, avframe->data[0], avframe->linesize[0]); cvtColor(frame, dst, COLOR_BGR2YUV_I420); avframe->pts = cap.get(CV_CAP_PROP_POS_FRAMES); avcodec_send_frame(codecctx, avframe); while (avcodec_receive_packet(codecctx, &pkt) == 0) { pkt.stream_index = outstream->index; av_interleaved_write_frame(outctx, &pkt); av_packet_unref(&pkt); } av_frame_free(&avframe); } // Flush the codec avcodec_send_frame(codecctx, nullptr); while (avcodec_receive_packet(codecctx, &pkt) == 0) { pkt.stream_index = outstream->index; av_interleaved_write_frame(outctx, &pkt); av_packet_unref(&pkt); } // Close the output stream av_write_trailer(outctx); avcodec_close(codecctx); avcodec_free_context(&codecctx); avformat_close_input(&outctx); avformat_free_context(outctx); return 0; } ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值