Skip to content

Instantly share code, notes, and snippets.

@youzaka
Last active December 11, 2015 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youzaka/4516570 to your computer and use it in GitHub Desktop.
Save youzaka/4516570 to your computer and use it in GitHub Desktop.
transport_scrambling_controlが0でないパケットが残ってるせいでVLCで再生できないファイルを簡易に何とかするスクリプト
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