Git Product home page Git Product logo

pulverize's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pulverize's Issues

png export

With some refines I think It could also work for png exports :)

I tested exporting and works! Just at the end It shouldn't merge because the images need to be separated =)

png exports are usefull when going' for compositing or something intense need to be exported.

Check for temp files and offer to clean before starting

I started the script on my blender project file, realized a mistake and stopped the script shortly. There're partial temp files left in the output directory as a result (1-2 second videos). On the next run after some modifications to the video length, the second phase of course picked up those partial temp files and assembled them into the final video. Luckily I reviewed and spotted those weird 1-2 second flashes in the middle of the video before publishing it.

Since we can't reliably identify the filename generated by Blender, maybe we should attempt to detect any existing temp files before starting (at least they are pulverize_frames_*) and warn user to move or delete them?

I'll see if I have some time to make that improvement before someone else does :-)

Support for script option

Pulverize works, but could it be made to work with a script option

IE pulverize project.blend -P 'somescript.py'

It would be a fantastic asset animated tiles in OpenShot

movatom faststart option

For mp4 and mov containers we can add -movflags faststart for better streaming and faster processing/publishing on YouTube (presumably other video hosting services as well).

I can add a flag with a pull request, but it seems like something that could just be tossed into the source in both scripts without any problems.

PHP Notices

So, I am using pulverize on Windows 10 but am getting tons of PHP notices. attached is a screenshot.
capture

Python: fails at concatenation stage, no pulverize_input_files.txt

I tried Pulverize Python version today and it rendered the individual chunks fine, but then crashed and left them unconcatenated:

(...)
INFO:pulverize:Render processes complete.
Traceback (most recent call last):
  File "./pulverize.py", line 146, in <module>
    join_chunks(args, outdir)
  File "./pulverize.py", line 113, in join_chunks
    with open(file_list, 'w') as fp:
IOError: [Errno 2] No such file or directory: '//Render/pulverize_input_files.txt'

Apart from fixing this issue, what can I do right now to concatenate these files to not re-render the whole thing?

render problems with 2.79

This happens to me when rendering with the 2.79:
It renders out n files but it doesn't assemble them at the end and the files seems like corrupted..

could It be because of the output formats updates?
Addition:
the render path is not ./ but ../ a level higher..

testing on arch-linux. Latest build (17:2.79-2)

Adding flags

I'm very glad I found your Pulverize because otherwise Blender was going to fall second place to other video editors like openshot...

It works - I mean I can render my blender project utilising 4 cpu threads.

And I run it like this with (cheating) flags:
run-pulverize -ke4

where 'run-pulverize' is a bash script to check the command line for flags and then run Pulverize.php..

and I added yad to browse for the blender file so that the command need not be run only in the blender dir

#!/bin/bash

t=`echo "$*" | grep -Eo '[0-9]{1,}'`
if [[ $* == *-*k* ]] ; then keep=true ; else keep=false ; fi
if [[ $* == *-*e* ]] ; then err=true ; else err=false ; fi

pulverize.php "`yad --center --title='Choose a Blender file' --file \
--filename=$HOME/Projects/blender/ --height=400 --width=500`" $t \
'{\"keepTempFiles\":$keep,\"displayStdErr\":$err}'

If I knew PHP then perhaps I would try making this to work in the Pulverize script? unless its a bad way of doing flags.

anyway, at least I can clear up the command line this way

the problem is that ffmpeg error messages don't display if the threads argument is given - and without it they do show.
Also the script output always shows "Removing temporary video files..." whatever the keepTempFiles value is.

ffmpeg doesn't like the generated pulverize_input_files.txt generated on windows

My generated pulverize_input_files.txt file looks like this:

file /tmp\pulverize_frames_0000317-0000502.mp4
file /tmp\pulverize_frames_0000503-0000688.mp4
file /tmp\pulverize_frames_0000689-0000874.mp4
file /tmp\pulverize_frames_0000875-0001060.mp4
file /tmp\pulverize_frames_0001061-0001246.mp4
file /tmp\pulverize_frames_0001247-0001432.mp4
file /tmp\pulverize_frames_0001433-0001618.mp4
file /tmp\pulverize_frames_0001619-0001807.mp4

ffmpeg seems to interpret the \ as an escape sequance with the p next to it. Manually adding a second \ and calling the ffmpeg command manually works.

I was looking for a solution to make this not a manual process and I came up with changing the join code as follows:

with open(file_list, 'w') as fp:
        fp.write('\n'.join(["file %s" % x.replace('\\', '\\\\') for x in chunk_files]))

But I do not think this is idea because I believe this will now only work on windows. On Linux I believe \ is used to escape spaces in file names and my change might break it.

I'm looking for feedback so I can contribute a PR with a good fix.

The file are not well established in linux

I like the idea of this program, as it resolves my main issue with blender on a 16 thread CPU. However, currently I manually concatenate the files after the render phase.

I am on Arch Linux with everything currently up to date.

The issues so far that I encounter are as follows:

  • All of the files are placed in my home directory (instead of where the project is placed), and are not removed afterwards.
  • The automatic concat phase fails dramatically because of the previous issue.

Here is the output:

BlenderEdits/pulverize/pulverize.php BlenderEdits/LakeProject.blend 16
Pulverize - A multi-process rendering script for Blender VSE.
Version 1.1
Copyright 2017 Hunter Perrin
Licensed under GPL, just like Blender.
PHP Warning: Invalid argument supplied for foreach() in /home/andrew/BlenderEdits/pulverize/pulverize.php on line 103

It looks like your machine has 16 logical processor(s). The default is to use half the number of logical processors reported by the system, with a max of 6.

Read from Blender file --
startFrame: 1
endFrame: 2838
outputDir: /home/andrew/BlenderEdits

Calculated these values for render --
frameLength: 2838
processCount: 16
processFrameCount: 177
remainderFrames: 6

Each process will render 177 frames, except the last will render an extra 6 frame(s).

####################################################################################################################################

Step 1/2 Rendering with Blender

####################################################################################################################################

Progress: 2838 / 2838 frames, 100.00%
Elapsed time: 0:02:38, Remaining time: 0:00:00
===================================================================================================================================>

####################################################################################################################################

Step 2/2 Concatinating videos with FFMPEG

####################################################################################################################################

ls: cannot access 'pulverize_frames_*': No such file or directory
PHP Notice: Undefined offset: 1 in /home/andrew/BlenderEdits/pulverize/pulverize.php on line 226
$ ffmpeg -v error -y -stats -f concat -i pulverize_input_files.txt -c copy 0000001-0002838.
[concat @ 0x561aceabe5e0] Impossible to open ''
pulverize_input_files.txt: No such file or directory

Removing temporary video files...
PHP Warning: unlink(/home/andrew/BlenderEdits/): Is a directory in /home/andrew/BlenderEdits/pulverize/pulverize.php on line 239

####################################################################################################################################

All done!

####################################################################################################################################

Total time: 0:02:38
Blender time: 0:40:52

You saved this much time by running this script instead of rendering directly from Blender's VSE:
0:38:14

Audio pauses introduced in ouput video file.

Very short audio pauses (we're talking about miliseconds) are introduced into the output file every 1-2 seconds in a 17sec rendered video.

Pulverize was set up as instructed in the README file (using the php version). The following command was used:

pulverize spot.blend 8

System info

OS     : Manjaro Linux
Kernel : 4.17
CPU    : i7-4790K
RAM    : 16GB
GPU    : Nvidia GTX 770

Blender info

Blender  : 2.79 (sub 4)
Output   : FFmpeg video | RGB
Encoding :
    Contain        : MPEG-4
    Video Coded    : H.264
    Output quality : Lowest quality
    Encoding speed : Realtime
    Audio Codec    : MP3
    Bitrate        : 192

Is there anything I can change to make this work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.