
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (29)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (5730)
-
Moviepy/FFMPEG error while writing file : Permission denied
26 février 2024, par rodinaxcviI am using Power Automate to try to run this powershell script "python3 %Directory%%FileName%" :


What my code is supposed to do :


- 

- Download a video from youtube
- Put small clips from a folder in bottom left
- Overwrite audio from downloaded Youtube video with new audio from a folder in the same directory (I am replacing the video's audio with an .mp3 of someone narrating something)








ERROR CODE :


OSError: \[Errno 32\] Broken pipe

MoviePy error: FFMPEG encountered the following error while writing file combined_video_1TEMP_MPY_wvf_snd.mp3:

b'combined_video_1TEMP_MPY_wvf_snd.mp3: Permission denied\\r\\n'



Code Snippet that seems to be throwing up error (NOT FULL CODE) :


# Combine ad clips with main video footage
def combine_videos(main_video_path, ad_video_paths, output_path, bottom_videos_folder, custom_audio_path):
 main_clip = VideoFileClip(main_video_path).subclip(0, 60) # Keep the original aspect ratio

 main_clip = main_clip.resize(width=1920) # Resize based on width
 if main_clip.size[1] > 1080:
 main_clip = main_clip.resize(height=1080) # Resize based on height if it's still too tall

 main_clip_x = (1920 - main_clip.size[0]) / 2
 main_clip_y = (1080 - main_clip.size[1]) / 2
 main_clip = main_clip.set_position((main_clip_x, main_clip_y))

 ad_clip = concatenate_to_duration(ad_video_paths, 60, bottom_videos_folder) # Assuming 60 seconds for the ad clip
 ad_clip = ad_clip.resize(width=250) # Resize the ad clip
 ad_clip = ad_clip.set_position(("left", "bottom")) # Position the ad clip at the bottom right

 custom_audio = AudioFileClip(custom_audio_path)

 # Specify the output directory for the audio file
 output_audio_directory = "C:/Temp/AIContentCreator"
 output_audio_path = os.path.join(output_audio_directory, "custom_audio.mp3")

 # Write the custom audio to the specified directory
 custom_audio.write_audiofile(output_audio_path)

 main_clip = main_clip.set_audio(custom_audio)

 final_clip = CompositeVideoClip([main_clip, ad_clip], size=(1920, 1080))
 final_clip.write_videofile(output_path, fps=30)

 main_clip.close()
 ad_clip.close()
 custom_audio.close()

## SAVE PATHS ##
# Video Folder Paths
save_path = r"C:\Temp\Videos\YoutubeVideo"
bottom_videos_folder = r"C:\Temp\Videos\BottomVideo"
custom_audio_path = r"C:\Temp\AIContentCreator\GPTContentCreation\output.mp3" # Existing audio file path

# Download videos from a playlist
playlist_url1 = ''
videos_playlist1 = download_playlist(playlist_url1, save_path)

# Prepare bottom videos
bottom_videos = list_videos_in_folder(bottom_videos_folder)

# Combine each pair of videos and export 
combined_video_counter = 1 
for main_video in videos_playlist1:
 shuffled_ads = random.sample(bottom_videos, len(bottom_videos))
 ad_video_paths = [os.path.join(bottom_videos_folder, ad) for ad in shuffled_ads[:5]] # Adjust number as needed

 combined_video_path = r'C:\Temp\Videos\TiktokVideos\combined_video_{combined_video_counter}.mp4'
 
 # Call the combine_videos function with the existing custom_audio_path
 combine_videos(main_video, ad_video_paths, combined_video_path, bottom_videos_folder, custom_audio_path)
 
 combined_video_counter += 1
`



What I've tried :


- 

- Setting all related folders to full access
- Setting full directory paths in my code
- Running Power Automate and CMD as administrator
- Moving files to a different folder like /Temp to see if permission error still consists










Reoccurring problems :


- 

-
I am not sure where MoviePy is writing "b'combined_video_1TEMP_MPY_wvf_snd.mp3". Could it be trying to place that file in another directory with out proper permissions ?


-
Whenever I try to de-select read-only on TiktokVideos folder and refresh it, "Read-only" is still on. Keeps doing this.








-
avformat/pcm : factorize and improve determining the default packet size
2 mars 2024, par Marton Balintavformat/pcm : factorize and improve determining the default packet size
Remove the 1024 cap on the number of samples, for high sample rate audio it
was suboptimal, calculate the low neighbour power of two for the number of
samples (audio blocks) instead.Make the function work correctly also for non-pcm codecs by using the stream
bitrate to estimate the target packet size. A previous version of this patch
used av_get_audio_frame_duration2() the estimate the desired packet size, but
for some codecs that returns the duration of a single audio frame regardless
of frame_bytes.Fallback to 4096/block_align*block_align if bitrate is not available.
Signed-off-by : Marton Balint <cus@passwd.hu>
-
Getting less duration while recording a video for multi cameras simultaneously [closed]
6 janvier 2024, par Pratik GajeraI am working on Quicktel SC686 module which has support 3 cameras. Currently, I have developed camera application using Gstreamer framework for recording a video for 2 cameras simultaneously. But I am suffering from duration issue of the video while two cameras are running simultaneously.


The following cases are tested in the board using my Gstreamer demo application. PFA my demo app source code for camera 1 and camera 2.


case 1. Record a video for 2 mins for single camera 1 using demo app,


Result : Camera 1 video's duration : 120 sec


case 2. Record a video for 2 mins for single camera 2 using demo app,


Result : Camera 2 video's duration : 120


case 3. Record a video for 2 mins for multi camera (camera 1 and 2) simultaneously.


Result : Camera 1 video's duration : 101 sec
Camera 2 video's duration : 100 sec


We analyzed 1st, 2nd and 3rd case, we got video duration inconsistent for camera 1 and 2 in 3rd case. Less duration issue is appeared while multi cameras are running simultaneously.


Could you please point out the issue what i am missing here ?


We can use below logic to find out duration of the h265 video.


$ ffprobe -v error -select_streams v:0 -show_packets -show_entries packet=duration_time -of default=noprint_wrappers=1:nokey=1 in.mp4 > durations.txt


Duration = Sum each line of the duration.txt


Thanks in advance !