Comments (7)
Little help: http://stackoverflow.com/questions/7656950/read-id3-tags-of-remote-mp3-file-in-ruby-rails
from binaergewitter.github.com.
Doesn't work.
There is no read_from_buffer() method and as far as I see there never has been one O_o
from binaergewitter.github.com.
We could download the first X bytes with a range request and safe them into a temporary file. This should do the trick.
from binaergewitter.github.com.
Doesn't seem to work that way. We might not actually have the lenght set as an ID3v2 header
from binaergewitter.github.com.
btw, I tested a few libraries using this code:
require 'uri'
require 'net/http'
size = 25000
uri = URI("http://download.binaergewitter.de/2012-01-25.Binaergewitter.Talk.0.mp3")
http = Net::HTTP.new(uri.host, uri.port)
headers = { 'Range' => "bytes=0-#{size}" }
path = uri.path.empty? ? "/" : uri.path
#test to ensure that the request will be valid - first get the head
code = http.head(path, headers).code.to_i
if (code >= 200 && code < 300) then
#the data is available...
result = http.get(uri.path, headers)
File.open('test.mp3', 'wb') {|file| file.write(result.body)}
# DO SOMETHING HERE
end
from binaergewitter.github.com.
BTW: This is an iTunes only feature. So the only formats we need to support are mp3 and m4a. For our case only supporting mp3 in cbr and vbr would do the job.
from binaergewitter.github.com.
For now, the itunes:duration field has been removed until we have a reliable way to calculate the duration of m4a and mp3 files.
from binaergewitter.github.com.
Related Issues (20)
- add flattr to feed HOT 4
- Support a podcast feed for each audio format HOT 26
- Instacast doesn't display a picture for the feed HOT 2
- MP3 Datei enhält keine id3 Tags HOT 2
- Link to comments feed on website HOT 2
- Comment Eingabe abgeschnitten HOT 1
- podcast-feed also as atom HOT 4
- guid increaseable HOT 5
- Markdown im Impressum kaputt HOT 2
- Add support for simple chapters feed extension
- Add podlove web player HOT 5
- Some write issues in the newest blog entry
- webinterface for mute HOT 1
- add alternate feeds
- add open graph HOT 2
- generate Blogpost when uploading new Audiofile HOT 2
- add some Documentation HOT 3
- Add JS concatenation/minifying to build process
- add bitlove to each post HOT 9
- Add markdown link to wiki start page HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binaergewitter.github.com.