BITRATE=6000000
PCR_DISTANCE=6000
PCR_PID=1001

tsp -v -b $BITRATE \
	-I null \
	-P regulate --packet-burst 14 \
	-P filter --every $PCR_DISTANCE --set-label 1 \
	-P craft --only-label 1 --pid $PCR_PID --no-payload --pcr 0 \
	-P continuity --pid $PCR_PID --fix \
	-P pcradjust --pid $PCR_PID \
	-P pat -c -a 1/1000 \
	-P pmt -c -i 1 --pcr-pid $PCR_PID -p 1000 -a 1002/0x0d -a 1003/0x0d -a 1004/0x0d \
		   --add-stream-identifier --set-data-broadcast-id 1002/5 \
		   --set-data-broadcast-id 1003/5 --set-data-broadcast-id 1004/5 \
	-P inject tdt.xml --pid 0x14 --bitrate 2000 --stuffing \
	-P timeref --system-synchronous \
	-P mpeinject -p 1002 -l 127.0.0.2 2000 --max-queue 8192 \
	-P mpeinject -p 1003 -l 127.0.0.2 3000 --max-queue 8192 \
	-P history \
	-P until -s 60 \
	-O file --max-size 100000000 experiment2-clean-60s.ts
