rtsp流捕获 [英] rtsp stream capturing

查看:555
本文介绍了rtsp流捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一些通用的方式来转储rtsp流。我想知道,一些rtsp流正常运行,服务器发送一些可观看的视频。



openRTSP



首先,Google建议我 openRTSP 工具。

  openRTSP -4 $ {stream_link}> $ {output_file} 

但是,该工具转储的输出视频文件并不正确。视频解码器(ffdec)返回许多错误,如无法解码视频数据包和[h264]无帧!,这不适合我。



ffmpeg



然后我尝试使用ffmpeg工具转储rtsp流。

  ffmpeg -loglevel debug -i$ {stream_link}-s 640x480 -vcodec copy -acodec copy -y $ {output_file } 

但流式传输过程经常被错误中断:

 应用程序提供的无效,非单调递增dts到muxer在流0:730672> = 730672 
av_interleaved_write_frame():参数无效

我试图使用 - fflags igndts ,但是ffmpeg不会忽略这些错误。它没有任何意义,因为该错误实际上意味着音频和视频流异步发送。最糟糕的是,由于中断的转储导致的转储文件也不正确。 Ffdec返回一些错误:

 错误[mov,mp4,m4a,3gp,3g2,mj2] moov atom not found 
ERROR [ffdec] av_open_input_file:不允许操作

在我找到了一杯好谷歌之后,这是真的老 ffmpeg的复制器错误



mplayer



比我试图使用mplayer与LIVE_555 lib。

  mplayer -noframedrop -dumpfile $ {output_file} -dumpstream $ {stream_link} 

但我也有一些错误。

  Core dumped;)

问题



我想我做错了事情。这听起来真的很可笑,没有办法将rtsp流保存在正确和可播放的视频文件中。



也许还有一些可以帮助这个任务的工具?其实,我会感谢任何建议的各种图书馆和语言。但是这个过程应该是自动的,并且有cli。



细化



使用vlc-streamer在本地主机上完成了50%的实验,模拟rtsp-broadcastcaster。以下是我尝试遵循的手册



我有真正新鲜和最新的ffmpeg与x264支持,我已经安装了这个有用的线程。 vlc 保存rtsp流?它为我工作。我尝试使用图形界面。但它也应该从命令行工作。


I'm looking for some universal way to dump rtsp stream. I want to figure out, that some rtsp stream is working well and server is sending some watchable video.

openRTSP

At first, google recommends me openRTSP tool.

 openRTSP -4 ${stream_link} > ${output_file}

But output video file dumped by that tool is not really correct. Video decoder (ffdec) returns many errors like "Failed to decode video packet" and "[h264] no frame!", which don't suit me.

ffmpeg

Then I've tried to dump rtsp stream with ffmpeg tool.

ffmpeg -loglevel debug -i "${stream_link}" -s 640x480 -vcodec copy -acodec copy -y ${output_file}

But streaming process was interrupted often by error:

Application provided invalid, non monotonically increasing dts to muxer in stream 0: 730672 >= 730672
av_interleaved_write_frame(): Invalid argument

I'm trying to use --fflags igndts but ffmpeg doesn't ignore these errors. It doesn't make any sense, because that error actually means that audio and video streams are sending asynchronously. The worst thing is that dumped file, resulted by that interrupted dump, is not correct too. Ffdec return some error:

ERROR [mov,mp4,m4a,3gp,3g2,mj2] moov atom not found
ERROR [ffdec] av_open_input_file: Operation not permitted

After a nice cup of googling I've found, that it's really old ffmpeg's muxer bug.

mplayer

Than I've tried to use mplayer with LIVE_555 lib.

mplayer -noframedrop -dumpfile ${output_file} -dumpstream ${stream_link}

But I've got some errors too.

Stream not seekable!
Core dumped ;)

Question

I think I'm doing something wrong. It's sounds really ridiculous, that there is no way to save rtsp stream in correct and playable video-file.

Maybe there are some another tools which can help with that task? Actually, I will be grateful for any advice for all kind of libs and languages. But that process should be automatic and have cli.

Refinements

Something about 50% experiments I've done on the localhost with vlc-streamer that emulates rtsp-broadcaster. Here is a manual which I try to follow.

I have really fresh and latest ffmpeg with x264 support, that I've installed by that useful thread.

解决方案

Did you try vlc to save rtsp stream? It worked for me.I tried with graphical interface though. But it should also work from command line.

这篇关于rtsp流捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆