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

It stops working after one successful file cast #8

Closed
logix2 opened this Issue Feb 6, 2019 · 14 comments

Comments

Projects
None yet
2 participants
@logix2
Copy link

logix2 commented Feb 6, 2019

Using either the latest Cast to TV git or v6 release (installed from source) on Ubuntu 18.10 with Gnome Shell 3.30.1, it only works casting one time to my Chromecast. The second time (and third, etc.) I try to cast something, I get an error when I click on Video, Music or Pictures from the Cast Media extension menu:

Execution of "gjs" failed: Expected type filename for Array element but got type 'undefined'.

Also, casting doesn't work the first time I try to cast a file after restarting Gnome Shell. A second attempt is needed to actually cast the file to my Chromecast. After successfully casting, the error mentioned above occurs.

@Rafostar

This comment has been minimized.

Copy link
Owner

Rafostar commented Feb 6, 2019

Please do not use git master, it has new half done features and is unstable. Have you tried completely removing extension and reinstalling v6? Please try disabling extension, removing this extension folder and reinstalling v6 and node modules.

sudo killall node
rm -rf ~/.local/share/gnome-shell/extensions/cast-to-tv@rafostar.github.com
cd /DOWNLOAD-OF-V6-FOLDER
make install
cd ~/.local/share/gnome-shell/extensions/cast-to-tv@rafostar.github.com
npm install

I have been testing v6 many times on Fedora 27 (Gnome 3.26) and everything was working fine on my side. Let me know if problem still occurs after complete reinstall.

@logix2

This comment has been minimized.

Copy link
Author

logix2 commented Feb 6, 2019

I cleaned everything, reinstalled v6, and it's the exact same behavior. I forgot to mention: after I cast successfully, I stop the casting from the Cast to TV top bar controls (I didn't try letting it finish casting on its own), then when I try to cast something else, the error I mentioned occurs.

@Rafostar

This comment has been minimized.

Copy link
Owner

Rafostar commented Feb 6, 2019

Well, I tried it right now and was able to cast few files in row (stop button does not change anything).
I will try running Ubuntu 18.10 Live ISO, and check if I can reproduce your problem.

@Rafostar

This comment has been minimized.

Copy link
Owner

Rafostar commented Feb 6, 2019

It turned out to be Gnome 3.30 specific bug. Gnome 3.30 treats read data as ByteArray and when I was cleaning the code recently, I put temp data related functions in separate JavaScript file and forgot to add ByteArray declaration. I did not had this problem because I was using Gnome 3.26. Anyway, please try downloading latest git master to test if problem is solved.

@logix2

This comment has been minimized.

Copy link
Author

logix2 commented Feb 6, 2019

That bug was fixed. But it still fails to cast videos many times, with no error being displayed. Any idea how to debug it?

@logix2

This comment has been minimized.

Copy link
Author

logix2 commented Feb 6, 2019

A bit of extra info. I was trying to cast .mkv and .ogv video files. It can cast mkv files just fine, but it fails with .ogv files, and sometimes after I try to play an .ogv (and fails), it fails with .mkv too for some reason.

@Rafostar

This comment has been minimized.

Copy link
Owner

Rafostar commented Feb 6, 2019

That is weird. Maybe some old temp data is still left and in use. After installing latest master did you rebooted pc? Try rebooting and casting few mp4 or mkv (h264 encoded) files. After that tell me:
Can you select and cast one file after another without issues (no more "gjs" error)?
Does gnome remote appear and has video progress slider in it?

And please send me the output of mediainfo your_video.ogv (from .ogv video that does not play).

@Rafostar

This comment has been minimized.

Copy link
Owner

Rafostar commented Feb 7, 2019

I think most of the problems related to Ubuntu with Gnome 3.30 are now fixed. I tried installing it and testing on live iso and did not run into any problems. You probably can not play .ogv files because they are not supported by Chromecast. I added notifications support to new version so Chromecast related errors should now appear on top of shell. This should make it easier to find out why Chromecast did not want to play and remind users to try again with enabled video transcoding for that file (check mark at bottom left during file selection).

Because previous file picking "gjs" error was indeed my mistake in code and now is fixed I released current code as v7. It should be better at least from v6 that on 3.30 did not work at all.

@logix2

This comment has been minimized.

Copy link
Author

logix2 commented Feb 8, 2019

There are no more gjs errors. However, even with the "Transcode Video" option (which I missed, thanks for the explanation) I'm not able to cast an ogv file. For testing I used this: https://archive.org/details/Route_66_-_an_American_badDream (there's an OGV file for download, among other formats).

@logix2

This comment has been minimized.

Copy link
Author

logix2 commented Feb 8, 2019

By the way, with the latest v7, when I enable transcoding and I try to cast an OGV file, I get this error in a notification: "Error: load failed".

@Rafostar

This comment has been minimized.

Copy link
Owner

Rafostar commented Feb 8, 2019

This file works fine for me with video transcoding (on both Fedora and Ubuntu), so problem might be elsewhere. Check your ffmpeg and ffprobe paths in extension settings. By default they should be "/usr/bin/ffmpeg" and "/usr/bin/ffprobe" (written with half transparent placeholder text). Please send me the complete output of ffmpeg -version and if you changed those paths to some custom ffmpeg build please send me the output of that version instead.

@logix2

This comment has been minimized.

Copy link
Author

logix2 commented Feb 8, 2019

The paths are 100% correct, I even retyped the path, copied it from Cast to TV and ran a "ls /usr/bin/ffmpeg" to make sure there are no typos or anything.

I'm using the standard ffmpeg from the Ubuntu 18.10 repositories:

$ ffmpeg -version
ffmpeg version 4.0.2-2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8 (Ubuntu 8.2.0-7ubuntu1)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil      56. 14.100 / 56. 14.100
libavcodec     58. 18.100 / 58. 18.100
libavformat    58. 12.100 / 58. 12.100
libavdevice    58.  3.100 / 58.  3.100
libavfilter     7. 16.100 /  7. 16.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  1.100 /  5.  1.100
libswresample   3.  1.100 /  3.  1.100
libpostproc    55.  1.100 / 55.  1.100
$ apt policy ffmpeg
ffmpeg:
  Installed: 7:4.0.2-2
  Candidate: 7:4.0.2-2
  Version table:
 *** 7:4.0.2-2 500
        500 http://archive.ubuntu.com/ubuntu cosmic/universe amd64 Packages
        100 /var/lib/dpkg/status
@Rafostar

This comment has been minimized.

Copy link
Owner

Rafostar commented Feb 8, 2019

Your version seems to be correct (it has "libtheora" and "libvorbis" enabled).
Did you enable hardware acceleration in extension settings? Try disabling it.

And could you open this ogv problem as separate github issue? Because casting one file after another is fixed, I would like to close this.

@logix2

This comment has been minimized.

Copy link
Author

logix2 commented Feb 8, 2019

I tried it with VAAPI on/off, but nothing changed.

I opened a new bug: #10

@logix2 logix2 closed this Feb 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment