ffmpeg开发rtsp live server,欢迎有经验的朋友进来.

benztoy 2007-04-11 12:59:23
最近被这个问题搞疯了。
自己写的一个RTSP小实现:实现RTP传输H.263实时载荷.
,在公司的电脑(double core/1GM)上表现不错,可以对多个连接提供不错的稳定的码流,一般几个小时都没问题,在家里的电脑(性能比公司的茶很多)上一般只能播放16秒钟,VLC, Real player就会断掉session,然后重新发起session:
现在VLC调试信息显示如下:
main debug: creating new input thread
main debug: waiting for thread completion
main debug: `rtsp://192.168.18.3/1.3gp' gives access `rtsp' demux `' path `192.168.18.3/1.3gp'
main debug: thread 3932 (input) created at priority 1 (input/input.c:261)
main debug: creating demux: access='rtsp' demux='' path='192.168.18.3/1.3gp'
main debug: looking for access_demux module: 1 candidate
livedotcom debug: sdp=v=0
o=- 1289096773125000 1 IN IP4 0.0.0.0
s=1.3gp
c=IN IP4 0.0.0.0
a=AS:350
i=1.3gp
t=0 0
e=benztoy@163.com(Jerry(HTG)--MSN(tghu122@hotmail.com))
a=maxps:1600
a=tool:JTechStreaming
a=type:broadcast
a=Author:buffer;"eWFua2VlAA=="
a=Copyright:buffer;"d3d3LnlkeS5jb20A"
a=Title:buffer;"oba8+8+wutrDtbnlobctd3d3LnlkeS5jb20t1sbX98jLAA=="
a=control:*
a=range:npt=0-
a=x-qt-text-nam:1.3gp
a=x-qt-text-inf:1.3gp
m=video 0 RTP/AVP 96
a=rtpmap:96 H263-2000/90000
a=fmtp:96 profile=0;level=10;framesize=35
livedotcom debug: RTP subsession 'video/H263-2000'
main debug: selecting program id=0
main debug: using access_demux module "livedotcom"
main debug: looking for a subtitle file in D:\Program Files\VideoLAN\VLC\
main debug: looking for decoder module: 27 candidates
ffmpeg debug: libavcodec already initialized
ffmpeg debug: postprocessing disabled
ffmpeg debug: using direct rendering
ffmpeg debug: ffmpeg codec (H263) started
main debug: using decoder module "ffmpeg"
main debug: thread 3924 (decoder) created at priority 0 (input/decoder.c:159)
main debug: `rtsp://192.168.18.3/1.3gp' successfully opened
livedotcom debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP()
main debug: no usable vout present, spawning one
main debug: window size: 192x144
main debug: Registering subpicture channel, ID: 2
main debug: Registering subpicture channel, ID: 3
main debug: Registering subpicture channel, ID: 4
main debug: Registering subpicture channel, ID: 5
main debug: looking for video output module: 5 candidates
vout_directx debug: creating DirectXEventThread
main debug: waiting for thread completion
vout_directx debug: DirectXCreateWindow
vout_directx debug: created video sub-window
main debug: thread 4072 (DirectX Events Thread) created at priority 0 (directx.c:263)
vout_directx debug: DirectXEventThread running
vout_directx debug: DirectXInitDDraw
vout_directx debug: directx-device:
vout_directx debug:
vout_directx debug: screen dimensions (0x0,1024x768)
vout_directx debug: DirectDraw Capabilities: overlay=1 yuvoverlay=1 can_deinterlace_overlay=1 colorkey=1 stretch=1 bltfourcc=1
vout_directx debug: align_boundary_src=0,0 align_boundary_dest=1,1 align_size_src=0,0 align_size_dest=0,0
vout_directx debug: End DirectXInitDDraw
vout_directx debug: DirectXCreateDisplay
vout_directx debug: DirectXCreateClipper
vout_directx debug: disabling screen saver
main debug: using video output module "vout_directx"
vout_directx debug: NewPictureVec overlay:no chroma:YV12
vout_directx debug: created plain surface of chroma:YV12
vout_directx debug: End NewPictureVec (succeeded)
main debug: got 1 direct buffer(s)
main debug: picture in 176x144 (0,0,176x144), chroma I420, ar 4:3, sar 12:11
main debug: picture user 176x144 (0,0,176x144), chroma I420, ar 4:3, sar 12:11
main debug: picture out 176x144 (0,0,176x144), chroma I420, ar 4:3, sar 12:11
main debug: direct render, mapping render pictures 0-6 to system pictures 1-7
main debug: waiting for thread completion
main debug: thread 4028 (video output) created at priority 1 (video_output/video_output.c:421)
ffmpeg warning: warning: first frame is no keyframe
(h263@00B35920)
main error: picture 066D84F8 refcount is -1
livedotcom debug: suspect EOF due to end of VoD session
main debug: EOF reached
main debug: waiting decoder fifos to empty
main warning: late picture skipped (155290)
main warning: late picture skipped (1447200)
main warning: late picture skipped (1323038)
main warning: late picture skipped (1152865)
main warning: late picture skipped (997830)
main warning: late picture skipped (873674)
main warning: late picture skipped (760912)
main debug: closing input
main debug: removing module "livedotcom"
ffmpeg debug: ffmpeg codec (H263) stopped
main debug: removing module "ffmpeg"
main debug: thread times: real 0m22.109375s, kernel 0m0.062500s, user 0m0.000000s
main debug: thread 3924 joined (input/decoder.c:191)
main debug: killing decoder fourcc `H263', 0 PES in FIFO
main debug: thread times: real 0m22.234375s, kernel 0m1.234375s, user 0m0.500000s
main debug: thread 3932 joined (input/input.c:399)
main: nothing to play
main debug: garbage collector destroys 1 vout
vout_directx debug: DirectXCloseSurface
vout_directx debug: DirectXCloseDisplay
vout_directx debug: DirectXCloseDisplay clipper
vout_directx debug: DirectXCloseDisplay display
vout_directx debug: DirectXCloseDDraw
vout_directx debug: CloseVideo
vout_directx debug: DirectXEventThread terminating
vout_directx debug: DirectXCloseWindow
vout_directx debug: WinProc WM_DESTROY
main debug: thread times: real 0m22.140625s, kernel 0m0.000000s, user 0m0.015625s
main debug: thread 4072 joined (directx.c:494)
main debug: removing module "vout_directx"
main debug: thread times: real 0m22.109375s, kernel 0m0.046875s, user 0m0.015625s
main debug: thread 4028 joined (video_output/video_output.c:461)

为了问题,痛苦不堪,我初步估计是pts的问题,这个时间戳,我想了很多办法
我现在是纪录采帧时候的每帧的tick数(11/1000秒),然后换算成90KHZ的时钟tick(1/90000),请问一下,我这个有什么问题吗?
Real player得信息显示:所有的frame全部dropped掉了
FramesDropped = ***
CurrentFramerate = 0
DisplayFrames = 0
郁闷死了
...全文
3367 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
bcf102 2012-05-30
  • 打赏
  • 举报
回复
没有共享精神导致中国的技术始终达不到另一个高度,只能各自为营。
中国人千百年来的陋习,师父教徒弟永远都留一手最有用的,留到最后就把真正好东西都带走了。
stayxyz 2012-02-22
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 gezexu 的回复:]
引用 11 楼 cspioneer 的回复:
引用 10 楼 sinfiasong 的回复:

引用 8 楼 shaoshuai321 的回复:

最讨厌解决了问题不把方案写出来的,看国外的论坛解决方案都详细的很。



同讨厌

同同讨厌

同样讨厌
[/Quote]

同样讨厌
cwq2012 2011-11-04
  • 打赏
  • 举报
回复
解决了问题好歹给大家说说怎么弄啊
北漂 2011-08-24
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 cspioneer 的回复:]
引用 10 楼 sinfiasong 的回复:

引用 8 楼 shaoshuai321 的回复:

最讨厌解决了问题不把方案写出来的,看国外的论坛解决方案都详细的很。



同讨厌

同同讨厌
[/Quote]
同样讨厌
cspioneer 2011-08-05
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 sinfiasong 的回复:]

引用 8 楼 shaoshuai321 的回复:

最讨厌解决了问题不把方案写出来的,看国外的论坛解决方案都详细的很。



同讨厌
[/Quote]
同同讨厌
天神镜心 2010-09-17
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 shaoshuai321 的回复:]

最讨厌解决了问题不把方案写出来的,看国外的论坛解决方案都详细的很。
[/Quote]


同讨厌
yexiaoya 2009-11-20
  • 打赏
  • 举报
回复
也在学习directshow中
shaoshuai321 2008-03-24
  • 打赏
  • 举报
回复
最讨厌解决了问题不把方案写出来的,看国外的论坛解决方案都详细的很。
benztoy 2007-04-16
  • 打赏
  • 举报
回复
终于OK了,丢帧律在1%以内
benztoy 2007-04-15
  • 打赏
  • 举报
回复
情况终于有所改善,我在rtp的采样timestamp的基础上,加上一个摆幅为增量1/2的随机抖动。
基本上正常了,但是导致大量的late picture skipped,丢帧10%,不知道解决问题的关键在那里。 我测试了Mplayer完全正常,VLC,Real Player还有这个问题
aa211314 2007-04-11
  • 打赏
  • 举报
回复
UP
Oversense 2007-04-11
  • 打赏
  • 举报
回复
qq:354032
benztoy 2007-04-11
  • 打赏
  • 举报
回复
楼上留下QQ或MSN吧,请教一下
Oversense 2007-04-11
  • 打赏
  • 举报
回复
不是pts的问题,是其它问题

不过就这点信息也不知道那儿的问题。方便可以看下exe
xqk 2007-04-11
  • 打赏
  • 举报
回复
不懂,帮顶

2,543

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧