DeepMosaics icon indicating copy to clipboard operation
DeepMosaics copied to clipboard

voice_tmp.mp3: No such file or directory

Open AlonDan opened this issue 4 years ago • 3 comments

I'm getting the same error for both versions CPU and GPU

It seem like the process starts fine, it does the processing, shows the preview, and real quick playing the video at the end but then it will drop this quick error in RED and close CMD right away.

When trying to clean or add mosaic to a video, this error at the very last step appears real quick and close CMD so I had to capture it in order to see what was the error and why the video is not on the result directory.

Deepmosaic - ERROR

Is there a fix I need to do to get rid of this error?

AlonDan avatar Oct 11 '20 01:10 AlonDan

I encountered the same problem and it truns out that the original video does not contain audio track. In that case, there is no temporary audio output file voice_tmp.mp3 generated from the input file. You many have to change util/ffmpeg.py to remove the need for voice track.

def image2video(fps,imagepath,voicepath,videopath):
  os.system('ffmpeg -y -r '+str(fps)+' -i '+imagepath+' -vcodec libx264 '+os.path.split(voicepath)[0]+'/video_tmp.mp4')
  os.system('ffmpeg -i '+os.path.split(voicepath)[0]+'/video_tmp.mp4'+' -i "'+voicepath+'" -vcodec copy -acodec aac '+videopath)

To something like this:

def image2video(fps,imagepath,voicepath,videopath):
  os.system('ffmpeg -y -r '+str(fps)+' -i '+imagepath+' -vcodec libx264 '+os.path.split(voicepath)[0]+'/video_tmp.mp4')
  os.system('ffmpeg -i '+os.path.split(voicepath)[0]+'/video_tmp.mp4'+ ' -vcodec copy '+videopath)

dxxd116 avatar Feb 08 '21 05:02 dxxd116

Thanks @dxxd116 for trying to help here, but I couldn't find that ffmpeg.py on any of the DeepMosaics sub directories so I can try to replace the text as you suggested.

Maybe I should wait for a future version so it will also work with videos without sound?

AlonDan avatar Feb 09 '21 00:02 AlonDan

For any future person encountering this problem, I found a workaround: Use VLC to add a blank audio track to the input file, it'll then complete without the error :)

https://www.animaker.com/hub/how-to-add-audio-to-a-video/#vlc https://github.com/anars/blank-audio

Failquail avatar Jan 16 '24 15:01 Failquail