question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Video is not resizing

See original GitHub issue

Hi! I am having troubles with video compression

"react-native-compressor": "1.2.0"
"react-native": "0.66.1"

Video.compress(file.path, {
        // compressionMethod: 'manual',
        //minimumFileSizeForCompress: 10,
        maxSize: 100,
      })
        .then(res => {...})
        .catch(console.log);

original file original file is 42mb 1080 × 1920 30 sec compressed always 3.2 mb 360 × 568

i need to do something to make video 600x1000 i have tried all params from doc but nothing changes( mb i am doing something wrong and i tried different video

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
unoegohhcommented, Dec 21, 2021

Hmm it is strange cause if i use

import {Video as VideoCompressor} from 'react-native-compressor';

VideoCompressor.compress(file.path, {
        compressionMethod: 'auto',
        minimumFileSizeForCompress: 5,
        maxSize: 1000,
      })
        .then(res => {
          console.log('video', res);
        })
        .catch(console.log);

and then i get

video1 file:///Users/unoegohh/Library/Developer/CoreSimulator/Devices/C856B11B-463E-48F6-9396-5F4E0838CDC2/data/Containers/Data/Application/60489947-00AB-49D1-A5F0-E72164EDD6D5/tmp/react-native-image-crop-picker/F6B9FBB8-4C2A-4882-ABBC-A3E9BFE8A0C7.mp4

and it is still get 320x564 video

file

UPD - i got my error) i was using ImagePicker.openPicker before compression and it returned already compressed video )) ty! as always i need to find error on my side first then write an issue)

0reactions
numandev1commented, Jan 28, 2022

I think it is already fixed. feel free to reopen if you see this problem again. thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resizing <video> element to parent div - css - Stack Overflow
Using javascript to get the parent divs height and width, then setting it for the video: No effect, 4:3 ratio remains, no size...
Read more >
How do you resize a video to send through text - Google Support
You all don't need to downsize at all: just share the video from Google Photos into a link and paste that link into...
Read more >
Here's the skinny on why and how to resize videos - Vimeo
Go to ezgif.com · Navigate to the “Resize” tab · Upload your video clip · Select your desired height and width · Click...
Read more >
Free Video Resizer: Resize Your Videos Online | Adobe Express
Resize your video for free. Easily resize your video in seconds. Select from preset sizes to change the dimensions of your video for...
Read more >
Fluid Width Video | CSS-Tricks
<iframe> Video (YouTube, Vimeo, etc.)​​ Forcing the width to 100% is effective, but when we set height: auto , we end up with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found