Giter Site home page Giter Site logo

[Req] Port to Linux/Windows about wallop HOT 22 CLOSED

maddox avatar maddox commented on August 9, 2024
[Req] Port to Linux/Windows

from wallop.

Comments (22)

tmm1 avatar tmm1 commented on August 9, 2024

Should run on linux just fine. Windows too, but you'll need to use something like http://rubyinstaller.org/ and find a copy of ffmpeg.

from wallop.

tinycg avatar tinycg commented on August 9, 2024

Having tried to work this out in Windows after having a Mac install, the issue I ran into was actually related to the setup sh scripts which even something like rubyinstaller aren't really supported on the Windows side so I scrapped it not knowing where to go next.

from wallop.

tmm1 avatar tmm1 commented on August 9, 2024

You can install something like cygwin and run the scripts, or simply run the commands in the scripts themselves.

I don't use windows so I can't really help.

from wallop.

tinycg avatar tinycg commented on August 9, 2024

I have cygwin and was still unable to run the .sh scripts from there, my understanding is it was a pathing issue, I wasn't able to get it figured out even by changing the paths. It wasn't clear to me what the proper startup steps are, however I was able to execute the setup steps to install the ruby dependencies, I figured that out.. just not the rest.

from wallop.

tmm1 avatar tmm1 commented on August 9, 2024

Something like this should work:

gem install bundler
bundle install --standalone --binstubs --local --path vendor/gems --quiet
bin/rake wallop:install
export RACK_ENV=production
bundle exec ruby app/app.rb

Good luck.

from wallop.

maddox avatar maddox commented on August 9, 2024
bin/rake wallop:install

can be skipped since all it does is write out a launchd plist and start it up. This is def OS X specific.

We could optionally set up in init.d when running this on a linux derivative, but I have no clue how to start things on boot in Windows.

from wallop.

antch avatar antch commented on August 9, 2024

@tmm1 Your commands work for running Wallop on Windows (I omitted the rake command). The only thing that I had to do w.r.t. Wallop was to remove the exec from the ffmpeg command (wallop.rb#L29). Of course, this is after all of the gymnastics involved in getting Ruby setup with the Devkit and compiling ffmpeg from source with the non-free libs enabled...

from wallop.

antch avatar antch commented on August 9, 2024

I guess there are other issues on Windows. Just ran into an error that killed the process. Are you at all interested in these errors? I can continue to post stacktraces that I run into if it'd be helpful.

F:/wallop/lib/wallop.rb:79:in `kill': unsupported name `SIGQUIT' (ArgumentError)
        from F:/wallop/lib/wallop.rb:79:in `block in sweep_sessions'
        from F:/wallop/lib/wallop.rb:63:in `each'
        from F:/wallop/lib/wallop.rb:63:in `sweep_sessions'
        from app/app.rb:142:in `block (2 levels) in <main>'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3/lib/em/tim
ers.rb:56:in `call'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3/lib/em/tim
ers.rb:56:in `fire'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3/lib/eventm
achine.rb:187:in `call'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3/lib/eventm
achine.rb:187:in `run_machine'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3/lib/eventm
achine.rb:187:in `run'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/thin-1.5.1/lib/thin/backends/
base.rb:63:in `start'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/thin-1.5.1/lib/thin/server.rb
:159:in `start'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/rack-1.5.2/lib/rack/handler/t
hin.rb:16:in `run'
        from F:/wallop/vendor/gems/ruby/1.9.1/gems/sinatra-1.4.3/lib/sinatra/bas
e.rb:1408:in `run!'
        from app/app.rb:145:in `<main>'

from wallop.

tmm1 avatar tmm1 commented on August 9, 2024

Cool. You can try changing that SIGQUIT to SIGKILL instead.

from wallop.

antch avatar antch commented on August 9, 2024

That worked, thanks. I'm now having another issue with file permissions. When it goes to clean up the files it fails with a "Permission Denied" and then exits. Research on what it could be is coming up empty for me. I've tried running Wallop from an elevated command prompt but it makes no difference -- I also set the tmp folder to "Full Control: Everyone". Any ideas?

F:/Dev/Ruby193/lib/ruby/1.9.1/fileutils.rb:1406:in `unlink': Permission denied -
 F:/wallop/tmp/39223.ts (Errno::EACCES)
    from F:/Dev/Ruby193/lib/ruby/1.9.1/fileutils.rb:1406:in `block in remove
    _file'

Is it alright if I continue to work through all of the Windows problems in this issue?

from wallop.

tmm1 avatar tmm1 commented on August 9, 2024

Weird. Try this:

-    rm(Dir.glob("#{transcoding_path}/#{channel}*.ts"))
+    rm(Dir.glob("#{transcoding_path}/#{channel}*.ts"), true)

from wallop.

antch avatar antch commented on August 9, 2024

I spent a bit more time trying to work out some of the Windows compatibility issues.

With the ffmpeg command the way it is, executing it will cause the PID of the shell to be returned instead of the ffmpeg process (because of the output redirection). So ffmpeg was never getting killed. By moving that to the call to spawn the cleanup now works.

def self.ffmpeg_command(channel, resolution='1280x720', bitrate='3000k')
  %{#{config['ffmpeg_path']} -threads 4 -f mpegts -analyzeduration 2000000 -i #{raw_stream_url_for_channel(channel)} -bufsize 100Mi -loglevel warning -async 1 -ac 2 -acodec libfdk_aac -b:v #{bitrate} -minrate #{bitrate.gsub(/\d+/){ |o| (o.to_i * 0.80).to_i }} -maxrate #{bitrate} -vcodec libx264 -preset superfast -tune zerolatency -s #{resolution} -flags -global_header -fflags +genpts -map 0:0 -map 0:1 -hls_time 2 -hls_wrap 40 #{transcoding_path}/#{channel}.m3u8}
end

And then (in app.rb):

pid  = POSIX::Spawn::spawn(Wallop.ffmpeg_command(channel, resolution, bitrate), [:out, :err] => ['log/ffmpeg.log', 'w'])

This change has the side effect of allowing the rm to work, even without the :force => true!

I'm not really a Ruby guy so I'm really just hacking away at this.

from wallop.

antch avatar antch commented on August 9, 2024

I forked off for Windows compatibility -- I'll submit a pull request at some point in the near future. I do have two questions:

  • Is the exec before the ffmpeg command strictly required on MacOS?
  • What is Wallop's license? I don't see it anywhere in the readme or in the code.

from wallop.

maddox avatar maddox commented on August 9, 2024

What is Wallop's license? I don't see it anywhere in the readme or in the code.

MIT. sorry, I should put it in there.

On Dec 23, 2013, at 11:00 AM, magnafides [email protected] wrote:

What is Wallop's license? I don't see it anywhere in the readme or in the code.

from wallop.

eagledawg avatar eagledawg commented on August 9, 2024

antch - any progress on your Windows port? Extremely interested in your outcome...

from wallop.

antch avatar antch commented on August 9, 2024

I haven't had time to work on it (though I still plan on doing it), but for
now you should be able to follow the discussion here and get it working.

On Tue, Jan 21, 2014 at 5:20 PM, eagledawg [email protected] wrote:

antch - any progress on your Windows port? Extremely interested in your
outcome...


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-32970591
.

from wallop.

Mibix avatar Mibix commented on August 9, 2024

Any update on this? Wallop seems like it has advantages to HDHRFling.

from wallop.

CORRUPT27 avatar CORRUPT27 commented on August 9, 2024

https://forums.plex.tv/index.php/topic/83233-hdsurfer-plug-in-for-hdhomerun/

On Thu, Jun 5, 2014 at 10:07 AM, Mibix [email protected] wrote:

Any update on this? Wallop seems like it has advantages to HDHRFling.


Reply to this email directly or view it on GitHub
#16 (comment).

from wallop.

maddox avatar maddox commented on August 9, 2024

It's not really a matter of needing to port to windows or linux.

It works on linux right now, and I'm sure it works on Windows. You just need to set it up. I know nothing about getting Ruby things working on Windows, or anything for that matter.

Pull requests welcome for Windows instructions.

from wallop.

Mibix avatar Mibix commented on August 9, 2024

@CORRUPT27 I have HDSurfer, it doesnt work very good.

@maddox Yeah neither do I :p maybe I was really directing this towards @antch

from wallop.

musiclandUSA avatar musiclandUSA commented on August 9, 2024

Going to revive this after 4 years because I'm attempting this on a Win 10 machine this week.

from wallop.

musiclandUSA avatar musiclandUSA commented on August 9, 2024

I'm stuck at those script commands above, the "bundle install" command results in "could not locate gemfile"

from wallop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.