Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (70)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (5111)

  • FFMPEG Transitions

    10 juin 2022, par UserErrorLoL

    I am trying to create a video from images using ffmpeg where each image has a different duration and also a transition. I was trying to pass a file as input which contains the name and duration of the images. However, I am having trouble implementing a transition. I was wondering if anyone has had experience with this problem. My current command is :
ffmpeg -f concat -i input.txt -y -filter_complex xfade=transition=wipeleft:duration=2 -vf zscale=1920:1080:f=spline36, fps=60 -c:v libx264 -preset veryfast -crf 22 -pix_fmt yuv420p -out.avi

    


  • How to get the first audio channel from a video with ffmpeg-python ?

    31 mai 2022, par gisk

    I would like to get the very first audio channel from a video using ffmpeg-python.

    


    I tried with this :

    


      out, _ = (
        ffmpeg
            .input(filename)
            .output('pipe:', loglevel=0, format='s16le', acodec='pcm_s16le', ac=1, ar='8k')
            .run(capture_stdout=True)
    )
    """ extract audio signal """
    self.signal = (
        np
            .frombuffer(out, np.int16)  
    )


    


    but I am not sure whether this is correct.

    


    I had a look here, but I could not find a solution : https://trac.ffmpeg.org/wiki/AudioChannelManipulation

    


    Any suggestion ? Thanks !

    


    EDIT :

    


    I tried @rotem solution and it seems to work. However, I have another issue which seems related to the -ac flag. For some videos, the numpy output has the right length (i.e., it matches the original audio length). For others, I get a wrong one. However, if I set -ac to 2 for these videos, I get the correct signal length. Do you know why is this happening ?

    


    This is the metadata of the video (duration : 2 minutes and 11 seconds) which outputs the correct numpy array size with setting -ac to 2

    


    'streams' : ['index' : 0, 'codec_name' : 'h264', 'codec_long_name' : 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile' : 'High', 'codec_type' : 'video', 'codec_tag_string' : 'avc1', 'codec_tag' : '0x31637661', 'width' : 1920, 'height' : 1080, 'coded_width' : 1920, 'coded_height' : 1080, 'closed_captions' : 0, 'film_grain' : 0, 'has_b_frames' : 0, 'pix_fmt' : 'yuv420p', 'level' : 40, 'color_range' : 'tv', 'color_space' : 'bt709', 'color_transfer' : 'bt709', 'color_primaries' : 'bt709', 'chroma_location' : 'left', 'field_order' : 'progressive', 'refs' : 1, 'is_avc' : 'true', 'nal_length_size' : '4', 'id' : '0x1', 'r_frame_rate' : '30/1', 'avg_frame_rate' : '176805000/5894849', 'time_base' : '1/90000', 'start_pts' : 0, 'start_time' : '0.000000', 'duration_ts' : 11789698, 'duration' : '130.996644', 'bit_rate' : '16999840', 'bits_per_raw_sample' : '8', 'nb_frames' : '3929', 'extradata_size' : 34, 'disposition' : 'default' : 1, 'dub' : 0, 'original' : 0, 'comment' : 0, 'lyrics' : 0, 'karaoke' : 0, 'forced' : 0, 'hearing_impaired' : 0, 'visual_impaired' : 0, 'clean_effects' : 0, 'attached_pic' : 0, 'timed_thumbnails' : 0, 'captions' : 0, 'descriptions' : 0, 'metadata' : 0, 'dependent' : 0, 'still_image' : 0, 'tags' : 'creation_time' : '2022-05-30T15:00:39.000000Z', 'language' : 'eng', 'handler_name' : 'VideoHandle', 'vendor_id' : '[0][0][0][0]', 'index' : 1, 'codec_name' : 'aac', 'codec_long_name' : 'AAC (Advanced Audio Coding)', 'profile' : 'LC', 'codec_type' : 'audio', 'codec_tag_string' : 'mp4a', 'codec_tag' : '0x6134706d', 'sample_fmt' : 'fltp', 'sample_rate' : '48000', 'channels' : 2, 'channel_layout' : 'stereo', 'bits_per_sample' : 0, 'id' : '0x2', 'r_frame_rate' : '0/0', 'avg_frame_rate' : '0/0', 'time_base' : '1/48000', 'start_pts' : 696, 'start_time' : '0.014500', 'duration_ts' : 6285214, 'duration' : '130.941958', 'bit_rate' : '256004', 'nb_frames' : '6138', 'extradata_size' : 2, 'disposition' : 'default' : 1, 'dub' : 0, 'original' : 0, 'comment' : 0, 'lyrics' : 0, 'karaoke' : 0, 'forced' : 0, 'hearing_impaired' : 0, 'visual_impaired' : 0, 'clean_effects' : 0, 'attached_pic' : 0, 'timed_thumbnails' : 0, 'captions' : 0, 'descriptions' : 0, 'metadata' : 0, 'dependent' : 0, 'still_image' : 0, 'tags' : 'creation_time' : '2022-05-30T15:00:39.000000Z', 'language' : 'eng', 'handler_name' : 'SoundHandle', 'vendor_id' : '[0][0][0][0]'], 'format' : 'filename' : 'videos4/test_01.mp4', 'nb_streams' : 2, 'nb_programs' : 0, 'format_name' : 'mov,mp4,m4a,3gp,3g2,mj2', 'format_long_name' : 'QuickTime / MOV', 'start_time' : '0.000000', 'duration' : '130.996600', 'size' : '282621379', 'bit_rate' : '17259768', 'probe_score' : 100, 'tags' : 'major_brand' : 'mp42', 'minor_version' : '0', 'compatible_brands' : 'isommp42', 'creation_time' : '2022-05-30T15:00:39.000000Z', 'com.android.version' : '12', 'com.android.capture.fps' : '30.000000'.

    


    This is instead, the metadata of the video (duration 5 minutes) which gives the right result length with setting -ac to 1 :

    


    'streams' : ['index' : 0, 'codec_name' : 'h264', 'codec_long_name' : 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile' : 'High', 'codec_type' : 'video', 'codec_tag_string' : 'avc1', 'codec_tag' : '0x31637661', 'width' : 1920, 'height' : 1080, 'coded_width' : 1920, 'coded_height' : 1080, 'closed_captions' : 0, 'film_grain' : 0, 'has_b_frames' : 0, 'sample_aspect_ratio' : '1:1', 'display_aspect_ratio' : '16:9', 'pix_fmt' : 'yuv420p', 'level' : 40, 'field_order' : 'progressive', 'refs' : 1, 'is_avc' : 'true', 'nal_length_size' : '4', 'id' : '0x1', 'r_frame_rate' : '30/1', 'avg_frame_rate' : '33862500/1128779', 'time_base' : '1/90000', 'start_pts' : 0, 'start_time' : '0.000000', 'duration_ts' : 27090696, 'duration' : '301.007733', 'bit_rate' : '16999542', 'bits_per_raw_sample' : '8', 'nb_frames' : '9030', 'extradata_size' : 26, 'disposition' : 'default' : 1, 'dub' : 0, 'original' : 0, 'comment' : 0, 'lyrics' : 0, 'karaoke' : 0, 'forced' : 0, 'hearing_impaired' : 0, 'visual_impaired' : 0, 'clean_effects' : 0, 'attached_pic' : 0, 'timed_thumbnails' : 0, 'captions' : 0, 'descriptions' : 0, 'metadata' : 0, 'dependent' : 0, 'still_image' : 0, 'tags' : 'language' : 'und', 'handler_name' : 'VideoHandler', 'vendor_id' : '[0][0][0][0]', 'side_data_list' : ['side_data_type' : 'Display Matrix', 'displaymatrix' : '\n00000000 : 0 65536 0\n00000001 : -65536 0 0\n00000002 : 0 0 1073741824\n', 'rotation' : -90], 'index' : 1, 'codec_name' : 'aac', 'codec_long_name' : 'AAC (Advanced Audio Coding)', 'profile' : 'LC', 'codec_type' : 'audio', 'codec_tag_string' : 'mp4a', 'codec_tag' : '0x6134706d', 'sample_fmt' : 'fltp', 'sample_rate' : '48000', 'channels' : 2, 'channel_layout' : 'stereo', 'bits_per_sample' : 0, 'id' : '0x2', 'r_frame_rate' : '0/0', 'avg_frame_rate' : '0/0', 'time_base' : '1/48000', 'start_pts' : 0, 'start_time' : '0.000000', 'duration_ts' : 14448640, 'duration' : '301.013333', 'bit_rate' : '256000', 'nb_frames' : '14110', 'extradata_size' : 2, 'disposition' : 'default' : 1, 'dub' : 0, 'original' : 0, 'comment' : 0, 'lyrics' : 0, 'karaoke' : 0, 'forced' : 0, 'hearing_impaired' : 0, 'visual_impaired' : 0, 'clean_effects' : 0, 'attached_pic' : 0, 'timed_thumbnails' : 0, 'captions' : 0, 'descriptions' : 0, 'metadata' : 0, 'dependent' : 0, 'still_image' : 0, 'tags' : 'language' : 'und', 'handler_name' : 'SoundHandler', 'vendor_id' : '[0][0][0][0]'], 'format' : 'filename' : 'videos4/video_02.mp4', 'nb_streams' : 2, 'nb_programs' : 0, 'format_name' : 'mov,mp4,m4a,3gp,3g2,mj2', 'format_long_name' : 'QuickTime / MOV', 'start_time' : '0.000000', 'duration' : '301.014000', 'size' : '649577064', 'bit_rate' : '17263703', 'probe_score' : 100, 'tags' : 'major_brand' : 'isom', 'minor_version' : '512', 'compatible_brands' : 'isomiso2avc1mp41', 'encoder' : 'Lavf58.27.103'

    


  • FFmpeg Cropping Fps Drop

    7 mai 2022, par James

    FFmpeg Commands works but having a problem in fps drop also using libx264 for encoding any idea to get this good

    


    "-y" "-noautorotate" "-ss" "301" "-t" "11" "-i" "/mnt/shared/Pictures/[BTCLOD.COM] COSTA RICA IN 4K 60fps HDR (ULTRA HD)-1080p60.mp4" \
"-strict" "experimental" "-vf" "crop=w=606:h=1080:x=657:y=0" \
"-vcodec" "libx264" "-crf" "18" "-r" "15" "-b:v" "2500k" \
"-acodec" "copy" "-ab" "128k" "-sample_fmt" "s16" \
"-ss" "0" "-t" "11" "/storage/emulated/0/VEditor/VideoCroper/[BTCLOD.COM] COSTA RICA IN 4K 60fps HDR (ULTRA HD)-1080p60-0-6.mp4"