Failed to read frame . .

I got this error when I try to begin the process :

“failed to read frame 90 from S:/6GB/2021-06-20/Gopro/GH010059.MP4”

image

Did this happen during the stitching process? Is S:/ a sd card reader or the camera connected as USB storage?

My s: drive is already is an internal HDD but I did move the files to 2 other HDD and redid the test and the same thing happen.

The files are from a GoPro Hero 8 black but I think it should be ok.

When I click “start” I can see the stitching process on the screen for some frames but after let say 1 or 2 seconds it pop the error. Each time it seems not to be at the same frame or the same source video.

“failed to read frame 23 from D:/GoproHero8/GH010003.MP4”

I observed too when I close the program, the application is still running in the background “as_main.exe” and I need to manually kill it.

I believe this is caused by the default OpenCV video decoder failing to read certain frames in videos produced some GoPro models. I’ve seen a similar issue on a GoPro 9 video.

Can you share the video with me? No need to be the entire game, just one left video and one right video.

EDIT : I just tested stitching with the 1 minute videos I cutted (the ones il the link below) and it seems to work correctly . . . Because I will need to put all parts of the GoPro videos together as the recording are split I should be ok after putting together all parts of each side in AviDemux. Still weird OpenCV got problem with the RAW GoPro video.

I’ve cut the video with AviDemux in copy mode so you should have the original encoding from the GoPro for 1 minute of the beginning of the match.

Here is the link for the videos :

The GoPros were in 4K mode and the angle between them was not 90 degree.

I don’t know if the stitching alignment could be further improved :

I observed too that there is an asymmetry after the stitching regarding the center of the field :

It could be cool if we could “adjust/fine tune” the parameters for the stitching manually.

I think when AviDemux cuts a video it actually re-encodes it so the resulting video doesn’t have this issue.

There is no need to concatenate all parts into a single file first – you can select multiple video in ActionStitch at once. So we’ll need to fix this issue. Can you share the raw videos?

Stitching requires correct calibration data, and we don’t have one for GoPro 8 yet. I guess you chose GoPro 10 from the list?

For calibration can you take a video like this one: https://download.actionstitch.com/calibration_sample.mp4? The goal is to cover all corners with the checkerboard at different positions, and pause at each position for a second or 2 to get rid of blurriness.

You can print this checkerboard on a letter paper: opencv/pattern.png at 4.x · opencv/opencv · GitHub. However, it would give better results if you can print a larger one on a 18"x24" blue print at Staples (which costs only $1.89)?

I’m uploaded the RAW video to the same Mega folder as the 2 previous shorts.

As for the calibration pattern to print, I have a 13" x 19" photo printer so the pattern size should be just good. I’ll take the video later tonight.

Thanks again,

I just did uploaded the calibration video for the GoPro Hero 8 in the same folder here :

And I started modeling a camera support for it too if you want to add it in the future :

Regards,

Sebastien

I added the calibration data for this camera. If you restart ActionStitch you’ll find it in the camera list.

I assume this is GoPro 8 Black, right?

This is a test video I made with the new calibration data: ActionStitch Player

Yes, it’s a GoPro Hero 8 Black.

It was configured to 4K and “WIDE” mode.

Do you plan to have it GPU accelerated in the future ?

I redid the calibration and this time the stitching is better – left and right should now line up perfectly on the far side of the middle line. You just need to restart ActionStitch and it will download the latest calibration data automatically from our server.

I’ll try GPU acceleration once the beta testing is done.

1 Like

My latest version :

Do you mind sharing the STL file?

Yes for sure, I tried to attach it to my previous reply but the forum rules don’t permit it.

I just uploaded it to my previous mega share folder and I included the original Sketchup file too.

The hole is 5.5mm in diameter so perfect to use a 1/4-20 UNC tap to make treads.

Thanks. I uploaded both files to actionstitch-player/mounts at main · gilbertchen/actionstitch-player · GitHub

1 Like

Version 0.9 from ActionStitch has a fix for the frame reading error. But you’ll have to change the default setting for the fix to work. On macOS, run this command in terminal:

defaults write  ~//Library/Preferences/com.actionstitch.ActionStitch.plist stitch_source pyav

On Windows, add a new registry value under HKCU\Software\actionstitch.com\ActionStitch with the name stitch_source and set it to pyav.

What this does is to use pyav instead opencv to read videos sources during stitching.

1 Like

I installed version 0.9 and added the registry key and redid the test but while clicking to do the stitching at the end it pop-up this window :

image

Remove the registry value HKCU\Software\actionstitch.com\ActionStitch\License and restart ActionStitch (by right clicking the system tray icon and selecting Quit).

After restarting ActionStitch, check the window title. If the title shows Trial Edition then it is all good.

1 Like