因此,我一直在使用FFMPEG处理一个项目,该项目涉及使用RTP通过互联网从一台计算机向另一台计算机传输视频。我想将它带入ffmpeg并使用ffserver将其显示在本地网络上。如何从FFMPEG生成SDP文件
据我所知,你需要有一个SDP信息,以便接收ffmpeg实例可以解释RTP流。尽管网页上说了什么,我无法在打印到控制台的信息中找到SDP信息。
如何强制传输ffmpeg实例输出SDP信息,以便我可以使用它来配置我的接收端?
现在,我正在测试Windows 7,但最终的解决方案将在Linux上。
我跑测试的命令是
ffmpeg -fflags +genpts -i files\2005-SFSD-sample-mpeg1.mpg -threads 0 -r 10 -g 45
-s 352x240 -deinterlace -y 2005.mp4 -an -threads 0 -r 10 -g 45 -s 352x240
-deinterlace -f rtp rtp://192.168.200.198:9008
我的ffmpeg的信息是...
ffmpeg version 0.8, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 23 2011 14:22:23 with gcc 4.5.3
configuration:
--disable-static
--enable-shared
--enable-gpl
--enable-version3
--enable-memalign-hack
--enable-runtime-cpudetect
--enable-avisynth
--enable-bzlib
--enable-frei0r
--enable-libopencore-amrnb
--enable-libopencore-amrwb
--enable-libfreetype
--enable-libgsm
--enable-libmp3lame
--enable-libopenjpeg
--enable-librtmp
--enable-libschroedinger
--enable-libspeex
--enable-libtheora
--enable-libvorbis
--enable-libvpx
--enable-libx264
--enable-libxavs
--enable-libxvid
--enable-zlib
--disable-outdev=sdl
libavutil 51. 9. 1/51. 9. 1
libavcodec 53. 7. 0/53. 7. 0
libavformat 53. 4. 0/53. 4. 0
libavdevice 53. 1. 1/53. 1. 1
libavfilter 2. 23. 0/2. 23. 0
libswscale 2. 0. 0/2. 0. 0
libpostproc 51. 2. 0/51. 2. 0
http://lucabe72.blogspot.com/2010/04/rtp-streaming-with-ffmpeg.html可能有关 – rogerdpack 2014-01-28 20:58:06
这是我的命令:ffmpeg -i rtp://239.255.42.42:5004 c:/33030ooo.mp4> c:/config.sdp -----但是让config.sdp为空! – 2015-10-05 07:06:14
@ Mr.Hyde你想通过rtp传输mp4视频,对吧? 尝试此(我还没有与新的ffmpeg CLI测试它) '的ffmpeg -i C:/33030ooo.mp4 RTP://239.255.42.42:5004> C:/ config.sdp' – code7amza 2015-10-05 13:33:49