Skip to content
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

"Internal Server Error" on Ubuntu 13.04 w/ HDHomeRun (Dual - NOT the Prime) #1

Closed
TheDBP opened this issue Jun 26, 2013 · 26 comments
Closed

Comments

@TheDBP
Copy link

TheDBP commented Jun 26, 2013

I'm probably doing something wrong here, but ...

What I did:

  • apt-get installed bundler and ffmpeg
  • cloned git repository
  • cd'd in, ran script/setup
  • received this error: "cp: cannot stat ‘config/config.example.toml’: No such file or directory"
  • checked /config directory, there was no config.example.toml file, so I commented that line out of the setup script and ran again just in case.
  • manually adjusted the config.toml file for my setup (entered static IP of my HDHomeRun, set it to start at channel 2 since I'm using OTA, adjusted path of ffmpeg to /usr/bin/ffmpeg, and changed transcoding path)
  • started the server
  • was able to connect via browser
  • clicking on links at top for All channels or HD channels just gives me an "Internal Server Error" message.

Now, I realize I'm not running it on the recommended setup at all, but I'm really hoping to get this working. Don't know where the logs are going, since I'm on Ubuntu (if they're going anywhere at all, didn't see a way to change this in any of the included files).

So is this not working because I'm on Linux, because it's not an HDHomeRun Prime, because I'm using OTA, or a combination of any/all of the above?

GREAT WORK by the way. Been waiting on something like this for a long time. This is truly exciting!

@maddox
Copy link
Owner

maddox commented Jun 26, 2013

received this error: "cp: cannot stat ‘config/config.example.toml’: No such file or directory"

Cool, this is a bug, I'll fix this. Thanks!

So is this not working because I'm on Linux, because it's not an HDHomeRun Prime, because I'm using OTA, or a combination of any/all of the above?

This only works for the HDHomerun Prime. The original HDHomerun's firmware doesn't have any of the things Wallop needs to work. Namely:

  • returning the channel listing
  • using HTTP to return the tv stream in mpeg2

@maddox maddox closed this as completed Jun 26, 2013
@TheDBP
Copy link
Author

TheDBP commented Jun 27, 2013

Thanks for the quick reply! Looks like I'll have to get a prime :D

I think the Dual passes a transport stream, would it be possible to use the URL from an .strm file and pass the .ts file to ffmpeg? I'm no programmer so I really wouldn't know...

Sent from my iPhone

On Jun 26, 2013, at 4:47 PM, Jon Maddox notifications@github.com wrote:

received this error: "cp: cannot stat ‘config/config.example.toml’: No such file or directory"

Cool, this is a bug, I'll fix this. Thanks!

So is this not working because I'm on Linux, because it's not an HDHomeRun Prime, because I'm using OTA, or a combination of any/all of the above?

This only works for the HDHomerun Prime. The original HDHomerun's firmware doesn't have any of the things Wallop needs to work. Namely:

returning the channel listing
using HTTP to return the tv stream in mpeg2

Reply to this email directly or view it on GitHub.

@maddox
Copy link
Owner

maddox commented Jun 27, 2013

The problem is that it doesn't do it over HTTP as far as I know, and thats a huge requirement for this stuff to work.

On Jun 26, 2013, at 7:47 PM, TheDBP notifications@github.com wrote:

Thanks for the quick reply! Looks like I'll have to get a prime :D

I think the Dual passes a transport stream, would it be possible to use the URL from an .strm file and pass the .ts file to ffmpeg? I'm no programmer so I really wouldn't know...

Sent from my iPhone

On Jun 26, 2013, at 4:47 PM, Jon Maddox notifications@github.com wrote:

received this error: "cp: cannot stat ‘config/config.example.toml’: No such file or directory"

Cool, this is a bug, I'll fix this. Thanks!

So is this not working because I'm on Linux, because it's not an HDHomeRun Prime, because I'm using OTA, or a combination of any/all of the above?

This only works for the HDHomerun Prime. The original HDHomerun's firmware doesn't have any of the things Wallop needs to work. Namely:

returning the channel listing
using HTTP to return the tv stream in mpeg2

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

@TheDBP
Copy link
Author

TheDBP commented Jun 27, 2013

Thanks for the reply!

Sent from my iPhone

On Jun 27, 2013, at 1:45 AM, Jon Maddox notifications@github.com wrote:

The problem is that it doesn't do it over HTTP as far as I know, and thats a huge requirement for this stuff to work.

On Jun 26, 2013, at 7:47 PM, TheDBP notifications@github.com wrote:

Thanks for the quick reply! Looks like I'll have to get a prime :D

I think the Dual passes a transport stream, would it be possible to use the URL from an .strm file and pass the .ts file to ffmpeg? I'm no programmer so I really wouldn't know...

Sent from my iPhone

On Jun 26, 2013, at 4:47 PM, Jon Maddox notifications@github.com wrote:

received this error: "cp: cannot stat ‘config/config.example.toml’: No such file or directory"

Cool, this is a bug, I'll fix this. Thanks!

So is this not working because I'm on Linux, because it's not an HDHomeRun Prime, because I'm using OTA, or a combination of any/all of the above?

This only works for the HDHomerun Prime. The original HDHomerun's firmware doesn't have any of the things Wallop needs to work. Namely:

returning the channel listing
using HTTP to return the tv stream in mpeg2

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@maddox
Copy link
Owner

maddox commented Jul 3, 2013

received this error: "cp: cannot stat ‘config/config.example.toml’: No such file or directory"

fixed in a945ce3

@drewdin
Copy link

drewdin commented Sep 7, 2014

I'm getting the error "bundle install --standalone --binstubs --local --path vendor/gems --quiet" when i try to install wallop on ubuntu 14.04, any suggestions? Thanks

@tmm1
Copy link
Collaborator

tmm1 commented Sep 7, 2014

Please post the error output so we can help.

@maddox
Copy link
Owner

maddox commented Sep 7, 2014

@drewdin sent me the error the error via email.

==> Installing gem dependencies…
script/bootstrap: 8: script/bootstrap: bundle: not found

@drewdin you need to have bundler installed first.

gem install bundler

@drewdin
Copy link

drewdin commented Sep 7, 2014

Hi Guys,

Thanks for the help, i installed gem as listed below, since it was ubuntu I was confused about gem install bundler and apt-get install bundler. So i installed gem install bundler as listed below, now when i try to run the setup script i get the following error.

==> Installing gem dependencies…
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb 

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:2:in `

'

Gem files will remain installed in /home/test/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3 for inspection.
Results logged to /home/test/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3/ext/gem_make.out
An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that gem install eventmachine -v '1.0.3' succeeds before bundling

Thanks,
Andrew
Date: Sun, 7 Sep 2014 07:29:34 -0700
From: notifications@github.com
To: wallop@noreply.github.com
CC: drewdin1@hotmail.com
Subject: Re: [wallop] "Internal Server Error" on Ubuntu 13.04 w/ HDHomeRun (Dual - NOT the Prime) (#1)

@drewdin sent me the error the error via email.

==> Installing gem dependencies…
script/bootstrap: 8: script/bootstrap: bundle: not found

@drewdin you need to have bundler installed first.

gem install bundler


Reply to this email directly or view it on GitHub. =

@drewdin
Copy link

drewdin commented Sep 7, 2014

I apologize guys, it started properly. I had to use apt-get as i thought, I'm still learning my way through linux.

Thanks,
Andrew

From: drewdin1@hotmail.com
To: reply@reply.github.com; wallop@noreply.github.com
Subject: RE: [wallop] "Internal Server Error" on Ubuntu 13.04 w/ HDHomeRun (Dual - NOT the Prime) (#1)
Date: Sun, 7 Sep 2014 11:18:58 -0400

Hi Guys,

Thanks for the help, i installed gem as listed below, since it was ubuntu I was confused about gem install bundler and apt-get install bundler. So i installed gem install bundler as listed below, now when i try to run the setup script i get the following error.

==> Installing gem dependencies…
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb 

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:2:in `

'

Gem files will remain installed in /home/test/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3 for inspection.
Results logged to /home/test/wallop/vendor/gems/ruby/1.9.1/gems/eventmachine-1.0.3/ext/gem_make.out
An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that gem install eventmachine -v '1.0.3' succeeds before bundling

Thanks,
Andrew
Date: Sun, 7 Sep 2014 07:29:34 -0700
From: notifications@github.com
To: wallop@noreply.github.com
CC: drewdin1@hotmail.com
Subject: Re: [wallop] "Internal Server Error" on Ubuntu 13.04 w/ HDHomeRun (Dual - NOT the Prime) (#1)

@drewdin sent me the error the error via email.

==> Installing gem dependencies…
script/bootstrap: 8: script/bootstrap: bundle: not found

@drewdin you need to have bundler installed first.

gem install bundler


Reply to this email directly or view it on GitHub. =

@drewdin
Copy link

drewdin commented Sep 7, 2014

I have it started but it is not resolving any channels. I see over and over in the shell:

test@ubuntu:~/wallop$ ./script/start
== Sinatra/1.4.3 has taken the stage on 8888 for production with backup from Thin

Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:8888, CTRL+C to stop
192.168.1.12 - - [07/Sep/2014 13:04:01] "GET /channels/44/status HTTP/1.1" 404 - 0.0009
192.168.1.12 - - [07/Sep/2014 13:04:02] "GET /channels/44/status HTTP/1.1" 404 - 0.0021
192.168.1.12 - - [07/Sep/2014 13:04:02] "GET /channels/44/status HTTP/1.1" 404 - 0.0014
192.168.1.12 - - [07/Sep/2014 13:04:03] "GET /channels/44/status HTTP/1.1" 404 - 0.0025
192.168.1.12 - - [07/Sep/2014 13:04:03] "GET /channels/44/status HTTP/1.1" 404 - 0.0017
192.168.1.12 - - [07/Sep/2014 13:04:04] "GET /channels/44/status HTTP/1.1" 404 - 0.0026

Any suggestions?
Thanks

@drewdin
Copy link

drewdin commented Sep 7, 2014

Both on the webpage and on roku, it just keeps saying back and forth "Preparing screen" and then "Tunning Channel". I checked the HD homerun prime and it thinks the machine it tuned to a channel.

Log Outputs
ffmpeg.log: [mpeg2video @ 0x23b2660] 0x0 is invalid
wallop.log: a lot of these
I, [2014-09-07T15:16:40.527733 #10063] INFO -- : CHECKING READY STATUS OF SESSION - {:channel=>"576", :pid=>10372, :ready=>false, :last_read=>2014-09-07 15:16:36 -0400}

Any ideas? Thanks

@maddox
Copy link
Owner

maddox commented Sep 7, 2014

Check to make sure your hdhomerun has the proper firmware. Also make sure it's an hdhomerun prime or the newer non cable card one. The older antenna based hdhomerun isn't supported.

On Sep 7, 2014, at 3:19 PM, Andrew notifications@github.com wrote:

Both on the webpage and on roku, it just keeps saying back and forth "Preparing screen" and then "Tunning Channel". I checked the HD homerun prime and it thinks the machine it tuned to a channel.

Log Outputs
ffmpeg.log: [mpeg2video @ 0x23b2660] 0x0 is invalid
wallop.log: a lot of these
I, [2014-09-07T15:16:40.527733 #10063] INFO -- : CHECKING READY STATUS OF SESSION - {:channel=>"576", :pid=>10372, :ready=>false, :last_read=>2014-09-07 15:16:36 -0400}

Any ideas? Thanks


Reply to this email directly or view it on GitHub.

@drewdin
Copy link

drewdin commented Sep 7, 2014

I have Firmware: 20140604 on my HD Homerun Prime. How can i verify if that is on the verified list? Thanks

@tmm1
Copy link
Collaborator

tmm1 commented Sep 7, 2014

That firmware should work. Can you post the contents of the ffmpeg log to gist.github.com

@drewdin
Copy link

drewdin commented Sep 7, 2014

Here is the full output of the ffmpeg.log, its not much.

[mpeg2video @ 0x1ce2660] 0x0 is invalid
Last message repeated 8 times
[mpegts @ 0x1ce1d00] max_analyze_duration 2000000 reached at 2016000 microseconds
[mpegts @ 0x1ce1d00] Estimating duration from bitrate, this may be inaccurate
Unknown encoder 'libfaac'

@tmm1
Copy link
Collaborator

tmm1 commented Sep 7, 2014

Unknown encoder 'libfaac'

Your ffmpeg was not compiled with the correct encoder

@drewdin
Copy link

drewdin commented Sep 7, 2014

How do I change encoders and what should it be? Thanks

@tmm1
Copy link
Collaborator

tmm1 commented Sep 7, 2014

http://stackoverflow.com/a/19777823/332798 has some details

Try this:

diff --git a/lib/wallop.rb b/lib/wallop.rb
index c5a50f1..38a5706 100644
--- a/lib/wallop.rb
+++ b/lib/wallop.rb
@@ -26,7 +26,7 @@ module Wallop
   end

   def self.ffmpeg_command(channel, resolution='1280x720', bitrate='3000k')
-    %{exec #{config['ffmpeg_path']} -threads #{config['ffmpeg']['threads']} -f mpegts -analyzeduration 2000000 -i #{raw_stream_url_for_channel(channel)} -ac 2 -acodec libfaac -b:v #{bitrate} -minrate #{bitrate.gsub(/\d+/){ |o| (o.to_i * 0.80).to_i }} -maxrate #{bitrate} -vcodec libx264 -s #{resolution} -preset #{config['ffmpeg']['h264_preset']} -r #{config['ffmpeg']['framerate']} -hls_time #{config['ffmpeg']['hls_time']} -hls_wrap #{config['ffmpeg']['hls_wrap']} #{config['ffmpeg']['options']} #{transcoding_path}/#{channel}.m3u8 >log/ffmpeg.log 2>&1}
+    %{exec #{config['ffmpeg_path']} -threads #{config['ffmpeg']['threads']} -f mpegts -analyzeduration 2000000 -i #{raw_stream_url_for_channel(channel)} -ac 2 -acodec libvo_aacenc -b:v #{bitrate} -minrate #{bitrate.gsub(/\d+/){ |o| (o.to_i * 0.80).to_i }} -maxrate #{bitrate} -vcodec libx264 -s #{resolution} -preset #{config['ffmpeg']['h264_preset']} -r #{config['ffmpeg']['framerate']} -hls_time #{config['ffmpeg']['hls_time']} -hls_wrap #{config['ffmpeg']['hls_wrap']} #{config['ffmpeg']['options']} #{transcoding_path}/#{channel}.m3u8 >log/ffmpeg.log 2>&1}
   end

   def self.snapshot_command(channel, width=nil)

@drewdin
Copy link

drewdin commented Sep 7, 2014

Sorry for the dumb question but where do I try that? In the shell or is it a script i need to run? Thanks

@maddox
Copy link
Owner

maddox commented Sep 7, 2014

You might want to just try getting ffmpeg installed with libfaac. There's tons of support on Ubuntu online.

There's also pretty straight forward instructions for building it from scratch from the ffmpeg page.

On Sep 7, 2014, at 6:50 PM, Andrew notifications@github.com wrote:

Sorry for the dumb question but where do I try that? In the shell or is it a script i need to run? Thanks


Reply to this email directly or view it on GitHub.

@drewdin
Copy link

drewdin commented Sep 14, 2014

I have tried everything under the sun to get libfaac recognized by ffmpeg. anyone want to throw me a bone

@tmm1
Copy link
Collaborator

tmm1 commented Sep 14, 2014

Use a different encoder as I showed above

On Saturday, September 13, 2014, Andrew notifications@github.com wrote:

I have tried everything under the sun to get libfaac recognized by ffmpeg.
anyone want to throw me a bone


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

@credd144
Copy link

Ubuntu 14.04 Server - Eventmachine install failing (Fix --> sudo apt-get install ruby1.9.1-dev)

chris@wallop-xcod:~/wallop$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Using rake 10.0.4
Using rack 1.5.2
Using rack-protection 1.5.0
Using tilt 1.4.1
Using sinatra 1.4.3
Using async_sinatra 1.1.0
Using backports 3.3.4
Using blankslate 2.1.2.4
Using daemons 1.1.9

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:2:in `

'

Gem files will remain installed in /tmp/bundler20140921-1171-nn33ss/eventmachine-1.0.3/gems/eventmachine-1.0.3 for inspection.
Results logged to /tmp/bundler20140921-1171-nn33ss/eventmachine-1.0.3/gems/eventmachine-1.0.3/ext/gem_make.out
An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue.
Make sure that gem install eventmachine -v '1.0.3' succeeds before bundling.

Fix:
chris@wallop-xcod:~/wallop$ sudo apt-get install ruby1.9.1-dev

Success:
chris@wallop-xcod:~/wallop$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Using rake 10.0.4
Using rack 1.5.2
Using rack-protection 1.5.0
Using tilt 1.4.1
Using sinatra 1.4.3
Using async_sinatra 1.1.0
Using backports 3.3.4
Using blankslate 2.1.2.4
Using daemons 1.1.9
Installing eventmachine 1.0.3
Installing json 1.7.7
Installing multi_json 1.8.0
Installing parslet 1.5.0
Installing posix-spawn 0.3.6
Installing rack-test 0.6.2
Installing sinatra-contrib 1.4.1
Installing thin 1.5.1
Installing toml 0.0.4
Using bundler 1.7.3
Updating files in vendor/cache
Your bundle is complete!
Use bundle show [gemname] to see where a bundled gem is installed.

@maddox
Copy link
Owner

maddox commented Sep 21, 2014

Is this the modern dual or the original?

The original isn't supported.

On Sep 21, 2014, at 12:38 PM, credd144 notifications@github.com wrote:

Ubuntu 14.04 Server - Eventmachine install failing (Fix --> sudo apt-get install ruby1.9.1-dev)

chris@wallop-xcod:~/wallop$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Using rake 10.0.4
Using rack 1.5.2
Using rack-protection 1.5.0
Using tilt 1.4.1
Using sinatra 1.4.3
Using async_sinatra 1.1.0
Using backports 3.3.4
Using blankslate 2.1.2.4
Using daemons 1.1.9

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:2:in `'

Gem files will remain installed in /tmp/bundler20140921-1171-nn33ss/eventmachine-1.0.3/gems/eventmachine-1.0.3 for inspection.
Results logged to /tmp/bundler20140921-1171-nn33ss/eventmachine-1.0.3/gems/eventmachine-1.0.3/ext/gem_make.out
An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue.
Make sure that gem install eventmachine -v '1.0.3' succeeds before bundling.

Fix:
chris@wallop-xcod:~/wallop$ sudo apt-get install ruby1.9.1-dev

Success:
chris@wallop-xcod:~/wallop$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Using rake 10.0.4
Using rack 1.5.2
Using rack-protection 1.5.0
Using tilt 1.4.1
Using sinatra 1.4.3
Using async_sinatra 1.1.0
Using backports 3.3.4
Using blankslate 2.1.2.4
Using daemons 1.1.9
Installing eventmachine 1.0.3
Installing json 1.7.7
Installing multi_json 1.8.0
Installing parslet 1.5.0
Installing posix-spawn 0.3.6
Installing rack-test 0.6.2
Installing sinatra-contrib 1.4.1
Installing thin 1.5.1
Installing toml 0.0.4
Using bundler 1.7.3
Updating files in vendor/cache
Your bundle is complete!
Use bundle show [gemname] to see where a bundled gem is installed.


Reply to this email directly or view it on GitHub.

@credd144
Copy link

Sorry this is on a Prime... Probably not the best place for this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants