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

"An error occurred loading this content" #48

Closed
briangonzalez opened this issue Oct 31, 2013 · 30 comments
Closed

"An error occurred loading this content" #48

briangonzalez opened this issue Oct 31, 2013 · 30 comments

Comments

@briangonzalez
Copy link

I am trying to play a simple AVI file using the CLI via air play ~/path/to/video.avi.

The AppleTV shows a spinner for a moment then shows the error: "An error occurred loading this content".

AppleTV Info
Model: MD199LL/A
Software: 5.3 (6105)
@bobbyduhbrain
Copy link

I haven't ever had much success playing AVI content to the Apple TV. Try installing FFMPEG and piping the output file into the play command after transcoding the content to an .mp4 formatted video.

@bobbyduhbrain
Copy link

Did more reading and it's not that simple I suppose.

http://andrebluehs.net/blog/converting-avi-to-mp4-with-ffmpeg/

Obviously this is not ideal, perhaps in a future release Bruno can include transcoding features. For now I would convert the AVI to an MP4 since Airplay does not support AVI

@briangonzalez
Copy link
Author

@CUBEMike Thanks for digging into this. It looks like you're right. AVI's don't work, mp4's do.

Going to leave this open and see if @elcuervo has any insights.

@bobbyduhbrain
Copy link

Glad to help, I've been working with this gem in my project for a while. There are caveats to the airplay protocol as with any protocol :) Apple loves their MP4 format.

@briangonzalez
Copy link
Author

Yea, I wonder what Beamer does to get around this issue. Are you building a Rails app with airplay?

@bobbyduhbrain
Copy link

Yes. I am building a UI for this gem :) I'll be open-sourcing that in a month or two and you can make using this a little bit easier from your couch ;)

@briangonzalez
Copy link
Author

Yes! Was just thinking about doing the same. I look forward to it.

On Wednesday, October 30, 2013, CUBEMike wrote:

Yes. I am building a UI for this gem :) I'll be open-sourcing that in a
month or two and you can make using this a little bit easier from your
couch ;)


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

@elcuervo
Copy link
Owner

Currently there is no whitelist in content compatibility to the CLI. I will add it soon but yes, mostly mp4 is supported. I'll add it in the next bug fixing release

@briangonzalez
Copy link
Author

Do you know if there's a workaround for AVI files (other than converting), or is it just going to be blacklisted?

@bobbyduhbrain
Copy link

Brian,

Here's some more info on playing odd file formats on Airplay protocol:

http://forums.macrumors.com/showthread.php?t=1135020

Reading through that, it seems MANY (if not all) solutions to this problem require some form of transcoding to an acceptable format for the Airplay protocol. Apple only allows certain file formats to be used with the protocol and the Apple TV OS itself certainly will not play AVI files, at least that's my understanding. Most solutions would likely require you to convert the file format.

With my project, we had a company convert the video files to an acceptable format for playing on the Apple TV hardware. Even some audio codecs won't play on the Apple TV. It is a very particular piece of hardware that only plays nice with some of the common codecs pushed by Apple on its proprietary hardware.

@sodabrew
Copy link
Collaborator

I think that XBMC will play most things even over Airplay, so a blacklist should probably be device specific.

@bobbyduhbrain
Copy link

Yes, however that requires a jailbreak. New Apple TV does not have a jailbreak yet, so be careful.

@sodabrew
Copy link
Collaborator

No. You can run XBMC on a common PC with AirPlay enabled. I run XBMC on a Raspberry Pi - it even correctly drives hardware acceleration in the video core for several codecs, over AirPlay.

@bobbyduhbrain
Copy link

Yes, but to do so with the Apple TV would require a jailbreak. You can feasibly do whatever you want with a Raspberry Pi. But to do so using an actual Apple TV would require you to jailbreak the device.

Maybe my understanding of other software packages is a little lacking. But I don't think you can ever send an AVI or any other iOS unfriendly video formats to the Apple TV itself. Raspberry Pi is obviously a different animal.

@briangonzalez
Copy link
Author

Yea, I am still just a little baffled as to why Beamer can send AVI to the AppleTV without any prior conversion. Maybe they do some sort of conversion on the fly.

It would be interesting to sniff the packets being sent from Beamer to the AppleTV with wireshark to see what's going on.

@sodabrew
Copy link
Collaborator

@briangonzalez I assume Beamer is transcoding on the fly. Check CPU usage while it's playing, a transcode would be pretty intensive. Also, according to Beamer, they're using some undocumented protocol. A wire trace would be excellent! http://beamer-app.com/support/ (See FAQ towards the bottom)

@briangonzalez
Copy link
Author

Is there a library that's readily available that we can take advantage of to do the transcoding on the fly?

@bobbyduhbrain
Copy link

http://nto.github.io/AirPlay.html

This is a good resource for understanding how these software packages interact with an Apple TV.

Additionally, there is the HTTP Live Streaming protocol which specifies a way to encode live video feed in a way that can be streamed to an Apple TV or other iOS device:

https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/Introduction/Introduction.html

These might be valuable resources for answering some questions. At least I found the information a little enlightening on what might be happening with these different software solutions.

@sodabrew
Copy link
Collaborator

@elcuervo
Copy link
Owner

Beamer keeps a ffmpeg encoding running during playback

On 31/10/2013, at 16:19, Brian Gonzalez [email protected] wrote:

Yea, I am still just a little baffled as to why Beamer can send AVI to the AppleTV without any prior conversion. Maybe they do some sort of conversion on the fly.

It would be interesting to sniff the packets being sent from Beamer to the AppleTV with wireshark to see what's going on.


Reply to this email directly or view it on GitHub.

@briangonzalez
Copy link
Author

It looks like streamio-ffmpeg if exactly what we'd want to use here, no? Especially with the baked in Ruby support.

Naive approach:

if need_transcode? and ffmpeg_in_path?
  # transcode using ffmpeg and play
else if mp4?
  # play video
else
  # unable to play video 
end

@bobbyduhbrain
Copy link

Well, you can always install FFMPEG and run the bash commands that way. I actually preferred that to using streamio-ffmpeg as I had had some trouble with the gem.

@bobbyduhbrain
Copy link

cmd="ffmpeg -i input.avi..."
system(cmd)

@sodabrew
Copy link
Collaborator

I wouldn't want this baked into the Airplay gem, but of course it's @elcuervo call on that. A recipe to show how to connect the two gems (or some alternate ffmpeg wrapper, if needed) would make sense as a README or example.

@bobbyduhbrain
Copy link

It might be better to build that functionality on top of the gem itself. I will consider that then with the UI I am building around the gem

@elcuervo
Copy link
Owner

elcuervo commented Nov 1, 2013

I won't add conversion within the lib. I might be open to add it to the cli.

@elcuervo
Copy link
Owner

elcuervo commented Nov 1, 2013

On an unrelated note: thank you guys for actively commenting on issues and giving opinions of the future of the lib. I really appreciate it

@briangonzalez
Copy link
Author

@elcuervo You have a great thing going on here, I think we all want to see it flourish. Feel free to let us know if we can help.

@elcuervo
Copy link
Owner

elcuervo commented Nov 3, 2013

@briangonzalez Thank you for your support!

I've made the CLI as a sample to other people can use the lib without reading too much... but having an opensource alternative to Beamer could be good.

I'll start adding some stuff to the CLI to see how the encoding behaves.

I encourage everyone to add feature requests/critics/comments in the issues.

We can continue the discussion in #51

@elcuervo elcuervo closed this as completed Nov 3, 2013
@Steppenwolf-
Copy link

Hi everybody, i'm new on github and have a question. Sorry if is not the right place to put this, but i read that you're speaking about Beamer and the way this software stream very fast any video, and what i find the best on this software is, it can stream to apple tv with subtitles. I want to have spanish, italian or german subtitles and maybe in the future, i learn more english than now and need no more subtitles.
Apple tv do a better streaming while air playing than through mirroring.
Now, my question is, and sorry if my english is not yet the best: Can someone help me to build a command line interface for Beamer app? what are the steps to build a command line interface? I want to try to use it with xbmc, popcorn-time and oder software. I know, Beamer is a commercial software, but i put my question anyway. I want it for private purpose and to share it on a open source.
Thanks

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

6 participants
@sodabrew @elcuervo @briangonzalez @bobbyduhbrain @Steppenwolf- and others