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

NVENC: Error while writing raw video frame #890

Closed
tildeman opened this issue Dec 24, 2022 · 8 comments
Closed

NVENC: Error while writing raw video frame #890

tildeman opened this issue Dec 24, 2022 · 8 comments
Labels
stale This issue has not had any activity in 90 days :(

Comments

@tildeman
Copy link

The issue occurs when using the NVENC options when exporting the video (in openshot-qt).
Everything reads and writes fine until frame 33 where FFmpeg unexpectedly returns -22 (Invalid argument)
The export works fine on every other option (with CPU or VAAPI)
This probably has to do with av_packet_rescale_ts on line 2270 of FFmpegWriter.cpp, it might be wrong (although I can't easily use a C++ debugger on a Python script that is openshot-qt)

OS: Gentoo Linux x86_64
RAM: 16GB
CPU: Intel i7-8750H (12) @ 4.100GHz
GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630]
GPU: NVIDIA GeForce GTX 1050 Ti Mobile
libopenshot: 0.3.0 (built from upstream using a custom package manager overlay)
nVidia drivers: 525.60.13
FFmpeg: 4.4.3

Here's a log file for reference: libopenshot.log
This issue is probably equivalent to the one on OpenShot/openshot-qt#4086

@jonoomph
Copy link
Member

If possible, can you try running this in GDB:

# From Source
cd openshot-qt
gdb python3
(gdb) run src/launch.py --debug

OR

# From Package / or AppImage
gdb openshot-qt          OR        gdb openshot*.AppImage
(gdb) run --debug

@jonoomph
Copy link
Member

Also, I would be curious to know your export settings (format, video codec, audio codec, bit rates, etc...). Thx

@aliedperezmartinez
Copy link

Hi, I can reproduce it too. This is the relevant log from the terminal:

Encoding Device Nr: 1
[h264_nvenc @ 0x53e5300] [Eval @ 0x7ffc743ca660] Undefined constant or missing '(' in 'zerolatency'
[h264_nvenc @ 0x53e5300] Unable to parse option value "zerolatency"
Hardware decoding device number: 1
Hardware decoding device number: 1
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3055, resource id: 12018999, major code: 40 (TranslateCoords), minor code: 0
[mp4 @ 0x5a54580] pts (0) < dts (16384) in stream 0
[mp4 @ 0x5a54580] pts (512) < dts (16384) in stream 0
[mp4 @ 0x5a54580] pts (1024) < dts (16384) in stream 0
[mp4 @ 0x5a54580] pts (1536) < dts (16384) in stream 0
[mp4 @ 0x5a54580] pts (2048) < dts (16384) in stream 0
[mp4 @ 0x5a54580] pts (2560) < dts (16384) in stream 0
[mp4 @ 0x5a54580] pts (3072) < dts (16384) in stream 0
[mp4 @ 0x5a54580] pts (3584) < dts (16384) in stream 0
INFO export: Error type string: Error while writing raw video frame

This is the setting I can reproduce the error with:
Screenshot_2023-02-25_17-48-42

mkv crashes too

@aliedperezmartinez
Copy link

aliedperezmartinez commented Feb 25, 2023

Openshot version: 3.0.0
libopenshot version: 0.3.0

alied@development:~$ uname -a
Linux development 6.2.1 #1 SMP Sat Feb 25 12:08:49 GMT 2023 x86_64 GNU/Linux
alied@development:~$ cat /etc/debian_version 
bookworm/sid

@stale
Copy link

stale bot commented Jun 18, 2023

Thank you so much for submitting an issue to help improve OpenShot Video Editor. We are sorry about this, but this particular issue has gone unnoticed for quite some time. To help keep the OpenShot GitHub Issue Tracker organized and focused, we must ensure that every issue is correctly labelled and triaged, to get the proper attention.

This issue will be closed, as it meets the following criteria:

  • No activity in the past 90 days
  • No one is assigned to this issue

We'd like to ask you to help us out and determine whether this issue should be reopened.

  • If this issue is reporting a bug, please can you attempt to reproduce on the latest daily build to help us to understand whether the bug still needs our attention.
  • If this issue is proposing a new feature, please can you verify whether the feature proposal is still relevant.

Thanks again for your help!

@stale stale bot added the stale This issue has not had any activity in 90 days :( label Jun 18, 2023
@stale stale bot closed this as completed Aug 12, 2023
@aperture147
Copy link

Hi, I'm also facing the same error with pyopenshot. Please check #956 for more insight.

@Colorjet3
Copy link

Hardware acceleration in general is broken/not well supported. This bug is documented and in the queue to be fixed. No ETA at this time.

@rajeevrk
Copy link

rajeevrk commented Sep 24, 2024

Also seeing the same issue still on the following config :

OS: Fedora Linux 40 (Workstation Edition) x86_64
RAM: 40GB
CPU: Intel i9-11900H (16) @ 2.500GHz
GPU1: Intel® UHD Graphics (TGL GT1)
GPU2: NVIDIA GeForce RTX™ 3060 Laptop GPU
libopenshot: 0.3.0 (built from upstream using a custom package manager overlay)
nVidia drivers: 560.35.03-3
FFmpeg: 6.1.2 built with gcc 14 (GCC)
openshot-qt version: 3.2.1
libopenshot version: 0.3.3
platform: Linux-6.10.8-200.fc40.x86_64-x86_64-with-glibc2.39
python version: 3.12.5
qt5 version: 5.15.14
pyqt5 version: 5.15.10

Relevant Error message from the Openshot output, while trying to render projects via NVENC :

Encoding Device Nr: 0
INFO export: Error type string: Error while writing raw video frame
INFO main_window: Export Video add cancelled

I am able to perform custom debug builds, if needed of both openshot and ffmpeg, so am happy to assist in debugging, under the guidance of any experienced openshot devs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue has not had any activity in 90 days :(
Projects
None yet
Development

No branches or pull requests

6 participants