Closed AntouanK closed 7 years ago
Hello.
Try this sequence instead.
cd movie-monad/
stack clean
stack setup
stack install haskell-gi
haskell-gi -o lib/gi-gdkx11/GdkX11.overrides -O lib/gi-gdkx11 GdkX11-3.0
haskell-gi -o lib/gi-xlib/xlib.overrides -O lib/gi-xlib xlib
stack install --dependencies-only
stack build
stack install
stack exec -- movie-monad
:+1:
Thanks for the help. Unfortunately, I get the same error again. :/
What is the output of stack solver
?
$ stack solver
Using configuration file: stack.yaml
Using cabal packages:
- movie-monad.cabal
- lib/gi-gdkx11/gi-gdkx11.cabal
- lib/gi-xlib/gi-xlib.cabal
Using resolver: lts-9.1
Using compiler: ghc-8.0.2
Asking cabal to calculate a build plan...
Trying with packages from lts-9.1 and 4 external packages as hard constraints...
Attempt failed.
>>>> Cabal errors begin
cabal: Could not resolve dependencies:
next goal: gi-gobject (dependency of movie-monad-0.0.0.0)
rejecting: gi-gobject-2.0.15 (constraint from main config
/tmp/cabal-solver10928/cabal.config requires ==2.0.14)
trying: gi-gobject-2.0.14
next goal: gi-gdkx11 (user goal)
rejecting: gi-gdkx11-0.3.22.20 (conflict: gi-gobject==2.0.14, gi-gdkx11 =>
gi-gobject>=0.2.52.20 && <0.2.53)
Dependency tree exhaustively searched.
<<<< Cabal errors end
Retrying with packages from lts-9.1 and 4 external packages as preferences...
Attempt failed.
>>>> Cabal errors begin
cabal: Could not resolve dependencies:
trying: gi-gdkx11-0.3.22.20 (user goal)
next goal: gi-gio (dependency of gi-gdkx11-0.3.22.20)
rejecting: gi-gio-2.0.14, gi-gio-2.0.13, gi-gio-2.0.12, gi-gio-2.0.11,
gi-gio-2.0.10, gi-gio-2.0.9, gi-gio-2.0.8, gi-gio-2.0.7, gi-gio-2.0.6,
gi-gio-2.0.5, gi-gio-2.0.4, gi-gio-2.0.3, gi-gio-2.0.2, gi-gio-2.0.1,
gi-gio-0.2.46.15, gi-gio-0.2.46.14, gi-gio-0.2.46.13, gi-gio-0.2.46.12,
gi-gio-0.2.46.10, gi-gio-0.2.44.12, gi-gio-0.2.44.11, gi-gio-0.2.44.10,
gi-gio-0.2.44.9, gi-gio-0.2.44.8 (conflict: gi-gdkx11 => gi-gio>=0.2.52.20 &&
<0.2.53)
Dependency tree exhaustively searched.
<<<< Cabal errors end
*** Failed to arrive at a workable build plan.
Solver could not resolve package dependencies.
You can try the following:
- Update external packages with 'stack update' and try again.
- Tweak stack.yaml and try again
- Remove any unnecessary packages.
- Add any missing remote packages.
- Add extra dependencies to guide solver.
- Adjust resolver.
Here are the contents of my three cabal files.
movie-monad.cabal
name: movie-monad
version: 0.0.0.0
synopsis: Plays videos using GStreamer and GTK+.
description: Desktop video player that uses GStreamer and GTK+.
homepage: https://github.com/lettier/movie-monad
license: BSD3
license-file: LICENSE
author: Lettier
maintainer: Lettier
copyright: 2017 David Lettier
category: Multimedia
, Multimedia Player
, Video
build-type: Simple
cabal-version: >=1.10
extra-source-files: README.md
, LICENSE
, ./src/dev/Paths_movie_monad.hs
, ./src/data/gui.glade
data-files: data/gui.glade
data-dir: ./src/
source-repository head
type: git
location: https://github.com/lettier/gifcurry.git
executable movie-monad
main-is: Main.hs
default-language: Haskell2010
build-depends: base >= 4.7 && < 5
, text == 1.2.*
, process == 1.4.*
, MissingH == 1.4.*
, haskell-gi-base == 0.20.*
, gi-gobject == 2.0.*
, gi-gst == 1.0.*
, gi-gtk == 3.0.*
, gi-glib == 2.0.*
, gi-xlib == 0.1.6.*
, gi-gstvideo == 1.0.*
, gi-gdkx11 == 0.3.*
ghc-options: -threaded -with-rtsopts=-N -Wall
other-modules: Paths_movie_monad
hs-source-dirs: ./src/
gi-gdkx11.cabal
-- Autogenerated, do not edit.
name: gi-gdkx11
version: 0.3.22.20
synopsis: GdkX11 bindings
description: Bindings for GdkX11, autogenerated by haskell-gi.
homepage: https://github.com/haskell-gi/haskell-gi
license: LGPL-2.1
license-file: LICENSE
author: Will Thompson, Iñaki García Etxebarria and Jonas Platte
maintainer: Iñaki García Etxebarria (garetxe@gmail.com)
category: Bindings
build-type: Simple
cabal-version: >=1.10
library
default-language: Haskell2010
default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts
other-extensions: PatternSynonyms, ViewPatterns
ghc-options: -fno-warn-unused-imports -fno-warn-warnings-deprecations
exposed-modules: GI.GdkX11
GI.GdkX11.Functions
GI.GdkX11.Objects
GI.GdkX11.Objects.X11AppLaunchContext
GI.GdkX11.Objects.X11Cursor
GI.GdkX11.Objects.X11DeviceCore
GI.GdkX11.Objects.X11DeviceManagerCore
GI.GdkX11.Objects.X11DeviceManagerXI2
GI.GdkX11.Objects.X11DeviceXI2
GI.GdkX11.Objects.X11Display
GI.GdkX11.Objects.X11DisplayManager
GI.GdkX11.Objects.X11DragContext
GI.GdkX11.Objects.X11Keymap
GI.GdkX11.Objects.X11Screen
GI.GdkX11.Objects.X11Visual
GI.GdkX11.Objects.X11Window
pkgconfig-depends: gdk-x11-3.0 >= 3.22
build-depends:
haskell-gi-base >= 0.20 && < 1,
gi-gobject == 2.0.*,
gi-gdk == 3.0.*,
gi-gio == 2.0.*,
gi-xlib >= 0.1.6.20 && < 0.1.7,
bytestring >= 0.10 && < 1,
containers >= 0.5 && < 1,
text >= 1.0 && < 2,
transformers >= 0.4 && < 1,
base >= 4.7 && <5
gi-xlib.cabal
-- Autogenerated, do not edit.
name: gi-xlib
version: 0.1.6.20
synopsis: xlib bindings
description: Bindings for xlib, autogenerated by haskell-gi.
homepage: https://github.com/haskell-gi/haskell-gi
license: LGPL-2.1
license-file: LICENSE
author: Will Thompson, Iñaki García Etxebarria and Jonas Platte
maintainer: Iñaki García Etxebarria (garetxe@gmail.com)
category: Bindings
build-type: Simple
cabal-version: >=1.10
library
default-language: Haskell2010
default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts
other-extensions: PatternSynonyms, ViewPatterns
ghc-options: -fno-warn-unused-imports -fno-warn-warnings-deprecations
exposed-modules: GI.Xlib
GI.Xlib.Functions
GI.Xlib.Structs
GI.Xlib.Structs.Display
GI.Xlib.Structs.Screen
GI.Xlib.Structs.Visual
GI.Xlib.Structs.XConfigureEvent
GI.Xlib.Structs.XFontStruct
GI.Xlib.Structs.XImage
GI.Xlib.Structs.XTrapezoid
GI.Xlib.Structs.XVisualInfo
GI.Xlib.Structs.XWindowAttributes
GI.Xlib.Unions
GI.Xlib.Unions.XEvent
pkgconfig-depends: x11 >= 1.6
build-depends:
haskell-gi-base >= 0.20 && < 1,
bytestring >= 0.10 && < 1,
containers >= 0.5 && < 1,
text >= 1.0 && < 2,
transformers >= 0.4 && < 1,
base >= 4.7 && <5
Do these match up with yours?
I just cloned the repo, installed "haskell-gi" and run the commands from the tutorial. I didn't mess with any cabal file. But I'll check to see.
I think only gi-gdkx11.cabal
is slightly different
$ diff gi-gdk.cabal.1 ./lib/gi-gdkx11/gi-gdkx11.cabal
39,41c39,41
< gi-gobject == 2.0.*,
< gi-gdk == 3.0.*,
< gi-gio == 2.0.*,
---
> gi-gobject >= 0.2.52.20 && < 0.2.53,
> gi-gdk >= 0.3.22.20 && < 0.3.23,
> gi-gio >= 0.2.52.20 && < 0.2.53,
haskell-gi must have overwritten my cabal file.
Try building the project with my gi-gdkx11.cabal
.
Works perfect, thanks. ( I just had to install exifTool as well )
One thing I instantly noticed, in VLC seeking index is terrible, takes 2-3 secs to move to a different segment of the video, but with movie-monad it's instant!! It's great. ( btw, can I switch to full-screen? and change subtitles? )
Thanks for your work!
Thank you @AntouanK.
No subtitle feature as of yet.
No full-screen yet but for now I maximize the window and set the width setting to match the width of my screen.
:+1:
Ok, hopefully you'll get those in as well :) I'm a Haskell beginner so unfortunately I cannot contribute to this. Thank you though.
Hello @AntouanK. The master branch now contains fullscreen mode. The fullscreen button will show up alongside the width selector once you choose a video file.
Also, if you like, you can install Movie Monad via Cabal now.
cabal update
cabal install movie-monad
:+1:
@lettier Great! The seeking bar at the bottom is not hidden though and it's over part of the video. Is that normal?
Also, I tried a UHD video ( it says 2160p.BluRay.x265.10bit.HDR
in the title ) and it's playing frame by frame.
Could it be some decoder missing on my side?
Hello @AntouanK.
I will hide the bottom controls if in fullscreen mode and the mouse is still. Testing that out right now.
Not sure about the UHD video. Does it occur in other media players?
@lettier Yes, the UHD is also too slow with other players. So ignore that.
Just wondering, is it hard to add support for opening streaming videos, like an .m3u file or the URL directly?
Hello @AntouanK.
Should not be too hard. I will look into it. :+1:
Hello @AntouanK.
I have added support for URL (HTTP/HTTPS) video files. It is in master. :+1:
@lettier Many thanks. I will test it as soon as I can.
I'm stuck on to this step
Tried to do
stack install gi-gdk gi-gio gi-gobject
, but no difference. Any ideas?