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

Video's not processing #177

Closed
neldonado opened this issue Mar 25, 2023 · 10 comments
Closed

Video's not processing #177

neldonado opened this issue Mar 25, 2023 · 10 comments

Comments

@neldonado
Copy link

I noticed recently that all of the new videos dropped into the watch folder are not getting processed and showing a thumbnail. When I click on the videos they'll play fine.

https://i.hah.rip/Q0R.png

@neldonado
Copy link
Author

image

@ShaneIsrael
Copy link
Owner

What type of video is it? .mp4, .mkv, etc etc. Do you know what it is encoded in h.265, h.264, etc etc.

Add a new video to the watch folder, run the scan and look at the fireshare container logs, is there an error? if there is copy it and paste it here.

Can you also show me your docker-compose file, this could be an issue with how you set up your volume mounts.

@neldonado
Copy link
Author

These are all .mp4 videos, recorded with nvidia shadow play. So I believe this is h.264.

I moved a video into the watch folder and hit scan. These are the logs:

2023-03-25 20:29:57,793 INFO __init__.update_config:27 | Validating configuration file... 2023-03-25 20:29:57,811 INFO cli.bulk_import:256 | A scan process is currently active... Aborting. (Remove /data/fireshare.lock to continue anyway) XXX.XXX.XXX.XXX, XXX.XX.XXX.XXX - - [25/Mar/2023:20:29:58 -0700] "GET /api/loggedin HTTP/1.1" 200 4 "https://mydomain.tld/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0" "172.17.0.1" XXX.XXX.XXX.XXX, XXX.XX.XXX.XXX - - [25/Mar/2023:20:29:58 -0700] "GET /api/videos?sort=updated_at+desc HTTP/1.1" 200 104228 "https://mydomain.tld/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0" "172.17.0.1"

image

image

@ShaneIsrael
Copy link
Owner

That is a log saying that the scan is currently running. I would do this.

  1. Stop fireshare
  2. Add a new video (not one that was already added)
  3. Start fireshare
  4. View the logs and wait until the scan is finished.

The scan might take a minute or two to complete, once the new video shows up check and see if there is an error.

Another thing you can try is recording a video with something that is not Shadowplay. I recently stopped using Shadowplay for my videos because it now records them in h265 which only some browsers and versions support. That could be whats happening here, because its in h265 the scan process might not be able to generate a thumbnail image correctly.

@neldonado
Copy link
Author

neldonado commented Mar 26, 2023

`[2023-03-26 07:12:04,705] INFO in api: Executed manual scan

      • [26/Mar/2023:07:12:04 -0700] "GET /api/manual/scan HTTP/1.1" 200 0 "http://192.168.1.56:8753/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0" "192.168.1.20"
        2023-03-26 07:12:05,169 INFO init.update_config:27 | Validating configuration file...
        2023-03-26 07:12:05,189 INFO init.update_config:27 | Validating configuration file...
        2023-03-26 07:12:05,203 INFO cli.scan_videos:50 | Scanning /videos for .mp4, .mov, .webm video files
        2023-03-26 07:12:20,449 INFO schedule.fireshare_scan:12 | Starting scheduled scan...
        2023-03-26 07:12:21,049 INFO init.update_config:27 | Validating configuration file...
        2023-03-26 07:12:21,069 INFO cli.bulk_import:256 | A scan process is currently active... Aborting. (Remove /data/fireshare.lock to continue anyway)
        2023-03-26 07:12:26,437 INFO cli.scan_videos:78 | Adding new Video e3dc8f02aaac0ca744008fb27e40056a at PLAYERUNKNOWN'S BATTLEGROUNDS/PLAYERUNKNOWN'S BATTLEGROUNDS 2023.03.18 - 12.35.38.16.DVR.mp4 (created 2023-03-26T07:09:18.828138, updated 2023-03-18T12:35:38.538302)
        2023-03-26 07:12:27,393 INFO cli.scan_videos:78 | Adding new Video d1b7087222c33264f8805ad049e552b4 at Test/2023-03-26 07-08-21.mp4 (created 2023-03-26T07:09:18.835138, updated 2023-03-26T07:08:45.198029)
        2023-03-26 07:12:27,415 INFO cli.scan_videos:96 | Linking ../../videosPLAYERUNKNOWN'S BATTLEGROUNDSPLAYERUNKNOWN'S BATTLEGROUNDS 2023.03.18 - 12.35.38.16.DVR.mp4 --> /processed/video_links/e3dc8f02aaac0ca744008fb27e40056a.mp4
        2023-03-26 07:12:27,421 INFO cli.scan_videos:96 | Linking ../../videosTest2023-03-26 07-08-21.mp4 --> /processed/video_links/d1b7087222c33264f8805ad049e552b4.mp4
        2023-03-26 07:12:27,446 INFO cli.scan_videos:106 | Verifying 285 video files still exist...
        2023-03-26 07:12:27,482 INFO init.update_config:27 | Validating configuration file...
        2023-03-26 07:12:27,503 INFO cli.sync_metadata:145 | Found 21 videos without metadata
        --- Logging error ---
        Traceback (most recent call last):
        File "/usr/local/lib/python3.9/site-packages/fireshare/util.py", line 47, in get_media_info
        data = json.loads(sp.check_output(cmd.split()).decode('utf-8'))
        File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
        raise CalledProcessError(retcode, process.args,
        subprocess.CalledProcessError: Command '['ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_entries', 'stream', '/processed/video_links/7435fbc58333c23615c47b0699c8c36c.mp4']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/logging/init.py", line 1083, in emit
msg = self.format(record)
File "/usr/local/lib/python3.9/logging/init.py", line 927, in format
return fmt.format(record)
File "/usr/local/lib/python3.9/logging/init.py", line 663, in format
record.message = record.getMessage()
File "/usr/local/lib/python3.9/logging/init.py", line 367, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/usr/local/bin/fireshare", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 265, in bulk_import
ctx.invoke(sync_metadata)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 149, in sync_metadata
info = util.get_media_info(vpath)
File "/usr/local/lib/python3.9/site-packages/fireshare/util.py", line 50, in get_media_info
logger.warn('Could not extract video info', ex)
Message: 'Could not extract video info'
Arguments: (CalledProcessError(1, ['ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_entries', 'stream', '/processed/video_links/7435fbc58333c23615c47b0699c8c36c.mp4']),)
Traceback (most recent call last):
File "/usr/local/bin/fireshare", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 265, in bulk_import
ctx.invoke(sync_metadata)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 150, in sync_metadata
vcodec = [i for i in info if i['codec_type'] == 'video'][0]
TypeError: 'NoneType' object is not iterable
XXX.XXX.XXX.XXX, XXX.XX.XXX.XXX- - [26/Mar/2023:07:12:32 -0700] "GET / HTTP/1.1" 200 1048 "-" "Uptime-Kuma/1.21.0" "172.17.0.1"

      • [26/Mar/2023:07:12:41 -0700] "GET /api/loggedin HTTP/1.1" 200 4 "http://192.168.1.56:8753/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0" "192.168.1.20"
      • [26/Mar/2023:07:12:41 -0700] "GET /api/videos?sort=updated_at+desc HTTP/1.1" 200 104867 "http://192.168.1.56:8753/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0" "192.168.1.20"
        2023/03/26 07:12:41 [error] 9#9: *22 open() "/processed/derived/d1b7087222c33264f8805ad049e552b4/poster.jpg" failed (2: No such file or directory), client: 192.168.1.20, server: default, request: "GET /_content/derived/d1b7087222c33264f8805ad049e552b4/poster.jpg HTTP/1.1", host: "192.168.1.56:8753", referrer: "http://192.168.1.56:8753/"
        2023/03/26 07:12:41 [error] 9#9: *21 open() "/processed/derived/d24fa5a9f8fed3d2861ea649a89127f3/poster.jpg" failed (2: No such file or directory), client: 192.168.1.20, server: default, request: "GET /_content/derived/d24fa5a9f8fed3d2861ea649a89127f3/poster.jpg HTTP/1.1", host: "192.168.1.56:8753", referrer: "http://192.168.1.56:8753/"`

@neldonado
Copy link
Author

Worth noting here that if I hover the thumbnails start playing

https://i.hah.rip/H47.gif

@ShaneIsrael
Copy link
Owner

The issue is this file right here which is a symlink to the video file in your watch folder that fireshare creates. My guess is that you have files in your watch folder that are not videos OR potentially a corrupt video / invalid video type.

/processed/video_links/7435fbc58333c23615c47b0699c8c36c.mp4

So what happens is fireshare errors on that file which stops the thumbnail creation process from happening. So to figure out what the problem file is run the stat command from your /fireshare_processed/video_links directory against that symlink.

stat 7435fbc58333c23615c47b0699c8c36c.mp4

It should tell you what the file its pointing to is.

@neldonado
Copy link
Author

hmm, I had a .ds file in the watch folder, presumably when I mounted the share earlier on my macbook? going to delete that and rescan

@neldonado
Copy link
Author

image

I don't have anything in my video links folder?

@neldonado
Copy link
Author

hey! I used that to find the video name, deleted the corrupted video and it's all good now! Thanks!

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