Skip to content

Commit

Permalink
Merge branch 'PartialImportMuxingFix' of git://github.com/Arnei/openc…
Browse files Browse the repository at this point in the history
…ast into r/8.x
  • Loading branch information
gregorydlogan committed May 8, 2020
2 parents 178464e + 8a8ea9b commit 3ea55cd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 14 additions & 1 deletion etc/encoding/opencast-movies.properties
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ profile.import.silent.name = Generate silent audio tracks for filling gaps
profile.import.silent.input = nothing
profile.import.silent.output = audio
profile.import.silent.suffix = -silent-audio.mp4
profile.import.silent.ffmpeg.command = -strict -2 -filter_complex aevalsrc=0::d=#{time} -c:a aac -b:a 8k #{out.dir}/#{out.name}#{out.suffix}
profile.import.silent.ffmpeg.command = -strict -2 -filter_complex aevalsrc=0:d=#{time} -c:a aac -b:a 8k #{out.dir}/#{out.name}#{out.suffix}

# Transcode videos generated with opencast studio to cover some issues
# The video resolution should be reduced to maximum of 1080p.
Expand All @@ -184,3 +184,16 @@ profile.scale.fhd.framerate.fix.ffmpeg.command = -i #{in.video.path} \
-c:v libx264 -crf 21 \
-movflags +faststart \
#{out.dir}/#{out.name}#{out.suffix}

# Editor
# This profile is used as a preview and work copy for the video editor.
# The gnonlin component in the gstreamer based video editor modules needs
# an mp4 codec to work reliable. This could also be used for the web preview
# although the file might be quite large for web distribution

profile.editor.work.name = editor
profile.editor.work.input = audiovisual
profile.editor.work.output = audiovisual
profile.editor.work.suffix = -editor.mp4
profile.editor.work.mimetype = video/mp4
profile.editor.work.ffmpeg.command = -i #{in.video.path} -shortest -c:v libx264 -preset superfast -pix_fmt yuv420p -crf 18 -c:a aac -strict -2 -b:a 196k #{out.dir}/#{out.name}#{out.suffix}
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,14 @@ private WorkflowOperationResult concat(MediaPackage src, WorkflowOperationInstan
queueTime += checkForTrimming(mediaPackage, trimProfile, deriveAudioFlavor(targetPresenterFlavor),
trackDurationInSeconds, elementsToClean);

// New: Mux within presentation and presenter
queueTime += checkForMuxing(mediaPackage, targetPresenterFlavor, deriveAudioFlavor(targetPresenterFlavor), false, elementsToClean);
queueTime += checkForMuxing(mediaPackage, targetPresentationFlavor, deriveAudioFlavor(targetPresentationFlavor), false, elementsToClean);

adjustAudioTrackTargetFlavor(mediaPackage, targetPresenterFlavor);
adjustAudioTrackTargetFlavor(mediaPackage, targetPresentationFlavor);

// Mux between presentation and presenter? Why?
queueTime += checkForMuxing(mediaPackage, targetPresenterFlavor, targetPresentationFlavor, false, elementsToClean);

queueTime += checkForEncodeToStandard(mediaPackage, forceEncoding, forceProfile, requiredExtensions,
Expand Down Expand Up @@ -1001,6 +1006,7 @@ private Attachment extractImage(Track presentationTrack, double time, List<Media
private Attachment extractLastImageFrame(Track presentationTrack, List<MediaPackageElement> elementsToClean)
throws EncoderException, MediaPackageException, WorkflowOperationException, NotFoundException {
VideoStream[] videoStreams = TrackSupport.byType(presentationTrack.getStreams(), VideoStream.class);

Map<String, String> properties = new HashMap<String, String>();
properties.put("frame", Long.toString(videoStreams[0].getFrameCount() - 1));

Expand Down

0 comments on commit 3ea55cd

Please sign in to comment.