Hi.
I work on a storyboard program.
In line 3-10, I make a series of png-images (640x480 pix), and numbers them "im_00001.png", "im_00002.png" etc. That part works fine.
void animatic::exportAnimatic()
{
int teller = 1;
for (int i = 0; i < pixmapList.size();i++){
QImage image
= pixmapList
[i
].
toImage();
for (int j = 0;j < infoList[i][frames].toInt();j++){
image.save(projFilePath + sceneDir + "/" + sceneDir +
tr
("_%1.png",
"DO NOT TRANSLATE").
arg(QString::number(teller
),
5,
'0'));
teller += 1;
}
}
sl << "-i " + projFilePath + sceneDir + "/" + sceneDir + "_%5d.png";
sl << "-r " + sr.setNum(fps) ;
sl << projFilePath + sceneDir + "/" + sceneDir + ".mp4";
qDebug() << sl;
proc.start("ffmpeg",sl);
int c = 1;
while (proc.state() > 0) {
sleep(5);
qDebug() << proc.state() << c;
c+=1;
}
qDebug() << proc.state() << " at the end...";
qDebug() << proc.exitCode() << " exitcode";
qDebug() << proc.error() << " error";
qDebug() << proc.errorString() << " errorstring";
}
void animatic::exportAnimatic()
{
int teller = 1;
for (int i = 0; i < pixmapList.size();i++){
QImage image = pixmapList[i].toImage();
for (int j = 0;j < infoList[i][frames].toInt();j++){
image.save(projFilePath + sceneDir + "/" + sceneDir +
tr("_%1.png","DO NOT TRANSLATE").arg(QString::number(teller),5,'0'));
teller += 1;
}
}
QStringList sl;
sl << "-i " + projFilePath + sceneDir + "/" + sceneDir + "_%5d.png";
QString sr;
sl << "-r " + sr.setNum(fps) ;
sl << projFilePath + sceneDir + "/" + sceneDir + ".mp4";
qDebug() << sl;
proc.start("ffmpeg",sl);
int c = 1;
while (proc.state() > 0) {
sleep(5);
qDebug() << proc.state() << c;
c+=1;
}
qDebug() << proc.state() << " at the end...";
qDebug() << proc.exitCode() << " exitcode";
qDebug() << proc.error() << " error";
qDebug() << proc.errorString() << " errorstring";
}
To copy to clipboard, switch view to plain text mode
It works fine untill it starts the proc (QProcess).
Here are the debug-messages:
("-i /home/david/tegnefilm/david2/h3/h3_%5d.png", "-r 25", "/home/david/tegnefilm/david2/h3/h3.mp4")
2 1 (while-loop)
2 2 (while-loop)
0 3 (while-loop)
0 at the end...
1 exitcode
5 error
"Ukendt fejl" errorstring ("Unknown error")
("-i /home/david/tegnefilm/david2/h3/h3_%5d.png", "-r 25", "/home/david/tegnefilm/david2/h3/h3.mp4")
2 1 (while-loop)
2 2 (while-loop)
0 3 (while-loop)
0 at the end...
1 exitcode
5 error
"Ukendt fejl" errorstring ("Unknown error")
To copy to clipboard, switch view to plain text mode
If I run:
ffmpeg -i /home/david/tegnefilm/david2/h3/h3_%5d.png -r 25 /home/david/tegnefilm/david2/h3/h3.mp4
in a terminal, it produces a fine mp4-file.
ffmpeg is in the path. I have run the the command from several positions, and it produces a mp4-video every time.
I have also tried to write "/usr/bin/ffmpeg" as the command in line 18, but with the same error messages.
Can anyone help here?
Bookmarks