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:
- 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
- Add better error handling for #179. — committed to Breakthrough/PySceneDetect by Breakthrough 6 years ago
- Replace link in error message with entry in FAQ. #179 — committed to Breakthrough/PySceneDetect by Breakthrough 6 years ago
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:
I think your contact form is broken? I get a 400 JS error.