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

[bug] KeyframeSelection node not opening video #2285

Closed
CounterFlow64 opened this issue Dec 27, 2023 · 6 comments
Closed

[bug] KeyframeSelection node not opening video #2285

CounterFlow64 opened this issue Dec 27, 2023 · 6 comments
Assignees
Labels
bug for actual bugs (unsure? use type:question)

Comments

@CounterFlow64
Copy link

Describe the bug
The KeyframeSelection node helps me convert videos to frames, while adding in the needed camera metadata. However, it simply says [13:14:19.136457][fatal] Unable to open the video : /home/linuxworkstation/Programs/Meshroom-2023.3.0-linux/Meshroom-2023.3.0/C1710.mp4 when starting computation.

To Reproduce
Steps to reproduce the behavior:

  1. Import KeyframeSelection node
  2. Add the correct parameters or any at all
  3. Hit compute
  4. It will say the video cannot open, even if directory and all is correct

Expected behavior
I would expect it to export the frames inside the video into a specified image folder. On a footnote, maybe it would be better to support video imports directly as a convenience measure? A common use case is drag and drop camera tracking, and that would be very useful.

Desktop

  • OS: Fedora Linux
  • Python version: Python 3.12.1 (Not sure if relevant since this is the portable linux build)
  • Qt/PySide version: I don't believe I have this installed
  • Meshroom version: 2023.3.0
@CounterFlow64 CounterFlow64 added the bug for actual bugs (unsure? use type:question) label Dec 27, 2023
@cbentejac cbentejac self-assigned this Dec 27, 2023
@cbentejac
Copy link
Contributor

Hi @CounterFlow64,

Thank you for reporting the issue!

This does not happen on Windows with Meshroom 2023.3.0, so I suspect an issue with the built codecs of OpenCV for the Linux release. I'll check that out.

@arnolde
Copy link

arnolde commented Jun 21, 2024

@cbentejac I also still have this exact same problem, it was also mentioned here but never solved:
#955
#1215
#1291

Have you made any progress?
I run Ubuntu 22.04, I even installed the libopencv-dev packages but that didnt help.

Log: (unfortunately even "trace" loglevel gives no details)

 - commandLine: aliceVision_keyframeSelection  --inputPaths "/tmp/FoamPlane.MP4" --sensorDbPath "/home/oliver/Downloads/Meshroom-2023.3.0-linux/Meshroom-2023.3.0/aliceVision/share/aliceVision/cameraSensors.db" --useSmartSelection True --pxDisplacement 10.0 --minNbOutFrames 10 --maxNbOutFrames 2000 --rescaledWidthSharpness 720 --rescaledWidthFlow 720 --sharpnessWindowSize 200 --flowCellSize 90 --minBlockSize 10 --renameKeyframes False --outputExtension jpg --exportScores False --exportFlowVisualisation False --flowVisualisationOnly False --skipSharpnessComputation False --skipSelection False --verboseLevel trace --outputFolder "/tmp/MeshroomCache/KeyframeSelection/2788bbbd4a7fa7683411826fc0bb52d8a16a38a9" --outputSfMDataKeyframes "/tmp/MeshroomCache/KeyframeSelection/2788bbbd4a7fa7683411826fc0bb52d8a16a38a9/keyframes.sfm" --outputSfMDataFrames "/tmp/MeshroomCache/KeyframeSelection/2788bbbd4a7fa7683411826fc0bb52d8a16a38a9/frames.sfm"
 - logFile: /tmp/MeshroomCache/KeyframeSelection/2788bbbd4a7fa7683411826fc0bb52d8a16a38a9/log
ERROR:root:Error on node computation: Error on node "KeyframeSelection_1":
Log:
[2024-06-21 10:03:48.589193] [0x00007ed46e2a4000] [trace]   Embedded OCIO configuration file: '/home/oliver/Downloads/Meshroom-2023.3.0-linux/Meshroom-2023.3.0/aliceVision/share/aliceVision/config.ocio' found.
Program called with the following parameters:
 * brands =  = [] (default)
 * csvFilename = "scores.csv" (default)
 * exportFlowVisualisation = 0
 * exportScores = 0
 * exportSelectedFrames = 0 (default)
 * flowCellSize = 90
 * flowVisualisationOnly = 0
 * inputPaths =  = [/tmp/FoamPlane.MP4]
 * maskPaths =  = [] (default)
 * maxCoresAvailable =  Unknown Type "j" (default)
 * maxFrameStep =  Unknown Type "j" (default)
 * maxMemoryAvailable = 18446744073709551615 (default)
 * maxNbOutFrames =  Unknown Type "j"
 * minBlockSize = 10
 * minFrameStep =  Unknown Type "j" (default)
 * minNbOutFrames =  Unknown Type "j"
 * mmFocals =  Unknown Type "St6vectorIfSaIfEE" (default)
 * models =  = [] (default)
 * outputExtension = "jpg"
 * outputFolder = "/tmp/MeshroomCache/KeyframeSelection/2788bbbd4a7fa7683411826fc0bb52d8a16a38a9"
 * outputSfMDataFrames = "/tmp/MeshroomCache/KeyframeSelection/2788bbbd4a7fa7683411826fc0bb52d8a16a38a9/frames.sfm"
 * outputSfMDataKeyframes = "/tmp/MeshroomCache/KeyframeSelection/2788bbbd4a7fa7683411826fc0bb52d8a16a38a9/keyframes.sfm"
 * pxDisplacement = 10
 * renameKeyframes = 0
 * rescaledWidthFlow = 720
 * rescaledWidthSharpness = 720
 * sensorDbPath = "/home/oliver/Downloads/Meshroom-2023.3.0-linux/Meshroom-2023.3.0/aliceVision/share/aliceVision/cameraSensors.db"
 * sharpnessWindowSize = 200
 * skipSelection = 0
 * skipSharpnessComputation = 0
 * storageDataType =  Unknown Type "N11aliceVision5image16EStorageDataTypeE" (default)
 * useSmartSelection = 1
 * verboseLevel = "trace"

Hardware : 
	Detected core count : 4
	OpenMP will use 4 cores
	Detected available memory : 13602 Mo

[10:03:48.590637][info] Single camera
[10:03:48.590678][info] Camera: /tmp/FoamPlane.MP4
	 - brand: 
	 - model: 
	 - focal (mm): 0
[10:03:48.599303][warning] Unable to open the video : /tmp/FoamPlane.MP4
[10:03:48.599664][fatal] Unable to open the video : /tmp/FoamPlane.MP4

@furbrain
Copy link

furbrain commented Aug 13, 2024

I've looked into this further - it appears that the opencv created in AliceVisionDependencies does not have FFMPEG support installed, which is what is required for reading videos. I suspect it should just need adding ffmpeg libraries to the travis.yml; I'll create an issue there.

@furbrain
Copy link

Ah, AlicevisionDependencies looks like it isn't used any more. The docker build scripts look like they ought to work. I can't find the script that makes the downloads for the main website though - can anyone point me in the right direction here?

@Nelo390
Copy link

Nelo390 commented Nov 25, 2024

Same issue here! Linux, ofc. Glad to see that there's active development. A workaround seems to be to extract the frames with ffmpeg, Delete duplicates with Fdupes so you don't nuke your computer, and then process the folder of frames by providing the folder path to it.
` GNU nano 8.2 log
[2024-11-24 20:37:45.837432] [0x000079c665862000] [trace] Embedded OCIO configuration fi>
Program called with the following parameters:

  • brands = = [] (default)
  • csvFilename = "scores.csv" (default)
  • exportFlowVisualisation = 0
  • exportScores = 0
  • exportSelectedFrames = 0 (default)
  • flowCellSize = 90
  • flowVisualisationOnly = 0
  • inputPaths = = [/home/nelo/Pictures/Part/VID_20241124_172006.mp4]
  • maskPaths = = [] (default)
  • maxCoresAvailable = Unknown Type "j" (default)
  • maxFrameStep = Unknown Type "j" (default)
  • maxMemoryAvailable = 18446744073709551615 (default)
  • maxNbOutFrames = Unknown Type "j"
  • minBlockSize = 10
  • minFrameStep = Unknown Type "j" (default)
  • minNbOutFrames = Unknown Type "j"
  • mmFocals = Unknown Type "St6vectorIfSaIfEE" (default)
  • models = = [] (default)
  • outputExtension = "jpg"
  • outputFolder = "/home/nelo/Downloads/Meshroom-2023.3.0/MeshroomCache/KeyframeSelection/>
  • outputSfMDataFrames = "/home/nelo/Downloads/Meshroom-2023.3.0/MeshroomCache/KeyframeSel>
  • outputSfMDataKeyframes = "/home/nelo/Downloads/Meshroom-2023.3.0/MeshroomCache/Keyframe>
  • pxDisplacement = 5
  • renameKeyframes = 0
  • rescaledWidthFlow = 720
  • rescaledWidthSharpness = 720
  • sensorDbPath = "/home/nelo/Downloads/Meshroom-2023.3.0/aliceVision/share/aliceVision/ca>
  • sharpnessWindowSize = 200
  • skipSelection = 0
  • skipSharpnessComputation = 0
  • storageDataType = Unknown Type "N11aliceVision5image16EStorageDataTypeE" (default)
  • useSmartSelection = 1
  • verboseLevel = "debug"

Hardware :
Detected core count : 12
OpenMP will use 12 cores
Detected available memory : 7148 Mo

[20:37:45.838420][info] Single camera
[20:37:45.838443][info] Camera: /home/nelo/Pictures/Part/VID_20241124_172006.mp4
- brand:
- model:
- focal (mm): 0
[20:37:45.844065][warning] Unable to open the video : /home/nelo/Pictures/Part/VID_2024112>
[20:37:45.844212][fatal] Unable to open the video : /home/nelo/Pictures/Part/VID_20241124_>
`

@cbentejac
Copy link
Contributor

This issue has been fixed by alicevision/AliceVision#1784.

A new Docker image of the dependencies that includes this fix has been pushed with the following tag: alicevision/alicevision-deps:2024.12.03-ubuntu22.04-cuda12.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug for actual bugs (unsure? use type:question)
Projects
None yet
Development

No branches or pull requests

5 participants