Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (9)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (2421)

  • Piping ffmpeg output into ffplay stdin with boost

    21 décembre 2020, par botiapa

    I'm trying to pipe the output of an ffmpeg process into an ffplay process (Sort of like a playback). My problem is the following : If I copy the output character by character (by character I mean char) it works correctly, other than it consuming a whole lot of cpu power. However when I try to pipe chunks into it (by using a buffer), ffplay for some reason doesn't even recognize the input.

    


    bp::ipstream iso;
bp::ipstream ise;
bp::opstream in;
    
bp::child ffmpeg(bp::search_path("ffmpeg"), bp::args({"-loglevel", "quiet", "-f", "pulse", "-i", "default", "-f", "wav", "-bitexact", "-nostdin", "-"}), bp::std_out > iso, bp::std_err > ise);
bp::child ffplay(bp::search_path("ffplay"), bp::args({"-loglevel", "verbose", "-nodisp", "-f", "wav", "-i", "-"}), bp::std_in < in, bp::std_out > bp::null);


    


    Here are the 2 code snippets for comparison :

    


    Here it is copying char by char

    


    while(ffmpeg.running()) {
    char c;
    c = iso.get();
    in << c;
}


    


    And here it is copying with the help of a buffer

    


    char buffer[1024];
while(ffmpeg.running()) {
    iso.get(buffer, 1024);
    in << buffer;
}


    


    I can provide ffplay output if necessary, however I didn't see any errors or things like that.

    


  • Generating thumbnails from multiple videos on Desktop, using ffmpeg, or something similar

    6 février 2013, par Birk

    Hi guys this is a long shot but here goes...

    I basically have what I mentioned in the title running on my server. When I upload a video ffmpeg decomplies it and gives me screenshots, then I pick a screenshot that I want to use for that video. Currently, my server can process 3 videos at a time. The down side is that this uses up A LOT of the server processing power. :(

    Is there a way, or a program, that can process several video at a time and generate me screenshots on my Desktop ? If this is possible then I can just use my spare computer here to process everything then upload the screenshots/video to my server.

    This is what I basically have running now on the server. kayweb.com.au/blogs/Web-Development/Generating-screenshots-using-FFmpeg

    Something like this, But this thumbnail generator puts everything into one image. I need to be able to choose with thumbnail I want to use.
    http://www.tothepc.com/archives/make-movie-caps-screenshots-with-free-video-thumbnails-maker/

    Anyone have any suggestions ?

  • Moviepy/FFMPEG error while writing file : Permission denied

    26 février 2024, par rodinaxcvi

    I am using Power Automate to try to run this powershell script "python3 %Directory%%FileName%" :

    


    What my code is supposed to do :

    


      

    1. Download a video from youtube
    2. 


    3. Put small clips from a folder in bottom left
    4. 


    5. 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)
    6. 


    


    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.

      


    •