Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuously monitor or not #14

Open
abhi4100 opened this issue Apr 29, 2024 · 4 comments
Open

Continuously monitor or not #14

abhi4100 opened this issue Apr 29, 2024 · 4 comments

Comments

@abhi4100
Copy link

Hi Adrian,
I have two scenario. First, all segments store in my location and using umzz so add contuinity tag. But second only 10 seg store so umzz not work some segments read then stop mechanism.

@futzu
Copy link
Owner

futzu commented Apr 30, 2024

Show me the umzz command you are running and the output and we can go from there.
I need ALL of the output like this;

a@slow:~$ umzz -i master.m3u8  -o here -s sidecar.txt
input = master.m3u8
byterange = False
continue_m3u8 = False
delete = False
live = False
no_discontinuity = False
no_throttle = False
output_dir = here
program_date_time = False
replay = False
sidecar_file = sidecar.txt
shulga = False
time = 2
hls_tag = x_cue
window_size = 5
version = False
{
   "lines": [
      "",
      "#EXT-X-STREAM-INF:BANDWIDTH=745104,AVERAGE-BANDWIDTH=518885,RESOLUTION=426x240,FRAME-RATE=30.000,CODECS=\"avc1.640015,mp4a.40.2\"",
      "0/index.m3u8"
   ],
   "media": "0/index.m3u8",
   "tags": {
      "#EXT-X-STREAM-INF": {
         "CODECS": "avc1.640015,mp4a.40.2",
         "FRAME-RATE": 30.0,
         "RESOLUTION": "426x240",
         "AVERAGE-BANDWIDTH": 518885,
         "BANDWIDTH": 745104
      }
   },
   "relative_uri": "0/index.m3u8"
}
{
   "lines": [
      "#EXT-X-STREAM-INF:BANDWIDTH=106411,AVERAGE-BANDWIDTH=106411,CODECS=\"mp4a.40.2\"",
      "1/index.m3u8"
   ],
   "media": "1/index.m3u8",
   "tags": {
      "#EXT-X-STREAM-INF": {
         "CODECS": "mp4a.40.2",
         "AVERAGE-BANDWIDTH": 106411,
         "BANDWIDTH": 106411
      }
   },
   "relative_uri": "1/index.m3u8"
}
{
  "headers": {
    "#EXTM3U": "",
    "#EXT-X-VERSION": 6
  },
  "segments": [
    {
      "lines": [
        "",
        "#EXT-X-STREAM-INF:BANDWIDTH=745104,AVERAGE-BANDWIDTH=518885,RESOLUTION=426x240,FRAME-RATE=30.000,CODECS=\"avc1.640015,mp4a.40.2\"",
        "0/index.m3u8"
      ],
      "media": "0/index.m3u8",
      "tags": {
        "#EXT-X-STREAM-INF": {
          "CODECS": "avc1.640015,mp4a.40.2",
          "FRAME-RATE": 30.0,
          "RESOLUTION": "426x240",
          "AVERAGE-BANDWIDTH": 518885,
          "BANDWIDTH": 745104
        }
      },
      "relative_uri": "0/index.m3u8"
    },
    {
      "lines": [
        "#EXT-X-STREAM-INF:BANDWIDTH=106411,AVERAGE-BANDWIDTH=106411,CODECS=\"mp4a.40.2\"",
        "1/index.m3u8"
      ],
      "media": "1/index.m3u8",
      "tags": {
        "#EXT-X-STREAM-INF": {
          "CODECS": "mp4a.40.2",
          "AVERAGE-BANDWIDTH": 106411,
          "BANDWIDTH": 106411
        }
      },
      "relative_uri": "1/index.m3u8"
    }
  ]
}
Rendition Process Started here/0
Rendition Process Started here/1
Updating here/0/sidecar.txt
Updating here/1/sidecar.txt
input = 0/index.m3u8
byterange = False
continue_m3u8 = False
delete = False
live = False
input = 1/index.m3u8
no_discontinuity = False
no_throttle = False
byterange = False
output_dir = here/0
continue_m3u8 = False
program_date_time = False
delete = False
replay = False
live = False
sidecar_file = here/0/sidecar.txt
no_discontinuity = False
shulga = False
no_throttle = False
time = 2
hls_tag = x_cue
output_dir = here/1
window_size = 5
program_date_time = False
version = False
replay = False
sidecar_file = here/1/sidecar.txt
shulga = False
time = 2
hls_tag = x_cue
window_size = 5
version = False
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/pypy3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/pypy3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/a/.local/lib/pypy3.9/site-packages/umzz.py", line 135, in mp_run
    x9mp.decode()
  File "/home/a/.local/lib/pypy3.9/site-packages/x9k3.py", line 554, in decode
    self.decode_m3u8(self.args.input)
  File "/home/a/.local/lib/pypy3.9/site-packages/x9k3.py", line 598, in decode_m3u8
    self._parse_m3u8_media(media)
  File "/home/a/.local/lib/pypy3.9/site-packages/x9k3.py", line 569, in _parse_m3u8_media
    self._tsdata = reader(media)
  File "/home/a/.local/lib/pypy3.9/site-packages/new_reader.py", line 85, in reader
    return open(uri, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '0/https://c4af3793bf76b33c.mediapackage.us-west-2.amazonaws.com/out/v1/547e1b8d09444666ac810f6f8c78ca82/index_2_4716250.ts?m=1695040725'
Process Process-2:
Traceback (most recent call last):
  File "/usr/lib/pypy3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/pypy3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/a/.local/lib/pypy3.9/site-packages/umzz.py", line 135, in mp_run
    x9mp.decode()
  File "/home/a/.local/lib/pypy3.9/site-packages/x9k3.py", line 554, in decode
    self.decode_m3u8(self.args.input)
  File "/home/a/.local/lib/pypy3.9/site-packages/x9k3.py", line 598, in decode_m3u8
    self._parse_m3u8_media(media)
  File "/home/a/.local/lib/pypy3.9/site-packages/x9k3.py", line 569, in _parse_m3u8_media
    self._tsdata = reader(media)
  File "/home/a/.local/lib/pypy3.9/site-packages/new_reader.py", line 83, in reader
    return urllib.request.urlopen(req)
  File "/usr/lib/pypy3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/pypy3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/pypy3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/pypy3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/pypy3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/pypy3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
a@slow:~$ 

@abhi4100
Copy link
Author

abhi4100 commented May 2, 2024

[abhishek@localhost HLSCHUNKS]$ umzz -i master.m3u8
input = master.m3u8
byterange = False
continue_m3u8 = False
delete = False
live = False
no_discontinuity = False
no_throttle = False
output_dir = .
program_date_time = False
replay = False
sidecar_file = None
shulga = False
time = 2
hls_tag = x_cue
window_size = 5
version = False
{
"lines": [
"#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3000000",
"stream_high1.m3u8"
],
"media": "stream_high1.m3u8",
"tags": {
"#EXT-X-STREAM-INF": {
"BANDWIDTH": 3000000,
"PROGRAM-ID": 1
}
},
"relative_uri": "stream_high1.m3u8"
}
{
"lines": [
"#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2000000",
"stream_low1.m3u8"
],
"media": "stream_low1.m3u8",
"tags": {
"#EXT-X-STREAM-INF": {
"BANDWIDTH": 2000000,
"PROGRAM-ID": 1
}
},
"relative_uri": "stream_low1.m3u8"
}
{
"headers": {
"#EXTM3U": ""
},
"segments": [
{
"lines": [
"#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3000000",
"stream_high1.m3u8"
],
"media": "stream_high1.m3u8",
"tags": {
"#EXT-X-STREAM-INF": {
"BANDWIDTH": 3000000,
"PROGRAM-ID": 1
}
},
"relative_uri": "stream_high1.m3u8"
},
{
"lines": [
"#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2000000",
"stream_low1.m3u8"
],
"media": "stream_low1.m3u8",
"tags": {
"#EXT-X-STREAM-INF": {
"BANDWIDTH": 2000000,
"PROGRAM-ID": 1
}
},
"relative_uri": "stream_low1.m3u8"
}
]
}
Rendition Process Started ./0
Rendition Process Started ./1
input = stream_high1.m3u8
byterange = False
continue_m3u8 = False
delete = False
live = False
no_discontinuity = False
no_throttle = False
output_dir = ./0
program_date_time = False
replay = False
sidecar_file = None
shulga = False
time = 2
hls_tag = x_cue
window_size = 5
version = False
input = stream_low1.m3u8
byterange = False
continue_m3u8 = False
delete = False
live = False
no_discontinuity = False
no_throttle = False
output_dir = ./1
program_date_time = False
replay = False
sidecar_file = None
shulga = False
time = 2
hls_tag = x_cue
window_size = 5
version = False
./1/seg0.ts: start: 45.640000 end: 48.040000 duration: 2.400000
./0/seg0.ts: start: 50.440000 end: 52.840000 duration: 2.400000
./1/seg1.ts: start: 48.040000 end: 50.440000 duration: 2.400000
./0/seg1.ts: start: 52.840000 end: 55.240000 duration: 2.400000
./1/seg2.ts: start: 50.440000 end: 52.840000 duration: 2.400000
./1/seg3.ts: start: 52.840000 end: 55.240000 duration: 2.400000
./0/seg2.ts: start: 55.240000 end: 57.640000 duration: 2.400000
./1/seg4.ts: start: 55.240000 end: 57.640000 duration: 2.400000
./0/seg3.ts: start: 57.640000 end: 60.040000 duration: 2.400000
./1/seg5.ts: start: 57.640000 end: 60.040000 duration: 2.400000
./0/seg4.ts: start: 60.040000 end: 62.440000 duration: 2.400000
./1/seg6.ts: start: 60.040000 end: 62.440000 duration: 2.400000
./0/seg5.ts: start: 62.440000 end: 64.840000 duration: 2.400000
./1/seg7.ts: start: 62.440000 end: 64.840000 duration: 2.400000
./1/seg8.ts: start: 64.840000 end: 67.240000 duration: 2.400000
./0/seg6.ts: start: 64.840000 end: 67.240000 duration: 2.400000
./1/seg9.ts: start: 67.240000 end: 69.640000 duration: 2.400000
./0/seg7.ts: start: 67.240000 end: 69.640000 duration: 2.400000
./1/seg10.ts: start: 69.640000 end: 72.040000 duration: 2.400000
./1/seg11.ts: start: 72.040000 end: 74.440000 duration: 2.400000
./1/seg12.ts: start: 74.440000 end: 76.840000 duration: 2.400000
./1/seg13.ts: start: 76.840000 end: 79.240000 duration: 2.400000
./1/seg14.ts: start: 79.240000 end: 81.640000 duration: 2.400000
./1/seg15.ts: start: 81.640000 end: 84.040000 duration: 2.400000
./1/seg16.ts: start: 84.040000 end: 86.440000 duration: 2.400000
./1/seg17.ts: start: 86.440000 end: 88.840000 duration: 2.400000
./1/seg18.ts: start: 88.840000 end: 91.240000 duration: 2.400000
./1/seg19.ts: start: 91.240000 end: 93.640000 duration: 2.400000

^CTraceback (most recent call last):
Process Process-1:
Process Process-2:
File "/usr/local/bin/umzz", line 5, in
cli()
File "/usr/local/lib/python3.6/site-packages/umzz.py", line 207, in cli
do(args)
File "/usr/local/lib/python3.6/site-packages/umzz.py", line 189, in do
Traceback (most recent call last):
Traceback (most recent call last):
um.go()
File "/usr/local/lib/python3.6/site-packages/umzz.py", line 112, in go
File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/site-packages/umzz.py", line 135, in mp_run
x9mp.decode()
File "/usr/local/lib/python3.6/site-packages/umzz.py", line 135, in mp_run
x9mp.decode()
File "/home/abhishek/.local/lib/python3.6/site-packages/x9k3.py", line 554, in decode
self.decode_m3u8(self.args.input)
File "/home/abhishek/.local/lib/python3.6/site-packages/x9k3.py", line 554, in decode
self.decode_m3u8(self.args.input)
File "/home/abhishek/.local/lib/python3.6/site-packages/x9k3.py", line 590, in decode_m3u8
if self._endlist(line):
File "/home/abhishek/.local/lib/python3.6/site-packages/x9k3.py", line 585, in decode_m3u8
m3u8 = manifesto.readlines()
File "/home/abhishek/.local/lib/python3.6/site-packages/x9k3.py", line 354, in _endlist
@staticmethod
time.sleep(0.2)

@abhi4100
Copy link
Author

abhi4100 commented May 2, 2024

In my case , I am not using sidecar file.

@futzu
Copy link
Owner

futzu commented Jul 15, 2024

Are you concerned that it is doing more segments for rendition 1 than for rendition 0? That happens due to bitrate but it will tend to equal out.
Try the latest version I just uploaded v0.0.33, and see if that doesn't work better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants