Skip to content

YeapGuy/stream-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Stream Recorder

Simple Python livestream recorder with weekly multi-schedule support. Built with GPT-5.3-Codex.

Requirements

  • Python 3.10+
  • ffmpeg installed and available in PATH (or set ffmpeg_path in config)

Configuration

Edit config.json:

{
  "schedules": [
    {
      "name": "morning_news",
      "source": "https://example.com/news.m3u8",
      "day_of_week": "monday",
      "start_time": "08:00",
      "end_time": "08:30"
    },
    {
      "name": "sports_live",
      "source": "https://example.com/sports.m3u8",
      "day_of_week": "friday",
      "start_time": "20:00",
      "end_time": "22:00"
    }
  ],
  "output_dir": "recordings",
  "ffmpeg_path": "ffmpeg"
}
  • schedules: list of recording schedules
  • name: schedule label used in output filename
  • source: livestream URL (e.g., m3u8/rtmp/http stream)
  • day_of_week: one of monday, tuesday, wednesday, thursday, friday, saturday, sunday
  • start_time: local time in HH:MM (24-hour format)
  • end_time: local time in HH:MM (24-hour format)
  • output_dir: folder where output is saved
  • ffmpeg_path: ffmpeg executable name/path

If end_time is earlier than start_time, recording is treated as overnight (ends next day).

Run

python recorder.py --config config.json

The script runs continuously, starts each configured recording at its day/time, and saves .mp4 files in output_dir.

About

Simple Python m3u8 web livestream recorder with weekly multi-schedule support.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages