Skip to content

Instantly share code, notes, and snippets.

@riverscn
riverscn / gen_iptv_m3u8.sh
Last active December 19, 2023 17:34
中国电信IPTV抓包数据转m3u8播放列表
#!/bin/bash
# Usage: bash gen_iptv_m3u8.sh iptv.pcap
udpxy=192.168.5.1:7088
input=$1
workdir=${input%%.*}
tshark -r $1 -Y 'http.response_for.uri contains getchannellist' -T jsonraw -j data-text-lines_raw \
| awk '/"data-text-lines_raw"/{getline; print}' \
| sed -E 's/"|,//g' \
@riverscn
riverscn / ivtc.py
Created June 26, 2021 09:41
VapourSynth IVTC script ... may be the best
import havsfunc as haf
import functools
input_clip = src
def postprocess(n, f, clip, deinterlaced):
if f.props['_Combed'] > 0:
return deinterlaced
else:
return clip
@riverscn
riverscn / 北京联通IPTV内网组播.m3u
Created August 4, 2019 15:55
北京联通IPTV内网组播地址节目表(239.2.1.1网段)
#EXTM3U name="北京联通IPTV(RTP)”
#EXTINF:-1,CCTV-1高清(1)
rtp://239.2.1.129:8000
#EXTINF:-1,CCTV-2高清(2)
rtp://239.2.1.60:8084
#EXTINF:-1,CCTV-4高清(4)
rtp://239.2.1.105:8092
#EXTINF:-1,CCTV-7高清(7)
rtp://239.2.1.61:8104
#EXTINF:-1,CCTV-9高清(9)
@riverscn
riverscn / yhy_remaster.avs
Last active April 16, 2019 13:55
《颐和园》2006 俄区 PAL DVD 修复脚本 AviSynth
ClearAutoloadDirs()
AddAutoloadDir("plugins")
LoadPlugin("D:\Apps\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("yhy.d2v", info=3)
#color convert
ColorMatrix(mode="Rec.601->Rec.709")
#recover dynamic range
@riverscn
riverscn / mix_video_audio.bat
Last active October 9, 2018 08:38
Use FFMPEG to mix video and audio. extend video length to match audio length and add transparent watermark.
@ECHO OFF
CHCP 65001>nul
SETLOCAL EnableDelayedExpansion
SET /p iv=Video File:
SET iv="%iv%"
FOR %%i in (%iv%) DO SET filename=%%~ni-mixed.mp4
ECHO Output:%filename%
SET filename="%filename%"