[FFmpeg-user] ffmpeg to ffserver issues

Charles Winthrop charlie at nts-show.com
Wed Jan 27 19:07:19 CET 2016


So here's the deal. I'm running into multiple errors between ffmpeg and 
ffserver. The videos are in great shape, far as I can tell, and they 
stream fine, individually. But when I use a list, well, things get weird.

Running ffserver:

/usr/local/ntsvideo/ffmpeg/bin/ffserver -f asfffserver.conf

ffserver version 2.8.5 Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
   configuration: --prefix=/usr/local/ntsvideo/ffmpeg 
--enable-libmp3lame --enable-openssl
   libavutil      54. 31.100 / 54. 31.100
   libavcodec     56. 60.100 / 56. 60.100
   libavformat    56. 40.101 / 56. 40.101
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 40.101 /  5. 40.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  2.101 /  1.  2.101
asfffserver.conf:40: Setting default value for video bit rate tolerance 
= 192000. Use NoDefaults to disable it.
asfffserver.conf:40: Setting default value for video rate control 
equation = tex^qComp. Use NoDefaults to disable it.
asfffserver.conf:40: Setting default value for video max rate = 1536000. 
Use NoDefaults to disable it.

====================

asfffserver.conf contains:

HTTPPort 8090
# bind to all IPs aliased or not
HTTPBindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
# Suppress that if you want to launch ffserver as a daemon.
#NoDaemon

<Feed feed1.ffm>
   File /tmp/feed1.ffm
   FileMaxSize 700M
</Feed>

# ASF output - for media player classic
<Stream test.asf>
# the source feed
   Feed feed1.ffm
# the output stream format - ASF
   Format asf
   VideoCodec mpeg4
# this must match the ffmpeg -r argument
   VideoFrameRate 30
# generally leave this is a large number
   VideoBufferSize 100000
# another quality tweak
   VideoBitRate 768
# quality ranges - 1-31 (1 = best, 31 = worst)
   VideoQMin 1
   VideoQMax 5
   VideoSize 720x480
# this sets how many seconds in past to start
   PreRoll 0
# Audio Codec
   AudioCodec libmp3lame
   AudioBitRate 56
   AudioChannels 2
   AudioSampleRate 24000
</Stream>

<Stream stat.html>
   Format status
   ACL allow 0.0.0.0
</Stream>

====================

Running ffmpeg:

/usr/local/ntsvideo/ffmpeg/bin/ffmpeg -f concat -i dailylist.txt -c copy 
http://localhost:8090/feed1.ffm

ffmpeg version 2.8.5 Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
   configuration: --prefix=/usr/local/ntsvideo/ffmpeg 
--enable-libmp3lame --enable-openssl
   libavutil      54. 31.100 / 54. 31.100
   libavcodec     56. 60.100 / 56. 60.100
   libavformat    56. 40.101 / 56. 40.101
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 40.101 /  5. 40.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  2.101 /  1.  2.101
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2af7cc0] Auto-inserting h264_mp4toannexb 
bitstream filter
Input #0, concat, from 'dailylist.txt':
   Duration: N/A, start: 0.000000, bitrate: 706 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
720x480 [SAR 3492:3931 DAR 5238:3931], 566 kb/s, SAR 4717:5310 DAR 
4717:3540, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
stereo, fltp, 139 kb/s
     Metadata:
       handler_name    : SoundHandler
[mpeg4 @ 0x2bb52e0] Invalid pixel aspect ratio 4717/5310, limit is 
255/255 reducing
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
   Metadata:
     creation_time   : 2016-01-27 13:01:18
     encoder         : Lavf56.40.101
     Stream #0:0(und): Audio: mp3 (libmp3lame), 24000 Hz, stereo, s32p, 
56 kb/s
     Metadata:
       handler_name    : SoundHandler
       encoder         : Lavc56.60.100 libmp3lame
     Stream #0:1(und): Video: mpeg4, yuv420p, 720x480 [SAR 175:197 DAR 
525:394], q=1-5, 768 kb/s, SAR 4717:5310 DAR 4717:3540, 29.97 fps, 1000k 
tbn, 30 tbc
     Metadata:
       handler_name    : VideoHandler
       encoder         : Lavc56.60.100 mpeg4
Stream mapping:
   Stream #0:1 -> #0:0 (aac (native) -> mp3 (libmp3lame))
   Stream #0:0 -> #0:1 (h264 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
[mpeg4 @ 0x2bb52e0] rc buffer underflow
     Last message repeated 1 times
[mpeg4 @ 0x2bb52e0] max bitrate possibly too small or try trellis with 
large lmax or increase qmax
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2af7cc0] Auto-inserting h264_mp4toannexb 
bitstream filter2 drop=0
[h264 @ 0x2b0d3c0] Reinit context to 640x480, pix_fmt: yuv420p
Input stream #0:0 frame changed from size:720x480 fmt:yuv420p to 
size:640x480 fmt:yuv420p
[libmp3lame @ 0x2bb3480] Queue input is backward in time
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313958, current: 19777958; changing to 21313959. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313959, current: 19801958; changing to 21313960. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313960, current: 19825958; changing to 21313961. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313961, current: 19849958; changing to 21313962. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313962, current: 19873958; changing to 21313963. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313963, current: 19897958; changing to 21313964. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313964, current: 19921958; changing to 21313965. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313965, current: 19945958; changing to 21313966. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313966, current: 19969958; changing to 21313967. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313967, current: 19993958; changing to 21313968. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313968, current: 20017958; changing to 21313969. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313969, current: 20041958; changing to 21313970. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313970, current: 20065958; changing to 21313971. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313971, current: 20089958; changing to 21313972. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313972, current: 20113958; changing to 21313973. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313973, current: 20137958; changing to 21313974. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313974, current: 20161958; changing to 21313975. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313975, current: 20185958; changing to 21313976. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313976, current: 20209958; changing to 21313977. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313977, current: 20233958; changing to 21313978. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313978, current: 20257958; changing to 21313979. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313979, current: 20281958; changing to 21313980. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313980, current: 20305958; changing to 21313981. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313981, current: 20329958; changing to 21313982. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313982, current: 20353958; changing to 21313983. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313983, current: 20377958; changing to 21313984. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313984, current: 20401958; changing to 21313985. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313985, current: 20425958; changing to 21313986. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313986, current: 20449958; changing to 21313987. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313987, current: 20473958; changing to 21313988. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313988, current: 20497958; changing to 21313989. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313989, current: 20521958; changing to 21313990. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313990, current: 20545958; changing to 21313991. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313991, current: 20569958; changing to 21313992. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313992, current: 20593958; changing to 21313993. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313993, current: 20617958; changing to 21313994. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313994, current: 20641958; changing to 21313995. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313995, current: 20665958; changing to 21313996. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313996, current: 20689958; changing to 21313997. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313997, current: 20713958; changing to 21313998. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313998, current: 20737958; changing to 21313999. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21313999, current: 20761958; changing to 21314000. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314000, current: 20785958; changing to 21314001. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314001, current: 20809958; changing to 21314002. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314002, current: 20833958; changing to 21314003. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314003, current: 20857958; changing to 21314004. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314004, current: 20881958; changing to 21314005. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314005, current: 20905958; changing to 21314006. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314006, current: 20929958; changing to 21314007. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314007, current: 20953958; changing to 21314008. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314008, current: 20977958; changing to 21314009. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314009, current: 21001958; changing to 21314010. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314010, current: 21025958; changing to 21314011. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314011, current: 21049958; changing to 21314012. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314012, current: 21073958; changing to 21314013. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314013, current: 21097958; changing to 21314014. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314014, current: 21121958; changing to 21314015. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314015, current: 21145958; changing to 21314016. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314016, current: 21169958; changing to 21314017. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314017, current: 21193958; changing to 21314018. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314018, current: 21217958; changing to 21314019. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314019, current: 21241958; changing to 21314020. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314020, current: 21265958; changing to 21314021. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314021, current: 21289958; changing to 21314022. This may result in 
incorrect timestamps in the output file.
[ffm @ 0x2b0dd40] Non-monotonous DTS in output stream 0:0; previous: 
21314022, current: 21313958; changing to 21314023. This may result in 
incorrect timestamps in the output file.
av_interleaved_write_frame(): Connection reset by peer20.40 bitrate= 
578.2kbits/s dup=2 drop=3923
     Last message repeated 1 times
frame= 2653 fps=100 q=31.0 Lsize=   14304kB time=00:03:23.01 bitrate= 
577.2kbits/s dup=2 drop=3975
video:12751kB audio:1399kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 1.090104%
Conversion failed!

====================

At which point ffserver crashes with this message:

Assertion asf->packet_timestamp_end >= asf->packet_timestamp_start 
failed at libavformat/asfenc.c:777
Aborted (core dumped)


So. Can anyone tell me how to fix this? I've been trying for 2 weeks 
with no success at all.


More information about the ffmpeg-user mailing list