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

Video thumbnails have streaks or rapid zoom jitter #2150

Closed
JasonLamv-t opened this issue Feb 29, 2024 · 10 comments · Fixed by #2167 or #2285
Closed

Video thumbnails have streaks or rapid zoom jitter #2150

JasonLamv-t opened this issue Feb 29, 2024 · 10 comments · Fixed by #2167 or #2285
Assignees
Labels
core kind/bug Something isn't working

Comments

@JasonLamv-t
Copy link

Describe the bug

image
Kapture 2024-02-29 at 16 46 27

As the title and the pic.

Reproduction

  1. Open the software
  2. Click the Video category shown on the top of the main page

Expected behavior

No response

Platform and versions

pnpm --version && cargo --version && rustc --version
8.15.4
cargo 1.76.0 (c84b36747 2024-01-18)
rustc 1.76.0 (07dca489a 2024-02-04)

Stack trace

No response

Additional context

No response

@JasonLamv-t JasonLamv-t added kind/bug Something isn't working status/needs-triage labels Feb 29, 2024
@niikeec
Copy link
Contributor

niikeec commented Mar 1, 2024

I can't reproduce the issue. Are you on the latest version?

@JasonLamv-t
Copy link
Author

JasonLamv-t commented Mar 1, 2024

I can't reproduce the issue. Are you on the latest version?

@niikeec , Yes, I'm on the latest version.

image

@niikeec
Copy link
Contributor

niikeec commented Mar 5, 2024

Thank you, was able to reproduce it.

@JasonLamv-t
Copy link
Author

@niikeec Updated to 0.2.5 just now. The resize problem was fixed. But still get some black bars mask on the thumb.
image

@brxken128
Copy link
Contributor

What codec are these videos encoded with?

Also, would it be possible to get a sample from your Spacedrive data directory so we can determine if this is a frontend issue or a thumbnailer one? I'd need to know which OS you're running though :)

@brxken128 brxken128 reopened this Mar 12, 2024
@JasonLamv-t
Copy link
Author

JasonLamv-t commented Mar 12, 2024

@brxken128, Thank you for your reply.
I notice that the encoding of most problematic videos is MP4, and most of these videos were shot a few years ago so I can't make sure that the problem was caused by the video itself. I also noticed that most of their size are very small and seem likely shot in WeChat, a social app in mainland China, which will zip the video.
I already upload two videos (check here). I believe these videos were shot within a similar period, but I can't confirm the source. And I'm using macOS sonoma14.3.1 (23D60), FYI.

@brxken128
Copy link
Contributor

brxken128 commented Mar 12, 2024

@JasonLamv-t The broken video appears to be using H264, which is the most common encoding type that our app deals with - I'm unsure as to why it's broken.

I'll load these videos into a local build of Spacedrive and see the results. Edit: The video is also broken for me, this is really odd.

In the meantime, please could you try right clicking in the explorer, hitting "more actions" and then "regen thumbnails" to see if regenerating them fixes the issue? Thank you!

@JasonLamv-t
Copy link
Author

@brxken128 Sorry about that I can't find the "more actions" option that you mentioned above. Can you give me a screenshot for a demo?

@ghost
Copy link

ghost commented Apr 7, 2024

I noticed that this problem is occuring only on vertical videos, horizontal is fine. Those two videos are recorded by my mobile phone, they're H264 and I assume they're encoded with the same encode settings. Spacedrive version v0.2.11, Windows.

resim

@HeavenVolkoff
Copy link
Member

This is probably some minor issue in the movie_decoder logic, I am currently making changes to this part of the code base, will try taking a look for why this is not working properly

@HeavenVolkoff HeavenVolkoff self-assigned this Apr 10, 2024
HeavenVolkoff added a commit that referenced this issue Apr 30, 2024
HeavenVolkoff added a commit that referenced this issue Apr 30, 2024
@HeavenVolkoff HeavenVolkoff linked a pull request Apr 30, 2024 that will close this issue
HeavenVolkoff added a commit that referenced this issue Apr 30, 2024
HeavenVolkoff added a commit that referenced this issue May 1, 2024
HeavenVolkoff added a commit that referenced this issue May 2, 2024
github-merge-queue bot pushed a commit that referenced this issue May 9, 2024
* initial ffprobe commit

* Working slim down version ffprobe

* Auto format ffprobe and deps source

* Remove show_pixel_formats logic
- Fix do_bitexact incorrect check in main after last changes
- Fix some clangd warning

* Remove show_* and print_format options and their respective logic

* Rework ffprobe into simple_ffprobe
- Simplify ffprobe logic into a simple program that gather and print a media file metadata

* Reduce the amount of ffmpeg log messages while generating thumbnails

* Fix completly wrong comments

* mend

* Start modeling ffmpeg extracted metadata on schema
 - Start porting ffprobe code to rust
 - Rename some references to media_data to exif_data

* Finish modeling media info data
 - Add MediaProgram, MediaStream, MediaCodec, MediaVideoProps, MediaAudioProps, MediaSubtitleProps to Schema
 - Fix simple_ffproble to use its custom print_codec, instead of ffmpeg's impl

* Add relation between MediaInfo and FilePath
 - Remove shared properties from MediaInfo and related structs
 - Implement Iterator for FFmpegDict

* Fix and update schema

* Data models and start populating MediaInfo in rust

* Finish populating media info, chapters and program

* Improve FFmpegFormatContext data raw pointer access
 - Implement stream data gathering

* Impl FFmpegCodecContext, retrieve codec information
 - Improve some unsafe pointer uses
 - Impl from FFmpegFormatContext to MediaInfo conversion

* Fix FFmpegDict Drop

* Fix some crago warnings

* Impl retrieval of video props
 - Fix C char* to Rust String convertion

* Impl retrieval of audio and subtitle props
 - Fill props for MediaCodec

* Remove simple_ffprobe now that the Rust impl is done

* Fix schema to match actually retrieved media info
 - Fix import some FFmpeg constants instead of directly using values

* Rework movie_decoder
 - Re-implement create_scale_string and add support anamorphic video
 - Improve C pointer access for FFmpegFormatContext and FFmpegCodecContext
 - Use newer FFmpeg abstractions in movie_decoder

* Fix incorrect props when initializing MovieDecoder

* Remove unecessary lifetimes

* Added more native wrappers for some FFmpeg native objects used in movie_decoder

* Remove FFmpegPacket
 - Some more improvements to movie_decoder

* WIP

* Some small fixes

* More fixes
Rename movie_decoder to frame_decoder
Remove more references to film_strips

* fmt

* Fix duplicate migration for job error changes

* fix rebase

* Solving segfaults, fuck C lang

Co-authored-by: Vítor Vasconcellos <[email protected]>

* Update rust to version 1.77
 - Pin rust version with rust-toolchain.toml
 - Change from dtolnay/rust-toolchain to IronCoreLabs/rust-toolchain for rust-toolchain support
 - Remove unused function and imports
 - Replace most CString uses with new c literal string

* More segfault solving and other minor fixes

Co-authored-by: Vítor Vasconcellos <[email protected]>

* Fix ffmpeg rotation filter breaking portrait video thumbnails #2150
 - Plus some other misc fixes

* Auto format

* Retrieve video/audio metadata on frontend

* Auto format

* First draft on ffmpeg data save on db

Co-authored-by: Vítor Vasconcellos <[email protected]>

* Fix some incorrect changes to prisma schema

* Some fixes for the FFmpegData schema
 - Expand logic to save FFmpegData to db

* A ton of things

Co-authored-by: Vítor Vasconcellos <[email protected]>

* Integrating ffmpeg media data in jobs and API

* Rspc can't BigInt

* 🙄

* Add initial ffmpeg metadata entries to Inspector
 - Fix ephemeral metadata api to match the files metadata api call

* Fix Inspector not showing ffmpeg metadata

* Add bitrate, start time and chapters video metadata to Inspector
- Fix backend BigInt conversion incorrectly using i32 instead of u32
- Change FFmpegFormatContext/FFmpegMetaData bit_rate to i64
- Rename byteSize to humanizeSize
- Expand humanizeSize logic to allow handling bits and Binary units
- Move capitalize to @sd/client utils

* Solving some issues

* Fix ffmpeg probe getting incorrect stream id and breaking database unique constraint
 - Fix humanizeSize breaking when receiving floating numbers
 - Fix incorrect equality in StatCard
 - Fix unhandled error in Dialog when trying to remove an unknown dialog

* fmt

* small improvements
 - Remove some unecessary recursion_limit directive
 - Remove unused app_image releated functions
 - Fix metadata query enabled flag

* Add migration for ffmpeg media data

* Fix cypress test

* Requested changes

* Implement feedback
 - Update locale keys for all languages
 - Add pnpm command to update all language keys

* Fix thumb reactivity in non indexed locations

---------

Co-authored-by: Ericson Soares <[email protected]>
Co-authored-by: Vítor Vasconcellos <[email protected]>
@iLynxcat iLynxcat removed the Bug label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core kind/bug Something isn't working
Projects
None yet
5 participants