ebu / test-engine-live-tools

Small tools and scripts for the EBU test engine platform.
BSD 3-Clause "New" or "Revised" License
18 stars 16 forks source link

Live stream starts playing after 10 minutes #11

Open Hemube opened 8 years ago

Hemube commented 8 years ago

Using this tool i'm able to create live dash stream. I used dash.all.main.js to play this, but player starts playing after 10 minutes of delay. Not able to find the reason for it. dash_config.txt

tieleman commented 8 years ago

I've tried your config file (minus the timing server URL) and that works when playing back in Osmo4/MP4Client. However, I do notice dash.js has some issues with it. I've removed some options from your config and now I'm able to get it to play in Dash.js without major issues. Do note that Dash.js still has some issues with live content streams, so it might be a case of a bad combination of parameters.

You might need to fix the paths to your files again. I do recommend you choose a slightly smaller segment size (for example 4 seconds), but of course that's up to you. ;)

{
 "segmentDir": "/Users/tieleman/Documents/Code/EBU/live/tmp",
 "outputDir": "/Users/tieleman/Documents/Code/EBU/live/html",
 "mp4box": "MP4Box",
 "ffmpeg": "ffmpeg",
 "encoding": {
  "commandPrefix": ["-re", "-i", "-", "-threads", "0", "-y"],
  "representations": {
   "audio": [
    "-map", "0:1", "-vn", "-acodec", "aac", "-strict", "-2", "-ar", "48000", "-ac", "2",
    "-f", "segment", "-segment_time", "4", "-segment_format", "mpegts"
   ],
   "video": [
    "-map", "0:0", "-vcodec", "libx264", "-vprofile", "baseline", "-preset", "veryfast",
    "-s", "640x360", "-vb", "512k", "-bufsize", "1024k", "-maxrate", "512k",
    "-level", "31", "-keyint_min", "25", "-g", "25", "-sc_threshold", "0", "-an",
    "-bsf", "h264_mp4toannexb", "-flags", "-global_header",
    "-f", "segment", "-segment_time", "4", "-segment_format", "mpegts"
   ]
  }
 },
 "packaging": {
  "mp4box_opts": [
   "-dash-ctx", "/Users/tieleman/Documents/Code/EBU/live/dash-live.txt", "-dash", "4000", "-rap", "-mpd-refresh", "10",
   "-no-frags-default", "-bs-switching", "no", "-url-template", "-time-shift", "1800", "-segment-name", "live_$RepresentationID$_",
    "-keep-utc", "-profile", "DASH-IF:dashavc264:live", "-out", "/Users/tieleman/Documents/Code/EBU/live/html/live", "-dynamic", "-subsegs-per-sidx", "-1"
  ]
 }
}