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
Node api example is broken #9
Comments
I can play output video only in VLC and can't in other players (quicktime, chrome, safari ...) |
I think because it produces mjpeg (for speed) |
Oh wait I was wrong. Default for raw-output is indeed false. So I'm not sure why you're getting this issue. For me the example works fine in QuickLook, Safari, QuickTime etc. Which OS are you on and which ffmpeg version? You are using this example right? import React from 'react';
import { Image, Segment, Video, useVideo } from 'reactive-video';
export default () => {
const { currentFrame, currentTime, durationFrames, durationTime } = useVideo();
return (
<>
{/* This segment lasts for 30 frames. Print out the current frame number */}
<Segment duration={30}>
<div
style={{ width: '100%', height: '100%', backgroundColor: `hsl(${(currentFrame * 10) % 360}deg 78% 37%)`, color: 'white', display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', fontSize: 100 }}
>
Current frame {currentFrame}
</div>
</Segment>
{/* This segment starts from 60 frames. Shows an image with a Ken Burns zoom effect */}
<Segment
start={30}
duration={30}
render={(segment) => (
<Image src="https://static.mifi.no/losslesscut/47320816_571610306620180_5860442193520120371_n.jpg" style={{ width: '100%', transform: `scale(${1 + (segment.currentFrame / segment.durationFrames) * 0.1})` }} />
)}
/>
{/* This segment starts from 60 frames. Starts 100 frames into the source video (seek to) */}
<Segment start={60}>
<Segment start={-100}>
<Video src="https://static.mifi.no/Zv5RvLhCz4M-small.mp4" style={{ width: '100%' }} />
</Segment>
</Segment>
</>
);
}; |
reactive-video/packages/builder/index.js Line 84 in 2da541f
rawOutput is true by default. |
Ah, my bad again. I thought you were using the CLI (which sets false by default). Then I think we can close this. I'll update readme |
reactive-video --duration-frames 90 MyVideo.js
works as expectedBut node api example generate a broken file
https://github.com/mifi/reactive-video#programmatic-api
The text was updated successfully, but these errors were encountered: