2

I am trying to convert my rtmp streaming to rtsp streaming using ffmpeg. the following code is doing the convert

`ffmpeg -i rtmp://xxxxx.com/live/live1 -f rtsp rtsp://xxxxx.com:5454/test1-rtsp.mpg`

After running above command it's return the following console. and i am getting connection refused for rtsp 5454 and aslo 554. How can I solve this ?

ffmpeg version N-60489-g03911c4 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 10 2014 05:44:38 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
  libavutil      52. 63.101 / 52. 63.101
  libavcodec     55. 50.100 / 55. 50.100
  libavformat    55. 31.100 / 55. 31.100
  libavdevice    55.  8.100 / 55.  8.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[flv @ 0x40d1440] Stream discovered after head already parsed
Input #0, flv, from 'rtmp://xxxxx.com/jiljillive/live1':
  Metadata:
    videokeyframe_frequency: 5
    avclevel        : 31
    videodevice     : Broadcast SC Video Filter
    keywords        : 
    audiochannels   : 2
    presetname      : Custom
    copyright       : 
    audioinputvolume: 100
    creationdate    : Tue Feb 11 08:47:50 2014
                    : 
    author          : 
    audiodevice     : Microphone (SplitCam Virtual Au
    avcprofile      : 66
    title           : 
    description     : 
    rating          : 
  Duration: N/A, start: 0.000000, bitrate: 438 kb/s
    Stream #0:0: Video: h264 (Baseline), yuv420p(tv), 320x240 [SAR 1:1 DAR 4:3], 307 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
    Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 131 kb/s
    Stream #0:2: Data: none
[tcp @ 0x40f9c60] Connection to tcp://emedias.com:5454?timeout=0 failed: Connection refused
Output #0, rtsp, to 'rtsp://xxxxxx.com:5454/test1-rtsp.mpg':
  Metadata:
    videokeyframe_frequency: 5
    avclevel        : 31
    videodevice     : Broadcast SC Video Filter
    keywords        : 
    audiochannels   : 2
    presetname      : Custom
    copyright       : 
    audioinputvolume: 100
    creationdate    : Tue Feb 11 08:47:50 2014
                    : 
    author          : 
    audiodevice     : Microphone (SplitCam Virtual Au
    avcprofile      : 66
    title           : 
    description     : 
    rating          : 
    encoder         : Lavf55.31.100
    Stream #0:0: Video: mpeg4, yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: aac (libvo_aacenc), 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (mp3 -> libvo_aacenc)
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error

checking port is open using this command nmap localhost

Starting Nmap 5.21 ( http://nmap.org ) at 2014-02-11 10:40 UTC Nmap scan report for localhost (127.0.0.1) Host is up (0.000011s latency). Not shown: 993 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 80/tcp open http 1935/tcp open rtmp 3306/tcp open mysql 5080/tcp open unknown 9999/tcp open abyss

Nmap done: 1 IP address (1 host up) scanned in 0.18 seconds

10
  • Try it with your IP address first. Take out local DNS configuration as a moving part. Feb 11, 2014 at 10:18
  • i already tried with my ip address. still it's refused to open rtsp port Feb 11, 2014 at 10:25
  • Check lsof to see if something is already bound to that port. Feb 11, 2014 at 10:38
  • nmap localhost Starting Nmap 5.21 ( http://nmap.org ) at 2014-02-11 10:40 UTC Nmap scan report for localhost (127.0.0.1) Host is up (0.000011s latency). Not shown: 993 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 80/tcp open http 1935/tcp open rtmp 3306/tcp open mysql 5080/tcp open unknown 9999/tcp open abyss Feb 11, 2014 at 10:41
  • nmap doesn't tell you, necessarily, if it's firewalled but already bound to... lsof Feb 11, 2014 at 10:43

0

You must log in to answer this question.

Browse other questions tagged .