Skip to content
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

Video generation failure if the input audio file is longer than the input Video file #9

Open
poiley opened this issue Jan 1, 2023 · 0 comments

Comments

@poiley
Copy link
Collaborator

poiley commented Jan 1, 2023

Context:

$ python run.py -r confessions -l 1

Posts grabbed...

Converting "Been_In_Jail_For_Almost_Half_A_Year_And_Everyone_Close_To_Me_Had_No_Idea" to mp3
Success

Processing Been_In_Jail_For_Almost_Half_A_Year_And_Everyone_Close_To_Me_Had_No_Idea to video...
Using test.mov

> /Users/ben.poile/repos/sideprojects/tiktok_post_generator/video/__init__.py(29)audio_on_video()
-> start = random.randrange(int(video_clip.end - audio_clip.end) - 1)
(Pdb) l
 24  
 25             #create start time and end
 26             if not start:
 27                     import pdb
 28                     pdb.set_trace()
 29  ->                 start = random.randrange(int(video_clip.end - audio_clip.end) - 1)
 30             end = start + audio_clip.end + 3
 31  
 32             #clipped and set audio
 33             clipped = video_clip.subclip(start, end).set_audio(audio_clip)
 34  
(Pdb) p video_clip.end
29.95
(Pdb) p audio_clip.end
46.82
(Pdb) video_clip.end - audio_clip.end
-16.87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant