https://github.com/geberl/swift-fireplace
Offline playback of a fireplace video on your Apple TV
https://github.com/geberl/swift-fireplace
appletv swift video xcode
Last synced: 12 months ago
JSON representation
Offline playback of a fireplace video on your Apple TV
- Host: GitHub
- URL: https://github.com/geberl/swift-fireplace
- Owner: geberl
- License: mit
- Created: 2021-11-06T12:32:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-17T14:53:18.000Z (over 3 years ago)
- Last Synced: 2023-03-11T01:59:45.468Z (about 3 years ago)
- Topics: appletv, swift, video, xcode
- Language: Swift
- Homepage:
- Size: 2.58 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fireplace
*Offline playback of a fireplace video on your Apple TV*





## Screenshots


## Bring Your Own Video
For copyright reasons the file `fire.mp4` is not included. It can be supplied for example in the following way:
- Search for *"fireplace 4k"* on YouTube, choose a video
- Show video and audio formats and file sizes `youtube-dl https://www.youtube.com/watch\?v\=Ux8xAuQBdkk --list-formats`
- Choose a video of acceptable size
- Download it `youtube-dl https://www.youtube.com/watch\?v\=Ux8xAuQBdkk --format 137 --output video.m4v`
- Choose an audio track of acceptable size
- Download it `youtube-dl https://www.youtube.com/watch\?v\=Ux8xAuQBdkk --format 140 --output audio.m4a`
- Combine them `ffmpeg -i video.m4v -i audio.m4a -c:v copy -c:a copy fire.mp4`
- Drag & drop the resulting file `fire.mp4` into Xcode and add it as an asset that is bundled on build
- Project -> Target -> Build Phases -> Copy Bundle Resources -> `fire.mp4` must appear in the list
## Resources
- [Source for video player code](https://stackoverflow.com/questions/25348877/how-to-play-a-local-video-with-swift)
- [Apple's Sketch template for tvOS assets](https://developer.apple.com/design/resources/#tvos-apps)
- [Blog post on other image asset usage](https://support.zype.com/hc/en-us/articles/221132148-Apple-TV-App-Images)
## TODO
- Loop video when end is reached