Recherche avancée

Médias (1)

Mot : - Tags -/livre électronique

Autres articles (51)

  • 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 (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (8015)

  • PGS subtitle track is out of sync after extracting then adding to another video file

    23 décembre 2022, par Diericx

    I have the Japanese and English version of a show. I am attempting to extract the subtitles and audio from the English version and add them to the Japanese version.

    


    The video in both files seems to be exactly the same.

    


    Here is the info for the streams contained in the english file. When playing this source video file Track 2 subtitles seem to be almost empty while Track 1 contains all of them forced.

    


    Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, stereo, s32p (24 bit) (default)
    Metadata:
      title           : Stereo
      BPS-eng         : 1572054
      DURATION-eng    : 00:29:08.789333333
      NUMBER_OF_FRAMES-eng: 163949
      NUMBER_OF_BYTES-eng: 343648948
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.2 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-18 02:20:00
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, stereo, fltp, 1536 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 1509000
      DURATION-eng    : 00:29:08.789333333
      NUMBER_OF_FRAMES-eng: 163949
      NUMBER_OF_BYTES-eng: 329865388
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.2 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-18 02:20:00
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 22140
      DURATION-eng    : 00:28:47.454895833
      NUMBER_OF_FRAMES-eng: 836
      NUMBER_OF_BYTES-eng: 4780741
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.2 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-18 02:20:00
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 1770
      DURATION-eng    : 00:28:39.655437500
      NUMBER_OF_FRAMES-eng: 62
      NUMBER_OF_BYTES-eng: 380532
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.2 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-12-18 02:20:00
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID


    


    I extract the english audio

    


    ffmpeg -i s01e01_ja.mkv \
-muxdelay 0 \
-map 0:1 \
-vn \
-acodec copy \
s01e01_en_audio.dts


    


    I extract the english subtitles

    


    ffmpeg -i s01e01_en.mkv \
-muxdelay 0 \
-map 0:3 \
-vn \
-c copy \
s01e01_en_sub.sup


    


    I add the english audio track to the japanese video

    


    ffmpeg -i s01e01_ja.mkv \
-i s01e01_en_audio.dts \
-muxdelay 0 \
-map 0 \
-map 1:a \
-c copy \
-shortest \
s01e01_en_ja.mkv


    


    And finally add the english subtitles to the new japanese video that contains english audio

    


    ffmpeg -i s01e01_en_ja.mkv \
-itsoffset 6 \
-i future_boy_conan_s01e01_en_sub.sup \
-muxdelay 0 \
-map 0 \
-map 1:s \
-c copy \
-shortest \
s01e01_en_ja_subs.mkv


    


    As you can see I need to offset the subtitles by 6 seconds in order to get the subtitles to sync with the audio. The english audio is in sync with the video.

    


    I do not know how to debug this in order to tell if the subtitles are extracted or injected incorrectly causing the time offset. Any help would be appreciated !

    


  • YUV to RGB by Shader on iPhone

    27 octobre 2012, par user1333656

    Currently I am developing a video player using FFMPEG.
    I'm trying to convert YUV420P to RGB by Shader to reduce performance hit and I could see it works fine. The problem is caused when I try to change image size.

    Case 1. YUV to RGB is perfect. but the image is not exactly fit to Texture Bounds.
    For example, if i play 640x360 video, right (640-512) part is cropped and bottom (512-360) is filled with green colored rectangle.

    FRAME_X=512; //This is texture size
    FRAME_Y=512;

       avpicture_fill((AVPicture *) f, [currentVideoBuffer.data mutableBytes],
                  enc->pix_fmt,
                  FRAME_X, FRAME_Y);

       av_picture_copy((AVPicture *) f, (AVPicture *) avFrame,
                   enc->pix_fmt,
                   enc->width, enc->height);

    ....

    int yuvWidth= FRAME_X ;
    int  yuvHeight= FRAME_Y;
    glBindTexture ( GL_TEXTURE_2D, textureIdY );
    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,
    yuvWidth, yuvHeight, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, y_channel);


    glBindTexture ( GL_TEXTURE_2D, textureIdU );
    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,
    yuvWidth/2, yuvHeight/2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, u_channel);

    glBindTexture ( GL_TEXTURE_2D, textureIdV );
    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,
    yuvWidth/2, yuvHeight/2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, v_channel);

    Case 2. If i set actual image size to texture size, then image is exactly fit to texture but the color of image is a little bit strange. It has too much green color.

    Does anybody give me some clues for this ??
    Thanks in advance.

  • How to export audio from a iPhone video file with FFmpeg ?

    11 janvier 2020, par DanScripter

    UPDATE 1 the problem resides in the input read-stream. (check below)

    I am using fluent-ffmpeg (version : 2.1.2) to get a .mp3 file out of a video file that I input as a stream .createReadStream(). I output the file as a .pipe to a remoteWriteStream.

    ffmpeg -i pipe:0 -vn -f mp3 -acodec mp3 -movflags frag_keyframe+empty_moov pipe:1

    This works fine with .mp4, .webm and .mov (codec : prores) files.

    But it somehow does not want to work with a .mov out of an iPhone 11. FFmpeg is not giving me any error when running above code. It creates the .mp3 file but the size is just 152 B and it is not playable.

    I ffprobed the iPhone .mov files it returns this :

    "{ streams:
      [ { index: 0,
          codec_name: 'hevc',
          codec_long_name: 'H.265 / HEVC (High Efficiency Video Coding)',
          profile: 'Main',
          codec_type: 'video',
          codec_time_base: '1111/33300',
          codec_tag_string: 'hvc1',
          codec_tag: '0x31637668',
          width: 1920,
          height: 1080,
          coded_width: 1920,
          coded_height: 1088,
          has_b_frames: 2,
          sample_aspect_ratio: '0:1',
          display_aspect_ratio: '0:1',
          pix_fmt: 'yuv420p',
          level: 120,
          color_range: 'tv',
          color_space: 'bt709',
          color_transfer: 'bt709',
          color_primaries: 'bt709',
          chroma_location: 'unspecified',
          field_order: 'unknown',
          timecode: 'N/A',
          refs: 1,
          id: 'N/A',
          r_frame_rate: '30000/1001',
          avg_frame_rate: '33300/1111',
          time_base: '1/600',
          start_pts: 'N/A',
          start_time: 'N/A',
          duration_ts: 6666,
          duration: 11.11,
          bit_rate: 7611708,
          max_bit_rate: 'N/A',
          bits_per_raw_sample: 'N/A',
          nb_frames: 333,
          nb_read_frames: 'N/A',
          nb_read_packets: 'N/A',
          tags: [Object],
          disposition: [Object] },
        { index: 1,
          codec_name: 'aac',
          codec_long_name: 'AAC (Advanced Audio Coding)',
          profile: 'unknown',
          codec_type: 'audio',
          codec_time_base: '1/44100',
          codec_tag_string: 'mp4a',
          codec_tag: '0x6134706d',
          sample_fmt: 'fltp',
          sample_rate: 44100,
          channels: 2,
          channel_layout: 'stereo',
          bits_per_sample: 0,
          id: 'N/A',
          r_frame_rate: '0/0',
          avg_frame_rate: '0/0',
          time_base: '1/44100',
          start_pts: 'N/A',
          start_time: 'N/A',
          duration_ts: 489951,
          duration: 11.11,
          bit_rate: 135091,
          max_bit_rate: 192000,
          bits_per_raw_sample: 'N/A',
          nb_frames: 481,
          nb_read_frames: 'N/A',
          nb_read_packets: 'N/A',
          tags: [Object],
          disposition: [Object] },
        { index: 2,
          codec_name: 'unknown',
          codec_long_name: 'unknown',
          profile: 'unknown',
          codec_type: 'data',
          codec_tag_string: 'mebx',
          codec_tag: '0x7862656d',
          id: 'N/A',
          r_frame_rate: '0/0',
          avg_frame_rate: '0/0',
          time_base: '1/600',
          start_pts: 'N/A',
          start_time: 'N/A',
          duration_ts: 6666,
          duration: 11.11,
          bit_rate: 2670,
          max_bit_rate: 'N/A',
          bits_per_raw_sample: 'N/A',
          nb_frames: 38,
          nb_read_frames: 'N/A',
          nb_read_packets: 'N/A',
          tags: [Object],
          disposition: [Object] },
        { index: 3,
          codec_name: 'unknown',
          codec_long_name: 'unknown',
          profile: 'unknown',
          codec_type: 'data',
          codec_tag_string: 'mebx',
          codec_tag: '0x7862656d',
          id: 'N/A',
          r_frame_rate: '0/0',
          avg_frame_rate: '0/0',
          time_base: '1/600',
          start_pts: 'N/A',
          start_time: 'N/A',
          duration_ts: 6666,
          duration: 11.11,
          bit_rate: 7,
          max_bit_rate: 'N/A',
          bits_per_raw_sample: 'N/A',
          nb_frames: 1,
          nb_read_frames: 'N/A',
          nb_read_packets: 'N/A',
          tags: [Object],
          disposition: [Object] },
        { index: 4,
          codec_name: 'unknown',
          codec_long_name: 'unknown',
          profile: 'unknown',
          codec_type: 'data',
          codec_tag_string: 'mebx',
          codec_tag: '0x7862656d',
          id: 'N/A',
          r_frame_rate: '0/0',
          avg_frame_rate: '0/0',
          time_base: '1/600',
          start_pts: 'N/A',
          start_time: 'N/A',
          duration_ts: 6666,
          duration: 11.11,
          bit_rate: 18117,
          max_bit_rate: 'N/A',
          bits_per_raw_sample: 'N/A',
          nb_frames: 333,
          nb_read_frames: 'N/A',
          nb_read_packets: 'N/A',
          tags: [Object],
          disposition: [Object] } ],
     format:
      { filename: 'pipe:0',
        nb_streams: 5,
        nb_programs: 0,
        format_name: 'mov,mp4,m4a,3gp,3g2,mj2',
        format_long_name: 'QuickTime / MOV',
        start_time: 'N/A',
        duration: 11.11,
        size: 'N/A',
        bit_rate: 'N/A',
        probe_score: 100,
        tags:
         { major_brand: 'qt  ',
           minor_version: '0',
           compatible_brands: 'qt  ',
           creation_time: '2020-01-11T12:33:36.000000Z',
           'com.apple.quicktime.make': 'Apple',
           'com.apple.quicktime.model': 'iPhone 11',
           'com.apple.quicktime.software': '13.3',
           'com.apple.quicktime.creationdate': '2020-01-11T13:33:36+0100' } },
     chapters: [] }"

    The created .mp3 file results in a undefined.

    I already tried to take the .mov re-encode it to an .mp4 via ffmpeg and then try the above code to get the .mp3 - still does not work.

    Any advice how I can make this work ?

    thanks !


    UPDATE 1
    The problem resides in the input stream ! When I download the file to the local machine and input it as as a local file, not as a read stream, it works perfectly.

    I am creating the stream from a google cloud bucket like this :

    const myBucket = storage.bucket('myBucket');
    const remoteReadStream = myBucket.file(file).createReadStream();

    Since this code is perfectly working with all other codecs, what maybe the issue while creating the read stream from the google cloud from a h265 file ?