scriptGenerator['laststep-same-codec'] = function(params) {
var id = params.userName.facebookID;
var script = '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip02final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate2.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip03final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate3.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip05final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate5.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip07final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate7.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip09final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate9.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip11final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate11.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip13final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate13.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip14final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate14.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip15final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate15.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip16final.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts prod/' + id + '/output/intermediate/intermediate16.ts -y' + endOfLine;
script += '/root/bin/ffmpeg -i "concat:input/intermediate/intermediate1.ts|prod/' + id + '/output/intermediate/intermediate2.ts|prod/' + id + '/output/intermediate/intermediate3.ts|input/intermediate/intermediate4.ts|prod/' + id + '/output/intermediate/intermediate5.ts|input/intermediate/intermediate6.ts|prod/' + id + '/output/intermediate/intermediate7.ts|input/intermediate/intermediate8.ts|prod/' + id + '/output/intermediate/intermediate9.ts|input/intermediate/intermediate10.ts|prod/' + id + '/output/intermediate/intermediate11.ts|input/intermediate/intermediate12.ts|prod/' + id + '/output/intermediate/intermediate13.ts|prod/' + id + '/output/intermediate/intermediate14.ts|prod/' + id + '/output/intermediate/intermediate15.ts|prod/' + id + '/output/intermediate/intermediate16.ts|input/intermediate/intermediate17.ts" -c copy -bsf:a aac_adtstoasc prod/' + id + '/output/final-pre.mp4 -y' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/final-pre.mp4 -qscale 5 -strict experimental -threads 4 -vcodec libx264 -preset medium -crf 24 -vf scale=640:-1 prod/' + id + '/output/final-!.mp4 -y';
return script;
};
Esta es la forma en la cual concatenamos todos los videos.
Primer de cada uno donde los ponemos en el mismo encoding
"-c copy -bsf:v h264_mp4toannexb -f"
luego le aplicamos al final
"-c copy -bsf:a aac_adtstoasc"
y finalmente le bajamos la calidad
" -qscale 5 -strict experimental -threads 4 -vcodec libx264 -preset medium -crf 24 -vf scale=640:-1 "
Primer de cada uno donde los ponemos en el mismo encoding
"-c copy -bsf:v h264_mp4toannexb -f"
luego le aplicamos al final
"-c copy -bsf:a aac_adtstoasc"
y finalmente le bajamos la calidad
" -qscale 5 -strict experimental -threads 4 -vcodec libx264 -preset medium -crf 24 -vf scale=640:-1 "
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.