Recherche avancée

Médias (0)

Mot : - Tags -/publication

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (53)

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (5373)

  • FFmpeg Zoom and Rotate Causes Image Cropping Instead of Allowing It to Go Beyond Frame Edges [closed]

    6 octobre 2024, par XVersi

    I am trying to create a zoom-in video with a gentle rotation effect using FFmpeg. My goal is to zoom in on the center of the image while allowing parts of the image to "go beyond" the frame boundaries during the zoom and rotation. However, what I see is that FFmpeg seems to crop the image to fit within the output frame, and instead of keeping the full image intact, it fills the rest of the frame with black sections, effectively trimming parts of my image.

    


    Here is the code I'm using in Go to generate the video using FFmpeg :

    


    func createZoomInVideoWithRotation(ffmpegPath, imagePath, outputPath string) error {
cmd := exec.Command(ffmpegPath, "-i", imagePath, "-vf", `[0:v]scale=9000x5000,zoompan=z='min(zoom+0.002,1.5)':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=125,rotate='PI/800*t',trim=duration=20[v1];[v1]scale=1080:1920[v]`, "-c:v", "libx264", "-crf", "18", "-preset", "slow", outputPath)
err := cmd.Run()
if err != nil {
    return fmt.Errorf("error executing ffmpeg command: %w", err)
}

fmt.Println("Zoom-in and rotation video created successfully!")
return nil
}

func main() {
    ffmpegPath := `C:\Users\username\Downloads\ffmpeg-7.0.2-essentials_build\ffmpeg-7.0.2-essentials_build\bin\ffmpeg.exe`
    imagePath := `C:\Users\username\video_proj\image.jpg` 
    outputPath := `C:\Users\username\video_proj\output_zoom_rotate.mp4`



err := createZoomInVideoWithRotation(ffmpegPath, imagePath, outputPath)
if err != nil {
    fmt.Println("Error creating zoom and rotate video:", err)
}
}


    


    Removing the final scale=1080:1920 : I removed the scale part at the end of the filter chain to prevent FFmpeg from resizing the video to a fixed size, hoping that this would allow the image to remain at its original size without being cropped to fit the frame.

    


    The image would zoom in on its center and rotate, and during this process, parts of the image would be allowed to move beyond the boundaries of the video output frame.
There would be no cropping or resizing of the image, meaning the full original image would be intact even if it extends beyond the video frame.
Essentially, I wanted the image to "overflow" outside of the set dimensions during the rotation, without being forced to fit within the output frame and without adding black borders that indicate missing parts of the image.

    


  • How Do I Get Python To Capture My Screen At The Right Frame Rate

    14 juillet 2024, par John Thesaurus

    I have this python script that is supposed to record my screen, on mac os.

    


    import cv2
import numpy as np
from PIL import ImageGrab
import subprocess
import time

def record_screen():
    # Define the screen resolution
    screen_width, screen_height = 1440, 900  # Adjust this to match your screen resolution
    fps = 30  # Target FPS for recording

    # Define the ffmpeg command
    ffmpeg_cmd = [
        'ffmpeg',
        '-y',  # Overwrite output file if it exists
        '-f', 'rawvideo',
        '-vcodec', 'rawvideo',
        '-pix_fmt', 'bgr24',
        '-s', f'{screen_width}x{screen_height}',  # Size of one frame
        '-r', str(fps),  # Input frames per second
        '-i', '-',  # Input from pipe
        '-an',  # No audio
        '-vcodec', 'libx264',
        '-pix_fmt', 'yuv420p',
        '-crf', '18',  # Higher quality
        '-preset', 'medium',  # Encoding speed
        'screen_recording.mp4'
    ]

    # Start the ffmpeg process
    ffmpeg_process = subprocess.Popen(ffmpeg_cmd, stdin=subprocess.PIPE)

    frame_count = 0
    start_time = time.time()

    while True:
        # Capture the screen
        img = ImageGrab.grab()
        img_np = np.array(img)

        # Convert and resize the frame
        frame = cv2.cvtColor(img_np, cv2.COLOR_RGB2BGR)
        resized_frame = cv2.resize(frame, (screen_width, screen_height))

        # Write the frame to ffmpeg
        ffmpeg_process.stdin.write(resized_frame.tobytes())

        # Display the frame
        cv2.imshow('Screen Recording', resized_frame)

        # Stop recording when 'q' is pressed
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    # Close the ffmpeg process
    ffmpeg_process.stdin.close()
    ffmpeg_process.wait()

    # Release everything when job is finished
    cv2.destroyAllWindows()

if __name__ == "__main__":
    record_screen()




    


    As you can see, it should be 30 frames per second, but the problem is that when I open the file afterwards its all sped up. I think it has to do with the frame capture rate as oppose to the encoded rate. I'm not quite sure though. If I try to speed the video down afterwards so that it plays in real time the video is just really choppy. And the higher I make the fps, the faster the video plays, meaning the more I have to slow it down and then its still choppy. I'm pretty sure that it captures frames at a really slow rate and then puts them in a video and plays it back at 30fps. Can anyone fix this ? Anything that gets a working screen recorder on mac os I will take.

    


  • avcodec : Add "sar" alias to "aspect" option of video encoders

    5 mai 2016, par Andrey Utkin
    avcodec : Add "sar" alias to "aspect" option of video encoders
    

    It is impossible to pass "aspect" parameter to encoder from ffmpeg CLI
    because option from lavc/options_table.h is eclipsed by option with same
    name in ffmpeg_opt.c, which has different meaning (DAR, not SAR).

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] doc/codecs.texi
    • [DH] libavcodec/options_table.h
    • [DH] tests/ref/fate/api-mjpeg-codec-param
    • [DH] tests/ref/fate/api-png-codec-param