[FFmpeg-devel] [PATCH 4/5] ffserver: Implement ffserver and add Makefile
Stephan Holljes
klaxa1337 at googlemail.com
Fri May 11 16:05:12 EEST 2018
On Fri, May 11, 2018 at 2:49 PM, Moritz Barsnick <barsnick at gmx.net> wrote:
> On Thu, May 10, 2018 at 17:41:25 +0200, Stephan Holljes wrote:
>> +ffserver: segment.o publisher.o lavfhttpd.o ffserver.c
>> + cc -g -Wall $(LAV_FLAGS) -lpthread -o ffserver segment.o publisher.o lavfhttpd.o ffserver.c
> ^ $(CC) $(CFLAGS) to be more generic and allow overriding.
>
> The LDFLAGS "$(LAV_FLAGS) -lpthread" need to be at the end of the
> command for my compile/link chains to work. *shrug*
>
>> +clean:
>> + rm *.o ffserver
>
> Make this "rm -f" to silence warnings about non-existant files.
Ok
>
>> diff --git a/ffserver.c b/ffserver.c
>
> It may be me, but the whole thing doesn't work for me.
>
> With any MP4 file, I get:
>
> [AVIOContext @ 0xa3c3b40] {
> "free": 16,
> "reserved": 0,
> "wait": 0,
> "writable": 0,
> "busy": 0,
> "buffer_full": 0,
> "current_read": -1,
> "newest_write": 0,
> "oldest_write": -1
> }
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa394580] Finding video stream.
> [matroska @ 0xb4319700] Tag mp4a incompatible with output codec id '86018' ([255][0][0][0])
> [matroska @ 0xb4319700] Error occured while writing header: Invalid data found when processing input
> Segmentation fault
>
> gdb, if it's of interest:
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb5717b90 (LWP 26045)]
> 0x08068d6d in compute_muxer_pkt_fields (s=0xb4c19240, st=0xfffffffe, pkt=0xffffffff) at src/libavformat/mux.c:640
> 640 st->internal->priv_pts->val = pkt->dts;
>
> (ffmpeg of the same version as the libs has no issue processing the
> same file to matroska.)
>
> Using an MKV as input, it launches as such:
>
> [AVIOContext @ 0xb441e5c0] {
> "free": 16,
> "reserved": 0,
> "wait": 0,
> "writable": 0,
> "busy": 0,
> "buffer_full": 0,
> "current_read": -1,
> "newest_write": 0,
> "oldest_write": -1
> }
> [matroska,webm @ 0xa166580] Finding video stream.
> [AVIOContext @ 0xb441e5c0] Shutting down http server.
>
> "Shutting down"??? And I can't connect and play.
>
> It may just be me though. Hope this helps anyway.
>
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Hmm that *is* a problem. Maybe I should have used more than one file
for testing. I just tested another file and it also only worked
properly on second try. This time there was a condition I could not
reproduce the last few days:
>[matroska @ 0x55eb77169040] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18894 >= 18894
I already mentioned that I'm not too sure about way I handle
timestamps. (Currently each segment has a separate dynamic array
filled with dts and pts as int64_t taken from the demuxer during
reading.)
I also tested an mp4 file and I can reproduce the error message. I'm
guessing it's "only" a metadata thing, but I know ffmpeg can mux this
without problems, so I'll investigate how to do that.
Thanks for the time, I will assemble more files for testing!
More information about the ffmpeg-devel
mailing list