Commit 4b464823a8069d32fd4beaea43e98bfc46b20144
1 parent
7c68d56f
Exists in
master
and in
1 other branch
Corrige codec da transcodificação mp4
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
mixer/src/Mixer.cpp
| @@ -119,9 +119,16 @@ void Mixer::mixVideos () { | @@ -119,9 +119,16 @@ void Mixer::mixVideos () { | ||
| 119 | " [out]\" -sameq -ar 22050 -ab 32 -f flv -acodec pcm_s16le -vcodec flv -threads "+this->numThreads+" "+nameOfMainVideo+"_Libras.flv";*/ | 119 | " [out]\" -sameq -ar 22050 -ab 32 -f flv -acodec pcm_s16le -vcodec flv -threads "+this->numThreads+" "+nameOfMainVideo+"_Libras.flv";*/ |
| 120 | 120 | ||
| 121 | //TRANSCODIFICAR PARA FLV | 121 | //TRANSCODIFICAR PARA FLV |
| 122 | + /* | ||
| 122 | string ffmpegSentence = "ffmpeg -i "+this->mainVideo+" -y -vf \"movie="+this->secondaryVideo+", "+ | 123 | string ffmpegSentence = "ffmpeg -i "+this->mainVideo+" -y -vf \"movie="+this->secondaryVideo+", "+ |
| 123 | "scale="+ num1String +":"+num2String+", setpts=PTS-STARTPTS, [movie] overlay"+transparency+"="+strPosition+ | 124 | "scale="+ num1String +":"+num2String+", setpts=PTS-STARTPTS, [movie] overlay"+transparency+"="+strPosition+ |
| 124 | " [out]\" -sameq -strict experimental -vcodec mpeg2video -r 30 -threads "+this->numThreads+" "+pathFinal; | 125 | " [out]\" -sameq -strict experimental -vcodec mpeg2video -r 30 -threads "+this->numThreads+" "+pathFinal; |
| 126 | + */ | ||
| 127 | + | ||
| 128 | + string ffmpegSentence = "ffmpeg -i "+this->mainVideo+" -y -vf \"movie="+this->secondaryVideo+", "+ | ||
| 129 | + "scale="+ num1String +":"+num2String+", setpts=PTS-STARTPTS, [movie] overlay"+transparency+"="+strPosition+ | ||
| 130 | + " [out]\" -sameq -strict experimental -vcodec libx264 -preset fast -r 30 -threads "+this->numThreads+" "+pathFinal; | ||
| 131 | + | ||
| 125 | 132 | ||
| 126 | 133 | ||
| 127 | /* | 134 | /* |
servico/src/serviceWindowGeneration.cpp
| @@ -258,7 +258,7 @@ void ServiceWindowGeneration::transcodeVideoToMp4() { | @@ -258,7 +258,7 @@ void ServiceWindowGeneration::transcodeVideoToMp4() { | ||
| 258 | //printf("[INFO]: A transcodificação para .mp4 está ativada!\n"); | 258 | //printf("[INFO]: A transcodificação para .mp4 está ativada!\n"); |
| 259 | string command = "ffmpeg -i "; | 259 | string command = "ffmpeg -i "; |
| 260 | command.append(path_libras) | 260 | command.append(path_libras) |
| 261 | - .append(" -strict experimental -vcodec mpeg2video -r 30 ") | 261 | + .append(" -sameq -strict experimental -vcodec libx264 -preset fast -r 30 ") |
| 262 | .append(PATH_API) | 262 | .append(PATH_API) |
| 263 | .append(getUserId()) | 263 | .append(getUserId()) |
| 264 | .append(".mp4"); | 264 | .append(".mp4"); |
| @@ -266,6 +266,7 @@ void ServiceWindowGeneration::transcodeVideoToMp4() { | @@ -266,6 +266,7 @@ void ServiceWindowGeneration::transcodeVideoToMp4() { | ||
| 266 | system(command.c_str()); | 266 | system(command.c_str()); |
| 267 | 267 | ||
| 268 | //.append(" -strict experimental -vcodec mjpeg -r 30 -pix_fmt yuvj422p ") | 268 | //.append(" -strict experimental -vcodec mjpeg -r 30 -pix_fmt yuvj422p ") |
| 269 | + //.append(" -strict experimental -vcodec mpeg2video -r 30 ") | ||
| 269 | 270 | ||
| 270 | } | 271 | } |
| 271 | } | 272 | } |