-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rhubarb executable can generate cues from audio file but Capture does not generate cues inside Blender #8
Comments
I notice that when I click Capture button inside the plugin/inside blender, it says "Capture (Running)" and runs, but when it finishes, it never says "complete" or anything, it just says "Capture (Running)" still. This leads me to think it may be an issue with me using a longer audio file (about a minute of audio) and may be related to multithreading or the background process not finishing properly. Also tried running as administrator thinking it might be a permissions issue somehow but no dice. So I guess I need to find the code that handles the finishing task. |
I put a print statement that prints 'TRYING SOMETHING THAT MIGHT BLOCK' and 'FINISHED SOMETHING THAT MIGHT BLOCK' as so:
When progress gets to 100%, it prints TRYING SOMETHING THAT MIGHT BLOCK and then does not print the line about FINISHED. So I think the problem is that this section blocks:
How to fix this is an issue I am currently struggling with. |
Ok, I fixed my own issue. I added a check to see if progress had reached 100% and if so, prevent it from reading further from In my case, I just replace
|
same here, after loading the audio file in the addon and when I click the capture, it works fine but nothing happens. Not binding to the rig or the mesh. |
Thanks @davebs for checking this and finding where the issue is. For me this happens when the output json is bigger that the system pipe buffer size. On my box it is 64kb which means any audio longer ~4 minutes blocks the I've put the sdtin reader on a separate thread to be safe. Would be great if you could test the v1.0.2 release if it still fixes your original issue. @okikiola12 Just to be sure, did you also get an empty list after the Capture process finished? If so, please try the latest version above. Note after you get the cues captured you still need to proceed to the second tab to do the actual mapping and baking |
I will test the updated version later, I notice @okikiola12 seems to be experiencing the same issue as I did where the capture is still listed as Running so isn't returning from execution. In my hacky fix, I remember even after I got it to stop the process, I still needed to do self.process.stdout.readlines() to get the JSON which then gets read and put into the cue list. So basically, even if stderr gets fully read, the json from stdout wasn't being read out so I wasn't seeing anything appear.
I'm busy on some other things today but I will give the updates a try soon. |
Guys can make small tutorial, i have did everything as official repo but still struggling to understand i'm i doing everything correct or wrong |
Sorry, |
@davebs Indeed when the @okikiola12
This is how the trace looks from a normal run: INFO:rhubarb_lipsync.rhubarb.rhubarb_command:Starting process
['/home/premik/.config/blender/3.6/scripts/addons/rhubarb_lipsync/bin/rhubarb', '-f', 'json', '--machineReadable', '--extendedShapes', 'GHX', '-r', 'pocketSphinx', '/home/premik/Desktop/Blender/../../../../wrk/dev/rhubarb-lipsync/tests/data/en_male_electricity.ogg']
DEBUG:rhubarb_lipsync.blender.rhubarb_operators:Operator execute
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:Creating reader threads
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Entered _stdout_thread_run reader thread
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Entered _stderr_thread_run reader thread
INFO:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Application startup. Input file: /home/premik/Desktop/Blender/../../../../wrk/dev/rhubarb-lipsync/tests/data/en_male_electricity.ogg.
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 0%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 1%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 2%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 3%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 4%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 5%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 6%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=0
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=1
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=2
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=3
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=4
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=5
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=6
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 68%
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=69
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Progress: 100%
INFO:rhubarb_lipsync.rhubarb.rhubarb_command:Rhubarb: Application terminating normally.
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:Consumed stdout. Read 16 lines.
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Received PROGRESS=100
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Process finished
TRACE:rhubarb_lipsync.rhubarb.rhubarb_command:Process finished
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:_stderr_thread_run thread exit
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:_stdout_thread_run thread exit
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:Joining thread <Thread(StdOut, stopped daemon 139734449909760)>
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:Joining thread <Thread(StdError-StatusCheck, stopped daemon 139734422646784)>
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:Terminating the process <Popen: returncode: 0 args: ['/home/premik/.config/blender/3.6/scripts/addon...>
DEBUG:rhubarb_lipsync.rhubarb.rhubarb_command:Process terminated
INFO:rhubarb_lipsync.blender.rhubarb_operators:Operator finished
INFO:rhubarb_lipsync.blender.rhubarb_operators:Added 8 cues to the list
Info: Capture @0 Done @ACMOIDRE Is the quick start on the main page of any help? I know it is not that exciting like a video but there are some screecasts too.. |
A good job well done, However, this are the issues that I encountered. I downloaded the version 1.0.3 , after installations, I load the earlier wave file again. but it still persists. this time around the cue was captured and it was loaded successfully.. and, now, when click on the mapping. i was only able to see two rigs here.
however, when I dragged them, the my rig did not move... again find the attached text.. finally, one more thing, |
Thanks for testing this out and the very detailed description.
That is expected. Nothing was changed in the
That is interesting. It looks like there is some concurrency/racing issue if it sometimes works and sometimes doesn't for the same input. I'll try to run more tests to see if I would be able to reproduce this.
I see I really need to create some video with a real rig and test this out. But Faceit also have single long Action
These |
Hi @okikiola12
My understanding is the old poseLib has been completely removed and replaced by the inbuilt This lipsync plugin works with any
I'd like to add better Faceit support next. I've realized the
You have an active
To see the keyframes in the Dope sheet you need to further bake the NLA tracks to a new I've also added a video tutorial. My animation skills are horrible but I hope it would still help with the basic concepts.. |
Good stuff. Glad you figure it all out..
I think this could be done eventually. |
yes, I normally tweak the keyframe that is because, I work with wave audio that is mixed with many voices. and the rate at which the mouth and so other deformation bone open can be tweaks. once again, thanks for this addon. |
@Premik also looks at the baking aspect too. after baking, the blend file runs to gigabytes. one more thing, when trying to bring another the cue to the NLA an error was thrown as seen below. which is because I work with more than 1 character in blend scene. what I did was to rename them myself. and, I had do the other character in another blend file before. renaming the RLSP track before copying it. Again, I believe just like I said a few days ago, automating the baking action down to the dope or timeline keyframe might solve the conflict issues. finally, try to update your code to blender 4. although nothing breaks apart from those areas highlighted. Perfects working well on blender 4 as it was in blender 3.6 |
ok, I will have to look at the Playback Scale and Blend In/Out again. it only becomes way bigger in the final bake of the two NLA tracks into a single Action. I am referring to the very old addon for reference sake. ok, I will try these two steps here.
I hope it fixes the memory increase. The Remove strips button was clicked on the new character even when the NLA had never been baked on the new character. yes, I think. combining the NLA track to a single one should fix it I believe. yeah, I tried that too. yeah, please have a look at the track selection. An error popped up in the first version. blender 4.0. however, I have tried to install it again in the latest version 4.01. Thanks for this add-on. I believe all these are little fixes. |
perfect now, the blend file reduced drastically from 2.3 GB to 230 MB. that is, the baked keyframe are now seen in the dope sheet and timeline, i believe the conflict issues will be resolved as well since NLA track can be deleted. haven't tried it with multiple characters but I believe it will be resolved. just one area remaining, that is if it is possible though. All I can say is a good job well done. |
I assume the files you tried have different format (stereo/mono). But to be sure please also try to convert the file via the plugin. As it sets the format to the one known to work with the rhubarb binary:
You can also inspect the If still no luck enable more verbose logs and save them to a file:
|
@Premik it work with blender 4.0 ? Maybe i need only some speshial verion without else addons? (have no idea.. ) |
Seems you do all right. So have no clue at this stage why it doesn't show any Actions. It should work with any recent Blender (3.5 to 4.3) and I don't think there could be any inference with others plugins. Could you attach your test .blend file? I have Discord One more thing you could try: Open the Scripting Console and type @Tibodelanvale1 might be also worth trying the old v1.0.3 since these drop-downs are new. |
I will have to test the latest version myself. from the last release. there haven't been any issues from my end here. apart from the time taken to bake the NLA to the keyframe. there haven't been one. I think I have gotten used to the NLA editing before the final baking. it seems I prefer it now, which is understandable. again I hope the long-hour baking issues will be sorted now in this new version 1.1.. @Tibodelanvale1 you can always try this site for converting your audio to wave files. |
@Premik |
well, from my own end here. @Tibodelanvale1 what type of rig are using rigify or some paid one ? |
@okikiola12 |
@ Tibodelanvale1 Thanks for the file. It was really helpful. Btw did you found what was the original issue with the ogg file? Was it stereo vs mono or something else? There is already a check for bitrates |
Hi @okikiola12
Would be good to have some steps to reproduce this eventually if a fix is desired. I assume it this not a blocking issue anyway.
That is pretty insane :-) Those 4 hours is the file
Yes, please go ahead. You don't need my permission to do that if I understand you correctly. Btw I'm (slowly) working on direct Faceit integration so it would be much easier to use then. This new Action drop-down was a prerequisite.
Well done. Any bigger project from Blender Studio I opened used this Nobody Likes Animator. So I assumed it is what everybody use.. :)
Have to crash your expectations since there were no changes in that area...
Blender is actually pretty capable in converting between various audio formats. But the convert buttons are only shows when the plugin thinks the sound format is not compatible (unless forced in the preferences). |
@Premik hi! |
alright, |
@Premik The auto blend in & out seems to be removed in v 1.2.1. |
Hi @okikiola12 Either way you can simply enable Auto Blend on the strip properties after the baking is done:
|
@Premik enables that makes the mouth to open and close naturally. without it. lip will be synced like a robot (i.e. opening and closing of the mouth in an unrealistic way). |
@okikiola12 I see what you mean. The new strip-placing/baking method should produce better results out-of-the box with less tweaks. Still wip: NewBakingPreview2.mp4 |
@Premik yh, the video you shared seam to be corrupted. please share again
@Premik yh, the video you shared seam to be corrupted. please share again |
@okikiola12 Seems FF doesn't like the video format but Chrome is ok. This one is with slightly different parameters: 2.mp4It is just a short preview anyway. I'll created another one with proper description later. I think the main reason for this robotic look is when the animation "freeze", ie. doesn't change on several consequential frames. The new baking methods address this better. |
looking at my attached two pictures here, I think I understand your point. but without the auto blend in/out the mouth will open and close quickly after each frame range. but with auto blend, it keeps the mouth and also mixes the frame. e.g, if A is open wide and B is O shape, instead of having the mouth close and open to O. the mouth will only close a little automatically and open in O shape again. |
I think I see your point now. I've already added the auto-blend flag back in the last code-base (not released yet). I didn't realize blending of two adjacent strips only make sense when they overlap. Otherwise the strip actually mix/blend with some default pose. And that makes the mouth closing and opening in between cues. |
yeah, |
Hello, I am having a bit of a strange issue. I am using Blender 3.5
The problem is that when I load an audio file into rhubarb in blender and run Capture, it goes through progress and then at the end nothing happens and no error message is returned. Cues are not generated.
I tried troubleshooting by verifying that rhubarb.exe can generate cues from the same audio file, and it does. I can see the desired cues print out to the console by running
rhubarb -r pocketSphinx PATH_TO_WAV_FILE
Is there anything I can do to better troubleshoot or does anyone have any ideas for what I might try instead? Thank you!
The text was updated successfully, but these errors were encountered: