[FFserver-user] [FFServer] Timeshift on live material

Kaito Kumashiro kumashiro.kaito at gmail.com
Thu Sep 13 11:00:43 CEST 2012


Hi all!


I'm trying to create a timeshifted streaming server for our internal
purposes. I have a live feed from TV card and I want a 24h timeshift
buffer. My ffserver configuration follows:

----- 8< ---------- 8< ------------- 8< ---------------
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 9000000
CustomLog -

<Feed feed1.ffm>
   File /some/valid/path/to/feed1.ffm
   FileMaxSize 20G      # This is roughly 24h of media
   ACL allow 127.0.0.1
   Launch ffmpeg -i /some/valid/path/to/fifo/named/fifo.ts -timestamp
now   #  "fifo.ts" file is fed by external program (mencoder... for
some reason ffmpeg doesn't work with v4l)
</Feed>

<Stream status.html>
   Format status
   ACL allow localhost
   ACL allow 192.168.0.176   # Test client machine
</Stream>

<Stream test.asf>
   Feed feed1.ffm
   Format asf    # Also tried mpegts
   AudioBitrate 128
   AudioChannels 1
   AudioSampleRate 44100
   VideoBitrate 1024
   VideoBufferSize 128
   VideoFrameRate 25
   VideoSize 640x480
   VideoGopSize 12

   AVOptionAudio flags +global_header
   AVOptionVideo flags +global_header
   AVOptionVideo me_range 16
   AVOptionVideo qdiff 4
   AVOptionVideo qmin 10
   AVOptionVideo qmax 51
   AVOptionVideo coder 0
   AVOptionVideo bf 0
   AVOptionVideo flags2 +mixed_refs+fastpskip
   AVOptionVideo flags +loop
   AVOptionVideo cmp +chroma
   AVOptionVideo partitions +parti8x8+parti4x4+partp8x8+partb8x8
   AVOptionVideo me_method hex
   AVOptionVideo subq 7
   AVOptionVideo g 250
   AVOptionVideo keyint_min 10
   AVOptionVideo sc_threshold 40
   AVOptionVideo i_qfactor 0.71
   AVOptionVideo b_strategy 1
   AVOptionVideo qcomp 0.6
   AVOptionVideo refs 3
   AVOptionVideo directpred 1
   AVOptionVideo trellis 1
   AVOptionVideo flags2 +mixed_refs+fastpskip
   AVOptionVideo wpredp 0
   AVOptionVideo bsf h264_mp4toannexb

   AudioCodec libmp3lame
   VideoCodec libx264
   Preroll 15
   StartSendOnKey
</Stream>
----- 8< ---------- 8< ------------- 8< ---------------

The playback (using any player) works great, but when I try to use
timeshift (file "feed1.ffm" is filled) like this:

  player http://server:8090/test.asf?date=2012-09-13T10:00:00

or:

  player http://server:8090/test.asf?date=10:00:00

or:

  player http://server:8090/test.asf?date=20120913T10:00:00


the playback always starts at the current point in time, so timeshift
does not work. However, it works without much hussle when streaming a
static file.

Does timeshifting in ffserver works with live streams?
Is ffserver documentation up to date regarding timeshifting?
What is the correct way to do this?


Thank you for your help
Regards


More information about the ffserver-user mailing list