Skip to content

Instantly share code, notes, and snippets.

View Wkkkkk's full-sized avatar
🎯
Focusing

Kun Wu Wkkkkk

🎯
Focusing
  • Eyevinn
  • Stockholm, Sweden
View GitHub Profile
@Wkkkkk
Wkkkkk / chapters.json
Created May 19, 2026 12:15
HLS chapters prototype — bipbop stream with EXT-X-SESSION-DATA chapters
[
{
"chapter": 1,
"start-time": 0,
"duration": 600,
"titles": [
{
"language": "en",
"title": "Introduction"
}
@Wkkkkk
Wkkkkk / master-chapters-value.m3u8
Created May 19, 2026 11:45
HLS crash isolation: chapters DATA-ID vs URI attribute
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-SESSION-DATA:DATA-ID="com.apple.hls.chapters",VALUE="dummy"
#EXT-X-STREAM-INF:BANDWIDTH=700000,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2"
https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear2/prog_index.m3u8
@Wkkkkk
Wkkkkk / master-no-lang.m3u8
Created May 19, 2026 11:44
HLS EXT-X-SESSION-DATA crash debug variants
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-SESSION-DATA:DATA-ID="com.apple.hls.chapters",URI="https://gist.githubusercontent.com/Wkkkkk/532359f8eab500c0cfa7b0222567ad77/raw/chapters.json"
#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear5/prog_index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=700000,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2"
https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear2/prog_index.m3u8
@Wkkkkk
Wkkkkk / master-no-chapters.m3u8
Created May 19, 2026 11:43
HLS test WITHOUT EXT-X-SESSION-DATA (crash debug)
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear5/prog_index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=700000,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2"
https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/gear2/prog_index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=200000,RESOLUTION=400x300,CODECS="avc1.4d4015,mp4a.40.2"
@Wkkkkk
Wkkkkk / chapters.json
Last active May 19, 2026 12:03
HLS chapters prototype — bipbop stream with EXT-X-SESSION-DATA chapters
[
{
"chapter": 1,
"start-time": 0,
"duration": 600,
"titles": [
{
"language": "en",
"title": "Introduction"
}
@Wkkkkk
Wkkkkk / chapters.json
Created May 19, 2026 11:32
HLS chapters prototype — bipbop stream with EXT-X-SESSION-DATA chapters
{
"chapters": [
{
"start-time": 0.0,
"titles": [{ "language": "en", "title": "Introduction" }]
},
{
"start-time": 15.0,
"titles": [{ "language": "en", "title": "Main Segment" }]
},
@Wkkkkk
Wkkkkk / codec-test.html
Created December 5, 2025 12:53
codec-test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Codec Support Test</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 1200px;
@Wkkkkk
Wkkkkk / vmaf.sh
Last active March 26, 2025 08:44
Bash script to convert TS files to MP4s for VMAF measurement
# Bash script to calculate metrics
pretty_print_results() {
echo "Content |Resolution | Codec | Bitrate | Filename | VMAF Score"
echo "--------|-----------|--------|---------|----------------------------|------------"
while read -r line; do
content=$(echo "$line" | cut -d',' -f1)
resolution=$(echo "$line" | cut -d',' -f2)
codec=$(echo "$line" | cut -d',' -f3)
bitrate=$(echo "$line" | cut -d',' -f4)
{
"integration": {
"convoy": {
"events": {
"enable": false,
"eventThrottler": {
"burstQuantum": 1,
"burstThreshold": 5,
"throttlerQuantum": 20
},
@Wkkkkk
Wkkkkk / visitor.cpp
Last active August 7, 2020 02:08
a non-intrusive visitor
#include <map>
#include <functional>
#include <typeindex>
#include <iostream>
class Figure { public: virtual ~Figure() = default; };
class Sphere : public Figure {};
class Polygon : public Figure {};
class Cosmetic { public: virtual ~Cosmetic() = default; };