Summary: | Unable to export image sequence due to wrong symbol interpretation | ||
---|---|---|---|
Product: | [Applications] kdenlive | Reporter: | Laptander <dev-laptander> |
Component: | Rendering & Export | Assignee: | Jean-Baptiste Mardelle <jb> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | dev-laptander |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 15.12.0 | |
Sentry Crash Report: | |||
Attachments: | Screenshot while rendering images sequence |
Description
Laptander
2015-10-02 15:09:01 UTC
Created attachment 94810 [details]
Screenshot while rendering images sequence
You can see, that frame which is rendering at the moment is not called "untitled_00001.png", but "untitled_d.png"
I explored a source code a bit and possibly can suggest where is the error. If you see at https://github.com/KDE/kdenlive/blob/master/renderer/kdenlive_render.cpp#L78, you can see QUrl desturl = QUrl::fromEncoded(args.takeFirst().toUtf8()); QString dest = desturl.path(); Why argument string is encoded to utf8? Is'nt is already utf8? And why then it is again extracted a path? Why just not as any other arguments: QString dest = args.takeFirst(); Anyway, before line #112 there is debug output, and I can see in terminal window the following: //STARTED RENDERING: bla-bla-bla "/home/user/untitled_\u0005d.jpg" bla-bla-bla "\u" is an escape sequence, that interpretes the folloving four characters as a number of unicode symbol. And I think here the problem has already happened. Does such file name should be outputed here? Possibly relevant: https://github.com/KDE/kdenlive/blob/master/src/project/dialogs/projectsettings.cpp#L575 - something about image sequences https://github.com/KDE/kdenlive/blob/master/src/dialogs/renderwidget.cpp#L977 - adding "_%05d" /src/renderer.h /renderer/renderjob.cpp /src/project/jobs/jobmanager.cpp I have replaced QUrl desturl = QUrl::fromEncoded(args.takeFirst().toUtf8()); QString dest = desturl.path(); to QString dest = args.takeFirst(); compiled from sources and tnen I could export images sequences! But I have noticed two things: 1) while rendering, dialog window do not show currently rendering number of frame, but just a single job. I think at first line in rendering window there should be displayed sequence job and at the second it should display currently rendering frame. 2) In target folder along with exported frames (untitled_00001.jpg, ...), I can also find a corrupted file called untitled_%05d.jpg. Of cource I can delete it, but I think that should be fixed. So, for this bug to be fixed make described above changes in source code. As I already said, I cannot understand, why we first make QUrl from QString? We should not decode that "%05", right? And then from that QUrl we make QString with path() method. What is the silly reason? By the way, if that convertation is really needed for some reason, it is wrong anyway. At line #77 we have QUrl::fromEncoded(args.takeFirst().toUtf8()), but according to http://doc.qt.io/qt-5/qurl.html#fromEncoded, this constructor expects ASCII only characters, but utf8 could contain non ascii characters. This bug is happening due to path() http://doc.qt.io/qt-5/qurl.html#path at line #78 https://github.com/KDE/kdenlive/blob/master/renderer/kdenlive_render.cpp#L78 Maybe we need to give it another (which?) formatting option? Default is FullyDecoded, which is not our case. http://doc.qt.io/qt-5/qurl.html#ComponentFormattingOption-enum Hello, Thanks for investigating this issue. Problem should be fixed by my last commit in branch 15.12 (that will be released as Kdenlive 15.12 in december): https://quickgit.kde.org/?p=kdenlive.git&a=commit&h=4186cc41deacb52ca61ffe99d2b20472464ec4fe Testing welcome. Hello, Jean-Baptiste Mardelle. Thank you for your work. I have just compiled and installed a new version kdenlive 15.11.80 from commit c7edc15 Behavior with rendering images sequenses is the same (except I have noticed new rendering profiles) as I described above: 1) while rendering, it is only displayed the whole job name, but not frame number. Maybe it is meant to be so. 2) Still appears corrupted file which is named untitled_%05d.png. That should be removed. Hi Laptander, Thanks for the feedback. I can confirm that the minor problems described in 1) and 2) still occur. However, for me the images sequence is correctly rendered. Can you confirm if the sequence is rendered or not ? Also if it does not work, which FFmpeg or Libav version are you using? Yes, except minor problems, images sequences are renderable for me too. Git commit 00b82e517919e71cf83a886db993a4ac93e66357 by Jean-Baptiste Mardelle. Committed on 22/11/2015 at 15:51. Pushed by mardelle into branch 'Applications/15.12'. Small cleanup and don't create useless render file M +5 -5 renderer/renderjob.cpp M +16 -20 src/dialogs/renderwidget.cpp M +1 -1 src/dialogs/renderwidget.h http://commits.kde.org/kdenlive/00b82e517919e71cf83a886db993a4ac93e66357 Thank you! Now there is no even corrupted file. I think now I can close that bug report. |