<div dir="ltr">Seems its just working with .avi as container and using mp4 just gives me like a half-second video for the same filesize. Also I didn't have a duration when watching the result over a video player, summing to the AVFormatContext->duration for the output stream's got me a duration when playing but I'm getting like 35 secs video for a 60 secs recording (It also looks kinda accelerated and it keeps just working for .avi). <br><div class="gmail_extra"><br><div class="gmail_quote">2016-08-29 11:01 GMT-03:00 Leandro Raffo <span dir="ltr"><<a href="mailto:ljraffo@gmail.com" target="_blank">ljraffo@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I finally managed to make it work using the remuxing.c example by doing an <br><br>avformat_network_init()<br><div><br></div><div>And incrementaly adding (from zero) one to pts and dts with pts + 1 = dts.<br><br></div><div>I still don't understand why is this the case. "It Just Works" and I dont like it. Can someone please enlighten me on this? Why don't I need to use the in/out stream time_base? <br>Thanks in advance<br></div><div><div><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Leandro Raffo</b> <span dir="ltr"><<a href="mailto:ljraffo@gmail.com" target="_blank">ljraffo@gmail.com</a>></span><br>Date: 2016-08-24 10:25 GMT-03:00<br>Subject: Dumping RTSP(H264) stream to container<br>To: <a href="mailto:libav-user@ffmpeg.org" target="_blank">libav-user@ffmpeg.org</a><br><br><br><div dir="ltr"><div><div><div>Hello,<br><br></div>As the title say I'm trying to remux(I dont know if this is the correct term) a rtsp h264 stream into a container(mp4). I've been fiddling with the remuxing example given in the documentation for ffmpeg 3.1 (<a href="https://www.ffmpeg.org/doxygen/3.1/remuxing_8c-example.html" target="_blank">https://www.ffmpeg.org/doxyge<wbr>n/3.1/remuxing_8c-example.html</a><wbr>) with no avail. <br></div>I know I can read the frames because I wrote them to disk (decode -> encoded, not in h264 might i say so.). So I'm having troubles with the writing them raw part (writing the frames without an decode/encode pipeline).<br>I'm also a bit lost with the dts and pts in this part, how would this work for an encoded stream?. <br></div><div><br></div><div>These are the errors I'm getting when remuxing from two files <br></div><div><br>[mp4 @ 0x1d869e0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.<br>[mp4 @ 0x1d869e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.<br>[mp4 @ 0x1d869e0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.<br>[mp4 @ 0x1d869e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.<br>[mp4 @ 0x1d869e0] track 1: codec frame size is not set<br>[mp4 @ 0x1d869e0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly <br></div><div><br></div><div>And when remuxing from the rtsp stream<br><br>[avi @ 0x18d1fe0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.<br>[avi @ 0x18d1fe0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.<br>[avi @ 0x18d1fe0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 15 >= 6<br></div><div><br><br></div><div>Thanks in advance.<br></div></div>
</div><br></div></div></div></div>
</blockquote></div><br></div></div>