Last active
December 11, 2015 00:28
-
-
Save youzaka/4516570 to your computer and use it in GitHub Desktop.
transport_scrambling_controlが0でないパケットが残ってるせいでVLCで再生できないファイルを簡易に何とかするスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ariblib import tsopen | |
from ariblib.packet import transport_scrambling_control | |
import sys | |
output = open(sys.argv[2], 'wb') | |
with tsopen(sys.argv[1]) as ts: | |
for packet in ts: | |
if transport_scrambling_control(packet): | |
output = open(sys.argv[2], 'wb') | |
else: | |
output.write(packet) | |
output.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment