Skip to content

Commit

Permalink
TTK-27384: Adapt profiles to the new ones defined
Browse files Browse the repository at this point in the history
  • Loading branch information
albacodina committed Nov 28, 2024
1 parent 15f4b94 commit 77fb532
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function indexAction(MultimediaObject $multimediaObject): Response
return $this->notReadyToCut($multimediaObject, $msg);
}

$broadcastable_master = $this->profileService->getProfile('broadcastable_master');
$video_broadcastable = $this->profileService->getProfile('video_broadcastable');
$direct_track_url_exists = method_exists($this->trackUrlService, 'generateDirectTrackFileUrl');

return $this->render(
Expand All @@ -118,7 +118,7 @@ public function indexAction(MultimediaObject $multimediaObject): Response
'track' => $track,
'role' => $role,
'langs' => $this->pumukitLocales,
'broadcastable_master' => (bool) $broadcastable_master,
'video_broadcastable' => (bool) $video_broadcastable,
'direct_track_url_exists' => $direct_track_url_exists,
]
);
Expand Down Expand Up @@ -182,7 +182,7 @@ public function cutAction(Request $request, MultimediaObject $originalmmobject)
}

$track = $originalmmobject->getTrackWithTag('master');
$profile = $request->get('broadcastable_master') ? 'broadcastable_master_trimming' : 'master_trimming';
$profile = $request->get('video_broadcastable') ? 'video_broadcastable_trimming' : 'video_master_trimming';
$priority = 2;
$newDuration = $out - $in;
$parameters = ['ss' => $in, 't' => $newDuration];
Expand Down
21 changes: 12 additions & 9 deletions Resources/config/encoders.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pumukit_hard_video_editor:
profiles:
master_trimming:
video_master_trimming:
display: false
wizard: false
master: true
Expand All @@ -15,22 +15,26 @@ pumukit_hard_video_editor:
channels: 1
audio: false
bat: |
avconv -y -i "{{input}}" -acodec libfdk_aac -vcodec libx264 -preset slow -crf 15 -ss {{ss}} -t {{t}} -threads 0 "{{output}}"
ffmpeg -y -i "{{input}}" -acodec libfdk_aac -vcodec libx264 -preset slow -crf 15 -ss {{ss}} -t {{t}} -threads 0 "{{output}}"
sleep 15
streamserver:
name: Localmaster
type: store
host: 127.0.0.1
description: Local master server
dir_out: "%kernel.project_dir%/public/storage/masters"
app: avconv
app: ffmpeg
rel_duration_size: 1
rel_duration_trans: 1
downloadable: false
target:
broadcastable_master_trimming:
video_broadcastable_trimming:
generate_pic: false
display: true
wizard: false
master: true
wizard: true
master: false
tags: html5 podcast
target: PUCHWEBTV PUCHPODCAST
format: mp4
codec: h264
mime_type: 'video/x-mp4'
Expand All @@ -41,16 +45,15 @@ pumukit_hard_video_editor:
framerate: 25
channels: 1
audio: false
bat: |
avconv -y -i "{{input}}" -acodec libfdk_aac -vcodec libx264 -preset slow -crf 22 -movflags faststart -ss {{ss}} -t {{t}} -threads 0 "{{output}}"
bat: ffmpeg -y -i "{{input}}" -ss {{ss}} -t {{t}} -acodec libfdk_aac -vcodec libx264 -preset slow -crf 22 -movflags faststart -threads 0 "{{output}}"
streamserver:
name: Localhost
type: download
host: 127.0.0.1
description: Local download server
dir_out: "%kernel.project_dir%/public/storage/downloads"
url_out: "/storage/downloads"
app: avconv
app: ffmpeg
rel_duration_size: 1
rel_duration_trans: 1
downloadable: false
Expand Down
4 changes: 2 additions & 2 deletions Resources/views/Default/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@
</div>


{% if broadcastable_master %}
{% if video_broadcastable %}
<div class="checkbox">
<label style="padding-left:0">
<input type="checkbox" id="broadcastable_master" name="broadcastable_master" checked> {% trans %}Generate broadcastable master{% endtrans %}
<input type="checkbox" id="video_broadcastable" name="video_broadcastable" checked> {% trans %}Generate broadcastable master{% endtrans %}
</label>
</div>
{% endif %}
Expand Down

0 comments on commit 77fb532

Please sign in to comment.