Skip to content

Instantly share code, notes, and snippets.

View ntpz's full-sized avatar

Vladislav Tolkachev ntpz

  • Nizhny Novgorod, Russia
View GitHub Profile
from dateutil import tz
from jinja2 import Undefined
client_timezone = tz.gettz('PST8PDT') # timezone to translate to
@app.template_filter()
def dateformat(value, format=None, rebase=True):
if value is None or isinstance(value, Undefined):
return ''
@ntpz
ntpz / capture_hls.md
Created October 16, 2019 07:20 — forked from s4y/capture_hls.md
Capture an HLS stream from the beginning with ffmpeg
ffmpeg -live_start_index -99999 -i 'https://….m3u8' -c copy something.ts