Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will merge a few updates to the repair av pipeline in an effort to better handle large video files, and should also address some issues like #32.
Also, though there isn't a ticket for it, the /admin page has become practically unusable because the videos seem to be set to autoplay and/or the preview gifs can be very heavy files, being not a single thumbnail but multiple frames from each video (i.e. arbitrarily long based on the length of the original video).
Ultimately this comes down to some changes to the ffmpeg commands.
-movflags faststart
-c:v libx264
)-c:a copy
)aac
for the audio codec, but consistently got aPthread
error when runningyarn repair-av
locallyAdditionally, a new environment variable can be set to limit the number of files that are processed in a single workflow run (
REPAIR_AV_FILE_LIMIT
). This should help address issues like #30 in the future.One final note: We are now handling much larger files than when the site was originally designed. Because of how intertwined the 1) video upload 2) video repair/transcode 3) user survey data collection, and 4) admin approval processes are, I've made changes within the existing workflow, instead of picking it back apart into its constituent pieces and augmenting them individually.
Thus, for very large files >2gb, we'll try handling the admin upload process like so:
/admin-upload
as normal, but upload a small dummy video (not the real video)-- the uploaded video will be named with the new story id
--
ffmpeg -i video.mp4 -c:v libx264 -c:a aac -aac_coder fast -movflags faststart output.mp4
-- the extra aac flags seem to be helpful but
copy
can also be used.scripts/skip-repairs.txt
so that the github workflow will not touch it