Closed nitinmukesh closed 3 days ago
In DM_3\test_demo\test_VIDEO_hdtf_df_wpose_face_cond_init_ca_newae_ood_256_2.py
line 99:
directory_name = (args.source_img_path).split('/')[-1].split('.')[0]
the .split('/')
should be replaced to .split('\')
for windows system.
The ffmpeg has no permission to create a directory I suppose.
Thank you for pointing it out. I need to explain this in the readme.
I tried .split('\') as single backslash will escape '.
Still same error
[out#0/mp4 @ 000001ba5a234a80] Error opening output cache\ood_test_1009\real_female_1\video\cache\target_audio.mp4: No such file or directory Error opening output file cache\ood_test_1009\real_female_1\video\cache\target_audio.mp4. Error opening output files: No such file or directory Permission denied: Unable to delete C:\ai\DAWN-pytorch\tmpyscct4sk.wav. Permission denied: Unable to delete C:\ai\DAWN-pytorch\tmpdi7uxexc.mp4.
Plus, it seems that you missed the first step (using 3DDFA to extract the initial state of the portrait). Although I use a default value in the code when the initial state is missing, it will usually cause worse results. If you have any problems when extracting the initial states, please let me know.
I intend to save the video in cache\ood_test_1009\real_female_1\video\target_audio.mp4
, maybe you should check the similar problem in DM_3\test_demo\test_VIDEO_hdtf_df_wpose_face_cond_init_ca_newae_ood_256_2.py
, such as line 238.
I will try to think of a way that is compatible with the Windows platform.
For the time being solved the issue using
directory_name = (args.source_img_path).split('\\')[-1].split('.')[0]
CKPT_DIR = os.path.join(args.save_path, directory_name ,'video')
os.makedirs(CKPT_DIR, exist_ok=True)
IMG_DIR = os.path.join(args.save_path, directory_name, 'img')
os.makedirs(IMG_DIR, exist_ok=True)
VID_DIR = os.path.join(CKPT_DIR, 'cache')
os.makedirs(VID_DIR, exist_ok=True)
Input #0, wav, from 'C:\ai\DAWN-pytorch\tmpry627sy_.wav':
Duration: 00:00:08.00, bitrate: 256 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, 1 channels, s16, 256 kb/s
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\ai\DAWN-pytorch\tmpv7prl144.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.76.100
Duration: 00:00:08.00, start: 0.000000, bitrate: 131 kb/s
Stream #1:0[0x1](und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 128x128 [SAR 1:1 DAR 1:1], 129 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #1:0 -> #0:0 (copy)
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'cache\\ood_test_1009\real_female_1\video\cache\target_audio.mp4':
Metadata:
encoder : Lavf60.16.100
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 128x128 [SAR 1:1 DAR 1:1], q=2-31, 129 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc60.31.102 aac
[out#0/mp4 @ 000001ca83c051c0] video:127kB audio:80kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.370734%
size= 212kB time=00:00:07.96 bitrate= 218.2kbits/s speed= 25x
[aac @ 000001ca83c18f40] Qavg: 63553.680
Permission denied: Unable to delete C:\ai\DAWN-pytorch\tmpry627sy_.wav.
Permission denied: Unable to delete C:\ai\DAWN-pytorch\tmpv7prl144.mp4.
29.8978938 seconds
cache\\ood_test_1009\real_female_1\video
After fixing the last error, this new error popped In this path cache\ood_test_1009\real_female_1\video\cache\target_audio.mp4. cache folder is not getting created inside video folder