Skip to content

Commit

Permalink
Merge pull request #19 from seankross/dev
Browse files Browse the repository at this point in the history
ari 0.3.3 on CRAN
  • Loading branch information
seankross authored Jan 13, 2020
2 parents 57d2d0f + 859f874 commit d36afaa
Show file tree
Hide file tree
Showing 30 changed files with 165 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.Rproj.user
.RData
.DS_Store
smoke_test/*
smoke_test/*
inst/doc
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ matrix:
- r: release
- r: oldrel
- r: devel
dist: trusty
dist: xenial
sudo: required

before_install:
- sudo apt-get -qq update
- sudo apt-get install -y software-properties-common
- sudo add-apt-repository -y ppa:mc3man/trusty-media
- sudo add-apt-repository -y ppa:jonathonf/ffmpeg-4
- sudo apt-get -qq update
- sudo apt-get install -y ffmpeg --allow-unauthenticated

Expand Down
2 changes: 0 additions & 2 deletions CRAN-RELEASE

This file was deleted.

6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ari
Type: Package
Title: Automated R Instructor
Version: 0.3.2
Version: 0.3.3
Authors@R: c(
person("Sean", "Kross", email = "sean@seankross.com", role = c("aut", "cre")),
person("John", "Muschelli", role = "ctb")
Expand Down Expand Up @@ -31,10 +31,12 @@ Suggests:
grDevices,
xaringan,
aws.signature,
aws.polly
aws.polly,
knitr
License: MIT + file LICENSE
URL: http://github.com/seankross/ari
BugReports: http://github.com/seankross/ari/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
VignetteBuilder: knitr
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ari 0.3.3

- Added vignette for using via a Docker image.

# ari 0.3.2

- Fixed bug in `ffmpeg_version_sufficient` if `ffmpeg` is a development version.
Expand Down
14 changes: 12 additions & 2 deletions R/ari_stitch.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@
#' @importFrom tuneR bind writeWave
#' @export
#' @examples
#' \dontrun{
#' if (ffmpeg_version_sufficient()) {
#' result = ari_stitch(
#' ari_example(c("mab1.png", "mab2.png")),
#' list(tuneR::noise(), tuneR::noise()))
#' }
#' }
ari_stitch <- function(
images, audio,
Expand All @@ -61,7 +63,7 @@ ari_stitch <- function(
divisible_height = TRUE,
audio_codec = get_audio_codec(),
video_codec = get_video_codec(),
video_sync_method = "-1",
video_sync_method = "2",
audio_bitrate = NULL,
video_bitrate = NULL,
pixel_format = "yuv420p",
Expand All @@ -79,7 +81,15 @@ ari_stitch <- function(
dir.exists(output_dir)
)
if (is.character(audio)) {
audio = lapply(audio, tuneR::readMP3)

audio = lapply(audio, function(x) {
ext = tolower(tools::file_ext(x))
func = switch(ext,
wav = tuneR::readWave,
mp3 = tuneR::readMP3,
tuneR::readMP3)
func(x)
})
audio = lapply(audio, function(wav) {
ideal_duration <- ceiling(length(wav@left) / wav@samp.rate)
left = rep(0,
Expand Down
2 changes: 2 additions & 0 deletions R/ffmpeg_codecs.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
#' @export
#'
#' @examples
#' \dontrun{
#' if (ffmpeg_version_sufficient()) {
#' ffmpeg_codecs()
#' ffmpeg_video_codecs()
#' ffmpeg_audio_codecs()
#' }
#' }
ffmpeg_codecs = function() {
ffmpeg = ffmpeg_exec(quote = TRUE)
cmd = paste(ffmpeg, "-codecs")
Expand Down
2 changes: 2 additions & 0 deletions R/ffmpeg_exec.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
#' @export
#'
#' @examples
#' \dontrun{
#' if (have_ffmpeg_exec()) {
#' ffmpeg_exec()
#' }
#' }
ffmpeg_exec = function(quote = FALSE) {
ffmpeg <- discard(c(Sys.getenv("ffmpeg"),
Sys.which("ffmpeg")), ~ nchar(.x) == 0)[1]
Expand Down
4 changes: 2 additions & 2 deletions R/set_encoders.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ get_os = function() {
#' @export
#'
#' @examples
#'
#' \dontrun{
#' if (have_ffmpeg_exec()) {
#' print(ffmpeg_version())
#' get_audio_codec()
Expand All @@ -39,7 +39,7 @@ get_os = function() {
#'
#' audio_codec_encode("aac")
#' }
#'
#' }
set_audio_codec = function(codec) {
if (missing(codec)) {
os = get_os()
Expand Down
15 changes: 6 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
## Test environments
* local OS X install, R 3.6.1
* ubuntu 14.04 (on travis-ci), R 3.6.1
* local OS X install, R 3.6.2
* ubuntu 16.04 (on travis-ci), R 3.6.2
* win-builder (devel and release)
* R-hub windows-x86_64-devel (r-devel)
* R-hub ubuntu-gcc-release (r-release)
* R-hub fedora-clang-devel (r-devel)

## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.

## Release Summary

Third release of `ari`.
0 errors | 0 warnings | 0 notes
2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ari_burn_subtitles.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ari_example.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ari_narrate.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ari_spin.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 31 additions & 4 deletions docs/reference/ari_stitch.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ari_talk.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/codecs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ffmpeg_codecs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ffmpeg_exec.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/ari_stitch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d36afaa

Please sign in to comment.