<div dir="rtl"><div dir="ltr">thanks, with <span style="font-family:arial,sans-serif;font-size:12.7272720336914px">byte-stream=true it works.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2014-10-22 23:43 GMT+03:00 Aleix Conchillo Flaqué <span dir="ltr"><<a href="mailto:aconchillo@gmail.com" target="_blank">aconchillo@gmail.com</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sun, Oct 19, 2014 at 5:26 AM, Jacob S <<a href="mailto:jacobhameiri@gmail.com">jacobhameiri@gmail.com</a>> wrote:<br>
> Hello all,<br>
><br>
> I am using gst-rtsp-server to stream video files and I want to prepare the<br>
> video file for streaming in order to reduce the work for the streamer in<br>
> run-time.<br>
> this is the pipeline I tried for preparing the file:<br>
><br>
> gst-launch-1.0.exe  filesrc location=D:\\videos\\srcfile.wmv ! decodebin<br>
> name=dbin ! queue ! videorate max-rate=15 ! videoconvert ! videoscale !<br>
> video/x-raw,width=426,height=240  ! queue ! x264enc bitrate=2000 ! filesink<br>
> location=D:\\videos\\ready_for_streaming\\srcfile.h264<br>
><br>
> and the rtsp-server launch command:<br>
><br>
> rtsp-launch.exe "( filesrc<br>
> location=D:\\videos\\ready_for_streaming\\srcfile.h264  ! h264parse !<br>
> rtph264pay name=pay0 pt=96 ) "<br>
><br>
> I am getting a WARN 'baseparse<br>
> gstbaseparse.c:3253:gst_base_parse_loop:<h264parse0> error: No valid frames<br>
> found before end of stream' and after an ERROR : 'can't prepare media'<br>
><br>
> If I do the decoding and re-encoding in run-time like this it works fine:<br>
><br>
> rtsp-launch.exe "( filesrc location=D:\\videos\\srcfile.wmv  ! decodebin<br>
> name=dbin ! queue ! videorate max-rate=15 ! videoconvert ! videoscale !<br>
> video/x-raw,width=426,height=240 ! queue ! x264enc bitrate=2000 ! rtph264pay<br>
> name=pay0 pt=96  )"<br>
><br>
> What am I doing wrong here?<br>
><br>
<br>
</div></div>I might need to set x264enc's byte-stream property to true<br>
<br>
   x264enc byte-stream=true<br>
<br>
Otherwise all the encoder information is passed on the caps and lost<br>
when you save to disk. With byte-stream=true you have all what you<br>
need in the file.<br>
<br>
You can simply try to reproduce your .h264 file with:<br>
<br>
   gst-launch-1.0 filesrc location=test.h264 ! h264parse ! decodebin !<br>
videoconvert ! xvimagesink<br>
<br>
Aleix<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>