Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate SDP file from FFMPEG

So, I have been working with FFMPEG on a project that involves streaming video from one computer to another across the internet with RTP. I want to take that into ffmpeg and use ffserver to display it on a local network.

As I understand it, you need to have a SDP information so that the receiving ffmpeg instance can interpret the RTP stream. Despite what webpages say, I can not find the SDP information in the information printed to the console.

How can I force the transmitting ffmpeg instance to output the SDP information so that I can use it to configure my receiving end?

Right now, I am testing on Windows 7, but the final solution will be on linux.

The command I'm running for testing is

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

My ffmpeg information is...

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 
like image 691
MobilityLab Avatar asked Feb 03 '23 06:02

MobilityLab


1 Answers

https://stackoverflow.com/a/16469378/2097284 explains in more detail how to make the .sdp file, and how to pass that to ffplay.

like image 191
Camille Goudeseune Avatar answered Feb 12 '23 18:02

Camille Goudeseune