将 MJPEG 转码为 FLV 或 MP4

发布于 2024-09-11 00:12:07 字数 406 浏览 3 评论 0 原文

我想对来自网络摄像机的 MJPEG 流进行转码 (http://xx.yy. zz.tt:8080/video.cgi) 在 Linux 操作系统下转换为 FLV 或 MP4 流,以便用户可以使用基于 Web 的 Flash 播放器(例如 Flowplayer

我为此目的发现了 VLC,但我无法找出确切的命令行字符串。我还需要 HTTP 身份验证功能,因为 IP 摄像机访问受密码保护。

我也对任何非 VLC 解决方案(如果有的话)感兴趣(ffmpeg?)。

I want to transcode MJPEG stream that comes from IP camera (http://xx.yy.zz.tt:8080/video.cgi) to FLV or MP4 stream under Linux OS so that users can play the file using a web based Flash player such as Flowplayer.

I discovered VLC for that purpose but I cannot figure out the exact command line string. I also need HTTP authentication feature since IP camera access is password protected.

I also interested in any non-VLC solution if any (ffmpeg?).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

皇甫轩 2024-09-18 00:12:07

我过去在使用 IP 摄像机时使用过 Xuggler,他们使用 ffmpeg 来完成转码工作,所以这应该是可能的。如果我是你,我会使用这样的命令行来检查它是否受支持。
<代码>

ffmpeg -i http://xx.yy.zz.tt:8080/video.cgi -vcodec flv -qscale 1 -an output.flv

I've used Xuggler in the past when working with IP cameras and they use ffmpeg to do the transcoding work, so this should be possible. If I were you I'd work with a command line like this to check if its supported.

ffmpeg -i http://xx.yy.zz.tt:8080/video.cgi -vcodec flv -qscale 1 -an output.flv

伪心 2024-09-18 00:12:07

看来VLC可以做HTTP认证。
http://www.videolan.org/doc/play-howto/ zh04.html
我相信它可以输出为flv。
通常,我首先使用 GUI 查看它使用的参数,然后从那里开始。伙计,那里没有神奇的公式。

看来您可以通过类似以下内容输出到 flv:

:sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8080/}

http://forum .videolan.org/viewtopic.php?f=14&t=80722

也可以使用像 http://user:password@host:port/address

参考:https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=1139

appears VLC can do HTTP authentication.
http://www.videolan.org/doc/play-howto/en/ch04.html
and I believe it can output to flv.
Typically I start things going by using the GUI to see what it is using as parameters, then go from there. There's no magic formula there, mate.

Appears you can output to flv by something similar to:

:sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8080/}

http://forum.videolan.org/viewtopic.php?f=14&t=80722

Also might work FFmpeg with url like http://user:password@host:port/address

ref: https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=1139

笑,眼淚并存 2024-09-18 00:12:07

将用户和密码嵌入到同一个链接中,而不是 http://xx.yy.zz.tt:8080/video.cgi ,使用此 http://user:< a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="50203123231028287e29297e2a2a7e2424">[电子邮件受保护]:8080/video.cgi

Put the user and pass embedded in the same link, intead of http://xx.yy.zz.tt:8080/video.cgi ,use this http://user:[email protected]:8080/video.cgi

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文