Resolves #83; Adds the -hwaccel auto flag to all ffmpeg output commands. May not be used unless the source video is an accelerated format.
This commit is contained in:
parent
bc081cfe63
commit
4dc988c5bb
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -125,7 +125,7 @@ class FFMPEG {
|
||||||
return tmpoutput;
|
return tmpoutput;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
cmd = `${this.bin} -y -i "${video}" -vf "select='gte(n\\,${frameNum})'${scale}" -vframes 1 -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
cmd = `${this.bin} -hwaccel auto -y -i "${video}" -vf "select='gte(n\\,${frameNum})'${scale}" -vframes 1 -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
||||||
//cmd2 = `${this.convert} "${tmpoutput}" -resize ${w}x${h} -size ${w}x${h} xc:"rgb(${rgb[0]},${rgb[1]},${rgb[2]})" +swap -compose Darken -composite "${tmpoutput}"`;
|
//cmd2 = `${this.convert} "${tmpoutput}" -resize ${w}x${h} -size ${w}x${h} xc:"rgb(${rgb[0]},${rgb[1]},${rgb[2]})" +swap -compose Darken -composite "${tmpoutput}"`;
|
||||||
//ffmpeg -i "${video}" -ss 00:00:07.000 -vframes 1 "export-${time}.jpg"
|
//ffmpeg -i "${video}" -ss 00:00:07.000 -vframes 1 "export-${time}.jpg"
|
||||||
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "export-%05d.tiff"
|
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "export-%05d.tiff"
|
||||||
|
@ -174,6 +174,8 @@ class FFMPEG {
|
||||||
let estimated = -1;
|
let estimated = -1;
|
||||||
//cmd = `${this.bin} -y -i "${video}" -vf "${scale}" -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
//cmd = `${this.bin} -y -i "${video}" -vf "${scale}" -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
||||||
args = [
|
args = [
|
||||||
|
'-hwaccel',
|
||||||
|
'auto',
|
||||||
'-y',
|
'-y',
|
||||||
'-i', video
|
'-i', video
|
||||||
];
|
];
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alert": "file:app/lib/alert",
|
"alert": "file:app/lib/alert",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"description": "Small gauge film optical printer platform",
|
"description": "Small gauge film optical printer platform",
|
||||||
"main": "build.js",
|
"main": "build.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.117",
|
"version": "1.8.118",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -163,7 +163,7 @@ export class FFMPEG {
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
cmd = `${this.bin} -y -i "${video}" -vf "select='gte(n\\,${frameNum})'${scale}" -vframes 1 -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
cmd = `${this.bin} -hwaccel auto -y -i "${video}" -vf "select='gte(n\\,${frameNum})'${scale}" -vframes 1 -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
||||||
//cmd2 = `${this.convert} "${tmpoutput}" -resize ${w}x${h} -size ${w}x${h} xc:"rgb(${rgb[0]},${rgb[1]},${rgb[2]})" +swap -compose Darken -composite "${tmpoutput}"`;
|
//cmd2 = `${this.convert} "${tmpoutput}" -resize ${w}x${h} -size ${w}x${h} xc:"rgb(${rgb[0]},${rgb[1]},${rgb[2]})" +swap -compose Darken -composite "${tmpoutput}"`;
|
||||||
|
|
||||||
//ffmpeg -i "${video}" -ss 00:00:07.000 -vframes 1 "export-${time}.jpg"
|
//ffmpeg -i "${video}" -ss 00:00:07.000 -vframes 1 "export-${time}.jpg"
|
||||||
|
@ -220,6 +220,8 @@ export class FFMPEG {
|
||||||
//cmd = `${this.bin} -y -i "${video}" -vf "${scale}" -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
//cmd = `${this.bin} -y -i "${video}" -vf "${scale}" -compression_algo raw -pix_fmt rgb24 -crf 0 "${tmpoutput}"`;
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
|
'-hwaccel',
|
||||||
|
'auto',
|
||||||
'-y',
|
'-y',
|
||||||
'-i', video
|
'-i', video
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue