FfmpegEncodeVideo bug ?

   3888   8   0
User Avatar
Member
123 posts
Joined: May 2015
Offline
Hi there,

I was playing around with a simple topnet to execute multiple wedges, capture in OpenGL, assemble in ImageMagick, and finally output a MP4.

I am using multiple drive : one for the scenes (V), one for the caches, one for the images (W). The whole rig works, simulation works, wedges work, capture works, all partitions work.
However, the way PDG and the Ffmpegencodevideo node are done seems to be preventing from ffmpeging accross multiple drives, resulting in the following errors on the ffmpegencodevideo node :

Traceback (most recent call last):
File “V: /FX_RND/WORK/film/LIBFXS/olivierc/scenes/fx/pdgtemp/6000/scripts/ffmpeg.py”, line 222, in <module>
main()
File “V: /FX_RND/WORK/film/LIBFXS/olivierc/scenes/fx/pdgtemp/6000/scripts/ffmpeg.py”, line 214, in main
encodevideo(workitem, callbackserver)
File “V: /FX_RND/WORK/film/LIBFXS/olivierc/scenes/fx/pdgtemp/6000/scripts/ffmpeg.py”, line 164, in encodevideo
framepath = os.path.relpath(localimage, os.path.dirname(framelistfile))
File “C: /PROGRA~1/SIDEEF~1/HOUDIN~1.7/python27\lib\ntpath.py”, line 529, in relpath
% (path_prefix, start_prefix))
ValueError: path is on drive W:, start on drive V:

I actually had a RFE posted about this but thought I could bring it here on the forums in case a simple workaround can be done, or just in case I misunderstood something in the process. Im' not very knowledgeable with Python sadly, so I can't really delve in the PY files to check for the root of the issue !
Edited by Wolrajh - March 14, 2019 06:32:20
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
This is a limitation of how FFmpeg works. The node will create a frame list file which has a list of all the frames that will be inputted to the ffmpeg operation. Unfortunately, the files listed in that file must be specified as a path relative to the frame list file, which means that for Windows if the images are on a different drive than the frame list file, it will fail.

One way of dealing with this would be to use the File Copy node before the FFmpeg node to copy all of the images to the same drive as where the V drive is located. If you do this, make sure you set the output file tag as “file/image”.

I will add some documentation to the node to make this more clear.
User Avatar
Member
123 posts
Joined: May 2015
Offline
Aaah, I see. I didn't know about this limitation, most of my previous uses of FFmpeg were, indeed, taking place in the same directory or at least the same drive as the source.

I guess the frame list file can only be created in the pdg folder, but one “fix” could be to either enable the user or automatically create that list in the folder containing the images. For now, taking advantage of the file copy and file remove nodes indeed sound like one solution.
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
Right now, the frame list file is always created in the PDG working directory, but I can add a parameter to the node that exposes where it gets created.
User Avatar
Member
123 posts
Joined: May 2015
Offline
BrandonA
Right now, the frame list file is always created in the PDG working directory, but I can add a parameter to the node that exposes where it gets created.

It would probably be a better option than potentially copying hundred of frames over the network only to delete them a few secs later

Ah, and thanks for your answers !
User Avatar
Member
123 posts
Joined: May 2015
Offline
Kind of bumping myself here, but I'm curious to know if this is still in the plans ; right now the best solution we found was to change the working directory on the localsheduler to where the images are stored ( eg Wimages ), duplicate that localscheduler, and tell the topnet to use it as the default scheduler.

Just changing the path on the initial localscheduler does not seem to work as it will still believes the pdg dir is on our drive with the scene ( eg Vscenes ) and try to use the filenamelist from V, until we restart Houdini. Duplicating and switching localschedulers out on the other will force the topnet to evaluate from W without having to reset the Houdini session.

Or we could edit the python and add some variables to make it save the filelist on whatever drive we need, but that's a little contrived

So obviously it's still very clunky, hence my little bump on that particular topic !
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
Hi – yes this is still in the plans. It should be going in soon. I will keep this thread updated!
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
This has been fixed and will be available in tomorrow's build (17.5.255). There is now a parameter that allows the location of the framelist file to be configured.
User Avatar
Member
26 posts
Joined: Dec. 2010
Offline
Houdini 17.5.229
by default have an error to build video with frame list
to fix that just simply `@pdg_input` works in mine case maybe someone help that

Thanks
Edited by cool1986vfx - April 20, 2019 11:58:38

Attachments:
PDG_Video_def.JPG (31.4 KB)
PDG_Video.JPG (29.8 KB)

  • Quick Links