PySceneDetect: Scenedetect fails on mp4 video with multiple audio tracks

Bug/Issue Description: I get fatal errors using scenedetect with a multiaudio stream mp4. When I used ffmpeg to copy to an mkv with the same streams, or when I copy to an mp4 with only one audio stream, it works. It will not work with multiple streams in an mp4.

Required Information: Provide the following information to assist with reporting the bug:

  1. Provide a full copy of the command line options you are using, for example:
scenedetect --input /Volumes/sources/sources/video/movie/chapter_5/landscape.mp4  --output /Volumes/sources/sources/movie/movie/chapter_5/scene_detect  --stats stats.csv detect-content list-scenes save-images            

attach the generated BUG_REPORT.txt file.

INFO: __init__.scenedetect_cli(): Version: v0.5.3
INFO: __init__.scenedetect_cli(): Info Level: debug
INFO: __init__.scenedetect_cli(): Output directory set:
  /Volumes/sources/sources/video/movie/chapter_5/scene_detect
DEBUG: context.parse_options(): Parsing program options.
DEBUG: context._init_video_manager(): Initializing VideoManager.
INFO: video_manager.__init__(): Loaded 1 video, framerate: 23.98 FPS, resolution: 886 x 480
INFO: video_manager.set_downscale_factor(): Downscale factor set to 3, effective resolution: 295 x 160
DEBUG: context.parse_options(): VideoManager initialized.
DEBUG: __init__.detect_content_command(): Detecting content, parameters:
  threshold: 30, min-scene-len: 14
INFO: context.list_scenes_command(): Scene list CSV file name format:
  $VIDEO_NAME-Scenes.csv
INFO: context.save_images_command(): Image output format set: JPEG
DEBUG: context.process_input(): Processing input...
INFO: context.process_input(): Detecting scenes...
INFO: context.process_input(): Processed 0 frames in 0.0 seconds (average 0.00 FPS).
DEBUG: context.process_input(): No frame metrics updated, skipping update of the stats file.
INFO: context.process_input(): Detected 1 scenes, average shot length 0.0 seconds.
INFO: context.process_input(): Writing scene list to CSV file:
  /Volumes/sources/sources/video/movie/chapter_5/scene_detect/landscape-Scenes.csv
INFO: context.process_input(): Scene List:
-----------------------------------------------------------------------
 | Scene # | Start Frame |  Start Time  |  End Frame  |   End Time   |
-----------------------------------------------------------------------
 |      1  |           0 | 00:00:00.000 |           0 | 00:00:00.000 |
-----------------------------------------------------------------------

INFO: video_manager.set_downscale_factor(): Downscale factor set to 1, effective resolution: 886 x 480
INFO: context._generate_images(): Generating output images (3 per scene)...
DEBUG: context.cleanup(): Cleaning up...


INFO: __init__.scenedetect_cli(): Version: v0.5.3
INFO: __init__.scenedetect_cli(): Info Level: debug
INFO: __init__.scenedetect_cli(): Output directory set:
  /Volumes/sources/sources/video/movie/chapter_5/scene_detect
DEBUG: context.parse_options(): Parsing program options.
DEBUG: context._init_video_manager(): Initializing VideoManager.
INFO: video_manager.__init__(): Loaded 1 video, framerate: 23.98 FPS, resolution: 886 x 480
INFO: video_manager.set_downscale_factor(): Downscale factor set to 3, effective resolution: 295 x 160
DEBUG: context.parse_options(): VideoManager initialized.
DEBUG: __init__.detect_content_command(): Detecting content, parameters:
  threshold: 30, min-scene-len: 14
INFO: context.list_scenes_command(): Scene list CSV file name format:
  $VIDEO_NAME-Scenes.csv
INFO: context.save_images_command(): Image output format set: JPEG
DEBUG: context.process_input(): Processing input...
INFO: context.process_input(): Detecting scenes...
INFO: context.process_input(): Processed 0 frames in 0.0 seconds (average 0.00 FPS).
DEBUG: context.process_input(): No frame metrics updated, skipping update of the stats file.
INFO: context.process_input(): Detected 1 scenes, average shot length 0.0 seconds.
INFO: context.process_input(): Writing scene list to CSV file:
  /Volumes/sources/sources/video/movie/chapter_5/scene_detect/landscape-Scenes.csv
INFO: context.process_input(): Scene List:
-----------------------------------------------------------------------
 | Scene # | Start Frame |  Start Time  |  End Frame  |   End Time   |
-----------------------------------------------------------------------
 |      1  |           0 | 00:00:00.000 |           0 | 00:00:00.000 |
-----------------------------------------------------------------------

INFO: video_manager.set_downscale_factor(): Downscale factor set to 1, effective resolution: 886 x 480
INFO: context._generate_images(): Generating output images (3 per scene)...
DEBUG: context.cleanup(): Cleaning up...


Expected Behavior: Expect the process to run with output and no error

Computing Environment: Dockerfile

FROM python:3.8-slim

RUN apt-get update && apt-get install -y \
  libglib2.0-0 \
  libsm6 \
  libxext6 \
  libxrender-dev \
  libgl1-mesa-glx \
  && rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir scenedetect[opencv,progress_bar]==0.5.3

Additional Information: Just my gratefulness for making this!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks so much. If I have time later next week, and I haven’t heard back, I might do some poking with OpenCV

Yeah, the issue exists in the parent clip and the one I sent you. I confirmed before I sent it. It might be something unique to the docker setup. I’m using Docker on Ubuntu 18.04, but that’s really the point of docker is that the underlying operating system should make little to no difference. At this point, maybe it would be easier for me to start getting into PySceneDetect source code and do my own debugging than make you learn docker though…Unless you’re interested.

Thanks! I approved your request. You’re the best!

On Sat, Aug 22, 2020 at 9:53 AM Brandon Castellano notifications@github.com wrote:

Thanks for letting me know! Something is definitely up with my site, haven’t updated it in a while, will have to do that. Have requested access for now, thank you for the link (have removed it from your comment to prevent spam).

On Fri, Aug 21, 2020 at 1:04 PM Tyler Sl8r notifications@github.com wrote:

Here’s a link. It’s restricted, but if you request access I can grant:

https://drive.google.com/file/d/1Ty8SxhkiwcmyhKZJElMjef7EiubKYgt9/view?usp=sharing

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Breakthrough/PySceneDetect/issues/179#issuecomment-678393940 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAA6TBHRJ6BDTK4MDIJ6BBLSB2SK3ANCNFSM4QAQHF7A

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Breakthrough/PySceneDetect/issues/179#issuecomment-678657058, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADNWLSI7ZSANSLVOMJSNM3SB7SV3ANCNFSM4QAQHF7A .

I think your contact form is broken? I get a 400 JS error.