video icon indicating copy to clipboard operation
video copied to clipboard

clip doesn't handle file aliases / soft-link files

Open AlexKnauth opened this issue 6 years ago • 0 comments

When I set up alias.mp4 as a file alias or soft-link to another .mp4 file, and click the DrRacket video preview button on this program:

#lang video
(clip "alias.mp4")

I get a DrRacket internal error with the very cryptic message "NOO2".

Either:

  • there should be a note in the documentation that clip doesn't handle file aliases / soft-links (and a better error message)
  • or it should follow the link at some point

It looks like the error is coming from here: https://github.com/videolang/video/blob/master/video/private/ffmpeg/ffmpeg.rkt#L499

  (define-avformat avformat-find-stream-info (_fun _avformat-context-pointer
                                                   _pointer
                                                   -> [r : _int]
                                                   -> (let ()
                                                        (when (< r 0) (error "NOO2"))
                                                        (void))))

Here's the DrRacket internal error:

NOO2
  context...:
   <pkgs>/video-testing/video/private/ffmpeg/ffmpeg.rkt:66:9
   <pkgs>/video-testing/video/private/ffmpeg-pipeline.rkt:282:0: avformat-context->stream-bundle
   <pkgs>/video-testing/video/private/video.rkt:734:0: convert-file165
   <pkgs>/video-testing/video/private/video.rkt:924:4: loop
   <pkgs>/video-testing/video/private/video.rkt:897:0: convert-playlist218
   <pkgs>/video-testing/video/private/video.rkt:56:0: convert6
   <pkgs>/video-testing/video/render.rkt:508:7
   <pkgs>/video-testing/video/player.rkt:103:4: play method in video-player-server%
   <pkgs>/video-testing/video/player.rkt:458:0: preview
   ...

AlexKnauth avatar Jan 16 '19 03:01 AlexKnauth