[FFmpeg-user] [ffmpeg-user] Hi, does anyone konw how to use rtsp in ffmpeg

Andrew Sinclair ajsinclair at gmail.com
Mon May 13 12:45:47 CEST 2013


Try generating it as an mp4 as live555 will likely need something like that
to convert to RTSP as probably can't handle raw h264 assuming that is what
your .h264 is.

I don't use live555 but a simple mp4 works fine in either DSS or Wowza e.g.
here is the Wowza sample file:
ffplay rtsp://cj.sinclairmediatech.com/vod/sample.mp4
ffplay version N-51554-g1c0d8f2 Copyright (c) 2003-2013 the FFmpeg
developers
  built on Apr  7 2013 18:35:14 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
  configuration: --enable-libx264 --enable-libfaac --enable-nonfree
--enable-gpl
  libavutil      52. 24.100 / 52. 24.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 49.100 /  3. 49.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, rtsp, from 'rtsp://cj.sinclairmediatech.com/vod/sample.mp4':
  Metadata:
    title           : sample.mp4
  Duration: 00:09:56.46, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: aac, 48000 Hz, stereo, fltp
    Stream #0:1: Video: h264 (Constrained Baseline), yuv420p, 424x240, 24
fps, 24 tbr, 90k tbn, 48 tbc
  24.06 A-V: -0.025 fd=   1 aq=   20KB vq=   66KB sq=    0B f=1/1



On 13 May 2013 18:58, Wei Gao <highgod0401 at gmail.com> wrote:

> 2013/5/13 Andrew Sinclair <ajsinclair at gmail.com>
>
> > ffmpeg and ffplay certainly do rtsp.
> >
> > What is the format of the out.264 file you are trying to stream? If it
> is a
> > VOD for it to play correctly would likely require it to be streaming
> hinted
> > mp4. Can you do ffplay or ffprobe on the out.264 file and send the
> results
> > of that.
> >
> I use ffmpeg and libx264 to gernate the out.264, I think it is the h264
> stream, yes ffplay can play it ,and but not correct in some frames. just
> like the log I paste in the previous mail. I want to ust ffmpeg first, but
> it seems that the bug has exist for a long time.I serarch in internet, and
> someone report the bug in 2011.
>
> >
> > You should also look at the sdp file generated by live555.
> >
> can you give the address of the code?
> thanks
> best regards
>
> >
> >
> >
> >
> > On 13 May 2013 18:32, Wei Gao <highgod0401 at gmail.com> wrote:
> >
> > > 2013/5/13 stanley zhang <zsq20030710 at gmail.com>
> > >
> > > > I just tried to play the streaming media as a client of IPCAM
> > (Hikvision
> > > > DS-2CD2012). It runs smoothly.
> > > >
> > > > Here is the command:
> > > > ffplay rtsp://192.168.1.102:554/Streaming/Channels/1
> > >
> > > Hi, thanks, we test it to decode h264 stream and the error log is as
> > > follow:
> > > ffplay version 1.2.1 Copyright (c) 2003-2013 the FFmpeg developers
> > >   built on May 13 2013 15:38:39 with gcc 4.6.2 (GCC)
> > >   configuration: --enable-static --enable-shared
> > >   WARNING: library configuration mismatch
> > >   avutil      configuration: --enable-static --enable-shared
> > > --enable-pthreads
> > >   avcodec     configuration: --enable-static --enable-shared
> > > --enable-pthreads
> > >   avformat    configuration: --enable-static --enable-shared
> > > --enable-pthreads
> > >   avdevice    configuration: --enable-static --enable-shared
> > > --enable-pthreads
> > >   avfilter    configuration: --enable-static --enable-shared
> > > --enable-pthreads
> > >   swscale     configuration: --enable-static --enable-shared
> > > --enable-pthreads
> > >   swresample  configuration: --enable-static --enable-shared
> > > --enable-pthreads
> > >   libavutil      52. 18.100 / 52. 18.100
> > >   libavcodec     54. 92.100 / 54. 92.100
> > >   libavformat    54. 63.104 / 54. 63.104
> > >   libavdevice    54.  3.103 / 54.  3.103
> > >   libavfilter     3. 42.103 /  3. 42.103
> > >   libswscale      2.  2.100 /  2.  2.100
> > >   libswresample   0. 17.102 /  0. 17.102
> > > [rtsp @ 00a808a0] Estimating duration from bitrate, this may be
> > inaccurate
> > > Input #0, rtsp, from 'rtsp://192.168.0.48/out.264':q=    0B f=0/0
> > >   Metadata:
> > >     title           : H.264 Video, streamed by the LIVE555 Media Server
> > >     comment         : out.264
> > >   Duration: N/A, start: 0.250256, bitrate: N/A
> > >     Stream #0:0: Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 DAR
> > 16:9],
> > > 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
> > > [h264 @ 03aa5020] error while decoding MB 67 67, bytestream (-9)1
> > > [h264 @ 03aa5020] concealing 102 DC, 102 AC, 102 MV errors in I frame
> > > [h264 @ 03903ae0] error while decoding MB 79 47, bytestream (-22)
> > > [h264 @ 03903ae0] concealing 2490 DC, 2490 AC, 2490 MV errors in I
> frame
> > > [h264 @ 039034c0] error while decoding MB 4 54, bytestream (-6)/1
> > > [h264 @ 039034c0] concealing 1725 DC, 1725 AC, 1725 MV errors in I
> frame
> > > [rtsp @ 00a808a0] CSeq 5 expected, 0 received.7KB sq=    0B f=1/1
> > > [h264 @ 00b5e4a0] error while decoding MB 18 49, bytestream (-19)
> > > [h264 @ 00b5e4a0] concealing 2311 DC, 2311 AC, 2311 MV errors in I
> frame
> > >   38.95 A-V:  0.000 fd=   4 aq=    0KB vq=    0KB sq=    0B f=1/1
> > >
> > > and you can see that the image of video is not correct. I search in the
> > > internet, the earlist ffmpeg seems correct, but the latest ffmpeg seems
> > not
> > > correct. it seems some bugs in udp and rtsp, and make the h264 decode
> > > error.
> > >
> > > Thanks
> > > Best regards
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, May 13, 2013 at 4:11 PM, Wei Gao <highgod0401 at gmail.com>
> > wrote:
> > > >
> > > > > Hi, I want to use rtsp in ffmpeg, but I use ffplay test that there
> > > seems
> > > > > some bugs in ffmpeg's rtsp, which I have paste the log.
> > > > >
> > > > > I found in internel that, ffmpeg also can use with live555, that
> > > live555
> > > > > receive the rtsp stream and ffmpeg decode the stream, is there
> > anydemo
> > > to
> > > > > use it?
> > > > >
> > > > > does anyone can every use it?
> > > > >
> > > > > Thanks
> > > > > Best regards
> > > > > _______________________________________________
> > > > > ffmpeg-user mailing list
> > > > > ffmpeg-user at ffmpeg.org
> > > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > > > >
> > > > _______________________________________________
> > > > ffmpeg-user mailing list
> > > > ffmpeg-user at ffmpeg.org
> > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > > >
> > > _______________________________________________
> > > ffmpeg-user mailing list
> > > ffmpeg-user at ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > >
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list