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 quality distorted #81

Open
bilalkhan-tech opened this issue Dec 4, 2024 · 10 comments
Open

video quality distorted #81

bilalkhan-tech opened this issue Dec 4, 2024 · 10 comments

Comments

@bilalkhan-tech
Copy link

after trim the video the quality of that video is distorted and seek player does not display when video is playing and not auto reset when playing time end for android and ios both

@maitrungduc1410
Copy link
Owner

hi

  • when it reaches end, it'll just keep in that position, if you hit play again, it'll reset. This is expected
  • video is distorted: I simply trim video without re-encode it, which means it should not affect video quality
  • seek player does not display when video is playing: please share you screenshot + your code + your input video (if possible)

@bilalkhan-tech
Copy link
Author

bilalkhan-tech commented Dec 4, 2024

@maitrungduc1410 thanks for answer me
when i trim the video the video quailty is also distorted and does not maintain the aspect ratio

const path =
Platform.OS === 'android'
? _res[0]?.path.replace('file://', '')
: _res[0]?.path;
const videoDurationInSeconds = _res[0]?.duration / 1000; // Convert milliseconds to seconds

if (videoDurationInSeconds > 30) {
  isValidFile(path || '').then(res => {
    if (res?.isValid) {
      showEditor(path, {
        maxDuration: 60,
        minDuration: 1,
        autoplay: true,
        saveButtonText: 'Crop',
        enableCancelDialog: true,
        cancelDialogCancelText: 'Cancel',
        cancelDialogConfirmText: 'Ok',
        enableSaveDialog: false,
        trimmingText: 'Trimming Video...',
        closeWhenFinish: true, // Optional
        enableCancelTrimming: false, // Optional
      });
    }
  });

@maitrungduc1410
Copy link
Owner

please give your screen recording

@bilalkhan-tech
Copy link
Author

@maitrungduc1410 plz check my code which i provide in above comment

@bilalkhan-tech
Copy link
Author

bilalkhan-tech commented Dec 4, 2024

@maitrungduc1410 here is the recordings to show u both results first one is with video trim and other one is without trim video

media_20241203_201210_4921613072312259009.1.mp4
media_20241203_161028_7995973062731389054.mp4

@maitrungduc1410 waiting for your feedback

@bilalkhan-tech
Copy link
Author

bilalkhan-tech commented Dec 5, 2024

@maitrungduc1410 after trim video and upload to the server it show network error but when i simply upload the video without trim it successfully upload plz check this issue as well thanks

@maitrungduc1410
Copy link
Owner

maitrungduc1410 commented Dec 7, 2024

does not maintain the aspect ratio

this is really impossible, my lib only trim the video without re-encoding your video.

are you sure you're not using any other lib to manipulate the video? (which may conflict with my lib)

you can verify this by creating a new sample app, install only my lib, copy my sample code in README and try again

expectation is: aspect ratio, video quality,... everything must be the same after trimming, only start+end time changed

@maitrungduc1410
Copy link
Owner

after trim video and upload to the server it show network error but when i simply upload the video without trim it successfully upload plz check this issue as well thanks

This lib is about local trimming, upload to server is another story. They're not related to each other

I think there's some misunderstanding here.

Btw, if there's an error, just log it and see what it says, everything has a reason

@bilalkhan-tech
Copy link
Author

bilalkhan-tech commented Dec 7, 2024 via email

@bilalkhan-tech
Copy link
Author

bilalkhan-tech commented Dec 7, 2024 via email

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

No branches or pull requests

2 participants