flv

streaming FLV to RTMP with FFMpeg using H264 codec and C++ API to flv.js

江枫思渺然 提交于 2021-02-06 10:13:39
问题 I would like to stream live video from webcam using OpenCV using H264 codec and converting that to FLV then stream over RTMP server and catch the stream in browser with flv.js. Basically I have everything working except that I cannot read stream in flv.js. I can open stream with ffplay so I think at least most of the things are set correctly. My current implementation: #include <iostream> #include <vector> #include <opencv2/highgui.hpp> #include <opencv2/video.hpp> extern "C" { #include

streaming FLV to RTMP with FFMpeg using H264 codec and C++ API to flv.js

此生再无相见时 提交于 2021-02-06 10:09:14
问题 I would like to stream live video from webcam using OpenCV using H264 codec and converting that to FLV then stream over RTMP server and catch the stream in browser with flv.js. Basically I have everything working except that I cannot read stream in flv.js. I can open stream with ffplay so I think at least most of the things are set correctly. My current implementation: #include <iostream> #include <vector> #include <opencv2/highgui.hpp> #include <opencv2/video.hpp> extern "C" { #include

How can I remove metadata from a flv file?

泄露秘密 提交于 2020-11-24 22:41:41
问题 with ffmpeg I can use the command below to remove the metadata in General section ffmpeg -i input.flv -c copy -metadata description= -metadata title= output.flv What if I want to remove the metadata in Video and Audio section? EDIT: I want to remove writing library 回答1: With FFmpeg v4.0 or newer, for your particular case, ffmpeg -i in -c copy -bitexact -map_metadata -1 -vbsf filter_units=remove_types=6 out 来源: https://stackoverflow.com/questions/52024631/how-can-i-remove-metadata-from-a-flv

h264和aac封装flv

ⅰ亾dé卋堺 提交于 2020-02-04 00:34:15
flv格式解析 FLV是一个二进制文件,简单来说,其是由一个文件头(FLV header)和很多tag组成(FLV body)。tag又可以分成三类:audio,video,script,分别代表音频流(0x8),视频流(0x9),脚本流(0x12),而每个tag又由tag header和tag data组成。 flv官方标准文档 分析之前推荐一个flv分析工具: flv分析工具 工具的使用说明和出处: 使用说明 以一个具体的flv文件为例具体分析: 文件头由9bytes组成: [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-kbntqCE6-1580714898238)(https://i.loli.net/2020/01/20/SADYzaEdRkWUGQ9.png)] 前3个bytes是文件类型,总是“FLV”,也就是(0x46 0x4C 0x56)。第4btye是版本号,目前一般是0x01。第5byte是流的信息,倒数第一bit是1表示有视频(0x01),倒数第三bit是1表示有音频(0x4),有视频又有音频就是0x01 | 0x04(0x05),其他都应该是0。最后4bytes表示FLV 头的长度,3+1+1+4 = 9。 FLV header后面就是FLV body,FLV body中包含很多个FLV tag,tag的分类有三种

读书笔记-第六课

£可爱£侵袭症+ 提交于 2020-01-20 04:59:15
前言 查看了相关文章然后一笔一笔打代码再调试成功出结果, eguid的博客 不保证代码能够原封不动就能运行, 这里做一下记录。 ps:代码内容有改动,原版的可以看原作者的。 代码 package net . w2p . JCVStudio . zhiboStudy ; import org . bytedeco . ffmpeg . global . avcodec ; import org . bytedeco . javacv . CanvasFrame ; import org . bytedeco . javacv . FFmpegFrameRecorder ; import org . bytedeco . javacv . Frame ; import org . bytedeco . javacv . OpenCVFrameConverter ; import org . bytedeco . opencv . global . opencv_imgproc ; import org . bytedeco . opencv . opencv_core . Mat ; import org . bytedeco . opencv . opencv_core . Point ; import org . bytedeco . opencv . opencv_core .

How is flv format contained in RTMP?

本秂侑毒 提交于 2020-01-16 08:59:38
问题 I'm using wireshark to inspect the packets but I'm confused by how exactly flv format is followed in RTMP streaming. FLV doc specifies the tag to be: tag type, datasize, timestamp, timestampExtended, streamID, VideoTagHeader, but I'm getting [fmt] [timestamp 2000] [body size], [typeID (tag type)] [stream ID] 04 00 07 d0 00 00 2c 09 01 00 00 00 When streaming, does the FLV timestamp just use the RTMP timestamp? and therefore doesn't follow the big-endian format but rather use the RTMP extended

Opencv CV_FOURCC('F','L','V','1') not working?

谁都会走 提交于 2020-01-13 05:12:08
问题 I want to write .flv file from Opencv and spent so much time on it... OpenCv 2.3 Documentation says we can create flv file with this codec CV_FOURCC('F','L','V','1') but I am always getting this error . [flv @ 0x9bf5000] Tag FLV1/0x31564c46 incompatible with output codec id '22' Please help.... Currently I am using OpenCv 2.3 on Ubuntu 10.10 回答1: I know this is quite old, but I'll add my experience to this wall incase future people have this problem. I encountered this using the PIM1 fourCC

How to split flv file by size using FFmpeg or mencoder or smth else?

爱⌒轻易说出口 提交于 2020-01-11 11:53:08
问题 I need to split an flv file into chunks of the known size on linux server. For example my original file is 9Mb and the chunk size is 4Mb. So I should get 3 parts - 4Mb, 4Mb and 1 Mb. Seems that FFmpeg can split only by time. Mencoder can start by time (-ss TIME) and finish by size ( -endpos SIZE MB). But if start second of the first chunk is obviously 0, then how can I get start second for next chunks? Do you have any suggestions? Thanks in advance. 回答1: calculate ~time (sec) of every block &

Post FLV to wall

六月ゝ 毕业季﹏ 提交于 2020-01-05 08:50:50
问题 If I use the Graph API to post something on a user's wall, the "source" attribute doesn't seem to work if the video source is an FLV. What I expect is for Facebook to wrap their native video player around the FLV file, but it doesn't happen. Here's how I'm calling the API: http://i.imgur.com/0LpFJ.jpg Any ideas? 回答1: You can't include FLV content directly; you need to include your own SWF player, and attach the URL of the player you want displayed (passing the FLV source as a parameter in the

Accurate seek when using HTTP Pseudostreaming in Flash

我的未来我决定 提交于 2020-01-04 10:40:06
问题 Good day! I've faced one problem when developing my video player in AS3. I use HTTP pseudostreaming for FLV and MP4 (here is a description of pseudostreaming: http://flowplayer.org/plugins/streaming/pseudostreaming.html) The problem : The size distribution over flv/mp4 file is not linear, so seeking based on (stream.bytesLoaded / stream.bytesTotal) * video.duration is not accurate. My solution For this solution we need to have keypoints\seekpoints in video file (you will need the anyway) at