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

Black video sequences in export when using proxy #1395

Open
lmenzel opened this issue Jan 2, 2023 · 4 comments
Open

Black video sequences in export when using proxy #1395

lmenzel opened this issue Jan 2, 2023 · 4 comments

Comments

@lmenzel
Copy link

lmenzel commented Jan 2, 2023

When inserting video files in the playlist, it randomly does not recognize the video index.
The save file contains for these files <property name="video_index">-1</property>
The proxy files were created correctly, so editing the videos was not a problem, but when exporting the video, the effected sequences were black (Audio was there). When I turn off proxy, the files are also blank in the preview and settings show Track: None. Videos in my case are 4K mp4 HEVC 30fps videos recorded with a Pixel 6 pro phone.
When I deleted the project folder, created a new project and pulled in the files again, some other(!) files (but not all!) were effected, so it seems to be a random issue. Maybe it happens only when inserting many files at once?
Replacing the video_index -1 with 2 in the save file solves the issue, but this workaround will probably not work for all kind of video files?

Shotcut version 22.12.21, Windows store version, Windows 11, Ryzen 5950X, 64GB RAM, RTX 4090

@ddennedy
Copy link
Member

ddennedy commented Jan 2, 2023

I think this is a known problem when the first stream in the file is not audio or video. In that case, proxy cannot be used. Please provide ffprobe output for this kind of video or a sample file.

@ddennedy ddennedy changed the title Black video sequences in export Black video sequences in export when using proxy Jan 2, 2023
@lmenzel
Copy link
Author

lmenzel commented Jan 2, 2023

Thank you very much for looking into this.
I tried it again, and added one file twice to a new, proxy enabled project, and one copy was rendered fine and the other was black.
If this is a problem of the source file, shouldn't it always work or always fail for one file?

By the way, this is the ffprobe output for one of the files that only some times work:
ffprobe.txt

@ddennedy
Copy link
Member

ddennedy commented Jan 2, 2023

From the ffprobe output

Unsupported codec with id 0 for input stream 0

This is the known bug. It causes the audio_index and video_index in the proxy to mismatch in the source because upon transcoding to make the proxy, ffmpeg drops the first unsupported stream. I do not know why it is being random for you, but basically files like this are not currently supported in proxy mode due to this problem. In order to fix it, we need to code up a new relative stream index system. Since these smartphone camera videos might also be variable framerate, which is also not supported I suggest you convert them. You can use Properties > Convert or something else like Handbrake. Then, you can use proxy mode reliably.

I was not able to reproduce this issue with my video files. I am not sure I have a sample file with this problematic first stream if you can provide one.

@lmenzel
Copy link
Author

lmenzel commented Jan 8, 2023

Here is such a file.

PXL_20230108_142208704.TS.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants