videolang / video

Source Code for Video language.
https://lang.video
Apache License 2.0
137 stars 14 forks source link

Previewer freezes #46

Closed srfoster closed 6 years ago

srfoster commented 6 years ago

screen shot 2018-06-10 at 10 58 49 am

When I try to run the previewer, it only plays the video preview for a few seconds and then stops. This makes it hard to build up a workflow for myself.

As a workaround, I tried building the video on the command line with raco, but the outputted video won't play.

raco video  test.rkt

This seems to work and creates a file named out.mp4.

But opening this file gives me:

screen shot 2018-06-10 at 11 01 28 am

Note that this is my experience for all video files including the examples in the repo.

I've tried versons 6.9 and 6.12 of Racket. I'm using OSX.

I know this is an early-stage language, so I'm open to using a workaround or hack. Or maybe I'm just missing something obvious. Is there any way I can get a preview and a working final mp4?

LeifAndersen commented 6 years ago

The previewer stopping looks like a bug in video. It sounds like this happens for all video files you've tried, is this correct?

As for failing to run the resulting video. I see you are using quick time. Quick time actually cannot play mp4 files with the default codec Video uses. Fortunately, many other ones do. For example, can you try to play the videos with VLC and report the results of that?

If that doesn't work, can you send me a copy of the code and/or resulting mp4 file, so I can better diagnose what's up?

Either way. Thanks for the reminder that I need to get FFmpeg (which video uses for encoding) to output videos quicktime can play.

And finally, thank you for trying out video. It means a lot to me. :D

srfoster commented 6 years ago

Yes, it freezes for all video files. I also tried installing from both video-testing and video-unstable. Freezing happened in both. If it helps, here's a video demo of me using the previewer and causing various errors, which might shed some light:

https://youtu.be/mYGYInkIKjs

Thanks for the VLC suggestion. That did work. Thanks!

LeifAndersen commented 6 years ago

Mmm...yes, that video does help. A lot actually. Working on a fix for this now.

Thank you again for reporting this.

LeifAndersen commented 6 years ago

Okay, I have found (and pushed) a fix to the bug. It should now be in video-unstable. Basically too many packets of information were getting buffered, which made ffmpeg...err..freeze.

Unfortunately it looks like audio and video are currently desynced, with video playing way faster than audio. I suspect this is a timestamp bug, and I'll see if I can fix that one next.

LeifAndersen commented 6 years ago

And I've now pushed a fix to the AV syncing problem. Let me know if this resolves the problem on your end.

LeifAndersen commented 6 years ago

I've pushed that fix to testing (its in v0.2-rc.1), let me know if this fixes the problem. :)

LeifAndersen commented 6 years ago

Since this bug is fixed and no new problems have been reported, I'm going to close this. Feel free to reopen if it was premature. :)

Thanks again for testing.

srfoster commented 6 years ago

Hi! Sorry, I'm super slow about testing. I did try v0.2-rc.2, and it SEEMS to be still a bit buggy. It might have gotten slightly better -- but I might just be imagining that. The video still doesn't play all the way through in the previewer. And I can't use the seek buttons without it breaking (sometimes crashing DrRacket).

If there's some kind of test you'd like me to do, I'm happy to. I can send you logs or videos or whatever. (And I'll try to be speedier about it next time.)

LeifAndersen commented 6 years ago

Ah, rats, okay. I'll re-open the issue. Thanks for the heads up.

LeifAndersen commented 6 years ago

Okay, I think I have addressed many of these issues. I have disabled some of the player features for now (since they aren't working), but the ones that are enabled (play/pause/stop/seek), should be fine. Can you test it on your system again?

Also, thanks again for the report.

srfoster commented 6 years ago

I might have just done something silly. But after reinstalling and trying to run the 3-clips.rkt example, I get this:

../private/ffmpeg/constants.rkt:36:76: ~optional: attribute bound in defaults but not in pattern in: deprecated

(Maybe I should not be on Racket 7.0?)

LeifAndersen commented 6 years ago

Oh, ya, that actually has nothing to do with what you wrote, but a bug in the unstable branch....I'll fix that momentarily. Do you get hte problem if you use the stable build?

srfoster commented 6 years ago

I get the same error when I'm on the stable branch.

Just to be clear about how I'm testing (maybe I'm doing it wrong):

1) I pulled this repo. 2) I switched to the branch named stable 3) I ran raco pkg install

I get a bunch of installation errors:

../private/ffmpeg/constants.rkt:36:76: ~optional: attribute bound in defaults but not in pattern in: deprecated

And that's same error I get when I try to run a #lang video program.

LeifAndersen commented 6 years ago

Okay. I just want to rule out the possibility that you still have an old copy of video installed somewhere that might be messing it up. So could you run:

raco pkg remove video

And tell me what it reports?

LeifAndersen commented 6 years ago

So, after chatting with you at RacketCon, it seems like the issue is resolved now. Although again, feel free to re-open and/or let me know if that is not true.

Thanks again for coming. <3

LeifAndersen commented 6 years ago

(Oh, and as a side note, I got transparencies in images to work now. So you should (hopefully) be able to use text picts in your videos now. :) )