prepare a video file for rtph264pay

Jacob S jacobhameiri at gmail.com
Wed Oct 22 13:48:58 PDT 2014


thanks, with byte-stream=true it works.

2014-10-22 23:43 GMT+03:00 Aleix Conchillo Flaqué <aconchillo at gmail.com>:

> On Sun, Oct 19, 2014 at 5:26 AM, Jacob S <jacobhameiri at gmail.com> wrote:
> > Hello all,
> >
> > I am using gst-rtsp-server to stream video files and I want to prepare
> the
> > video file for streaming in order to reduce the work for the streamer in
> > run-time.
> > this is the pipeline I tried for preparing the file:
> >
> > gst-launch-1.0.exe  filesrc location=D:\\videos\\srcfile.wmv ! decodebin
> > name=dbin ! queue ! videorate max-rate=15 ! videoconvert ! videoscale !
> > video/x-raw,width=426,height=240  ! queue ! x264enc bitrate=2000 !
> filesink
> > location=D:\\videos\\ready_for_streaming\\srcfile.h264
> >
> > and the rtsp-server launch command:
> >
> > rtsp-launch.exe "( filesrc
> > location=D:\\videos\\ready_for_streaming\\srcfile.h264  ! h264parse !
> > rtph264pay name=pay0 pt=96 ) "
> >
> > I am getting a WARN 'baseparse
> > gstbaseparse.c:3253:gst_base_parse_loop:<h264parse0> error: No valid
> frames
> > found before end of stream' and after an ERROR : 'can't prepare media'
> >
> > If I do the decoding and re-encoding in run-time like this it works fine:
> >
> > rtsp-launch.exe "( filesrc location=D:\\videos\\srcfile.wmv  ! decodebin
> > name=dbin ! queue ! videorate max-rate=15 ! videoconvert ! videoscale !
> > video/x-raw,width=426,height=240 ! queue ! x264enc bitrate=2000 !
> rtph264pay
> > name=pay0 pt=96  )"
> >
> > What am I doing wrong here?
> >
>
> I might need to set x264enc's byte-stream property to true
>
>    x264enc byte-stream=true
>
> Otherwise all the encoder information is passed on the caps and lost
> when you save to disk. With byte-stream=true you have all what you
> need in the file.
>
> You can simply try to reproduce your .h264 file with:
>
>    gst-launch-1.0 filesrc location=test.h264 ! h264parse ! decodebin !
> videoconvert ! xvimagesink
>
> Aleix
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141022/88aa42c2/attachment.html>


More information about the gstreamer-devel mailing list