unused / airstream

A command line tool for streaming to airplay-devices
628 stars 30 forks source link

undefined method `shutdown' when trying to stream a video #40

Open Richard87 opened 7 years ago

Richard87 commented 7 years ago

Hi,

I was trying to stream a video and got this exception: (It was originally a mkv webm video convertet to mp4 with ffmpeg -i input.mkv -o out.mp4) (PS. the q^C^C was me trying to stop the console app when the apple tv went out of "loading-video-mode" to the home screen and I assumed it had stopped working)

airstream out.mp4 -o 192.168.1.54
loading can take a few seconds...
q^C^C/usr/local/share/gems/gems/rack-1.5.5/lib/rack/handler/webrick.rb:25:in `shutdown': undefined method `shutdown' for nil:NilClass (NoMethodError)
    from /usr/local/share/gems/gems/rack-1.5.5/lib/rack/server.rb:258:in `block in start'
    from /usr/local/share/gems/gems/airstream-0.4.10/lib/airstream/device.rb:24:in `sleep'
    from /usr/local/share/gems/gems/airstream-0.4.10/lib/airstream/device.rb:24:in `block_while_loading'
    from /usr/local/share/gems/gems/airstream-0.4.10/lib/airstream/device.rb:20:in `file='
    from /usr/local/share/gems/gems/airstream-0.4.10/lib/airstream/player.rb:25:in `current_file='
    from /usr/local/share/gems/gems/airstream-0.4.10/lib/airstream/player.rb:21:in `play'
    from /usr/local/share/gems/gems/airstream-0.4.10/lib/airstream/player.rb:9:in `initialize'
    from /usr/local/share/gems/gems/airstream-0.4.10/bin/airstream:93:in `new'
    from /usr/local/share/gems/gems/airstream-0.4.10/bin/airstream:93:in `<top (required)>'
    from /usr/local/bin/airstream:22:in `load'
    from /usr/local/bin/airstream:22:in `<main>'

When trying to play this movie:

ffmpeg -i out.mp4                                                                   
ffmpeg version 3.1.6 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 6.2.1 (GCC) 20160916 (Red Hat 6.2.1-2)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --extra-cflags=-I/usr/include/nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
libavutil      55. 28.100 / 55. 28.100
libavcodec     57. 48.101 / 57. 48.101
libavformat    57. 41.100 / 57. 41.100
libavdevice    57.  0.101 / 57.  0.101
libavfilter     6. 47.100 /  6. 47.100
libavresample   3.  0.  0 /  3.  0.  0
libswscale      4.  1.100 /  4.  1.100
libswresample   2.  1.100 /  2.  1.100
libpostproc    54.  0.100 / 54.  0.100
[h264 @ 0x56495e5776c0] Increasing reorder buffer to 1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.41.100
Duration: 00:43:01.06, start: 0.000000, bitrate: 4434 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 4044 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 32k tbc (default)
    Metadata:
    handler_name    : VideoHandler
    Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
    handler_name    : SoundHandler
    Side data:
    audio service type: main
At least one output file must be specified
unused commented 7 years ago

Ahoi - did the apply tv show the loading animation or an error?

Richard87 commented 7 years ago

Hi, it showed the loading animation...

Den lør. 14. jan. 2017, 12:43 skrev Christoph Lipautz < notifications@github.com>:

Ahoi - did the apply tv show the loading animation or an error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/unused/airstream/issues/40#issuecomment-272619001, or mute the thread https://github.com/notifications/unsubscribe-auth/AFe70-UIAuYsPw2MgW-TBUZxCyIUayb9ks5rSLTGgaJpZM4LYzQQ .

unused commented 7 years ago

Thx, they file may probably be to large and take longer to load - can you send me an approx. file size of the mp4 so I can try to reproduce it?

Richard87 commented 7 years ago

Hehe, it's at my parents house out of town, but I'll see if I can recreate the issue when I get back in a few weeks :-)

Den søn. 15. jan. 2017, 14:22 skrev Christoph Lipautz < notifications@github.com>:

Thx, they file may probably be to large and take longer to load - can you send me an approx. file size of the mp4 so I can try to reproduce it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/unused/airstream/issues/40#issuecomment-272694870, or mute the thread https://github.com/notifications/unsubscribe-auth/AFe700mWHExrluH-NAlGPtPcDZnU1jzUks5rSh2IgaJpZM4LYzQQ .

gfleck commented 7 years ago

I had the same problem with a 1.8gb file, so I split the file into smaller pieces (100mb) and did works fine to me.

Use the split command.