Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (47)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

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

  • Submit enhancements and plugins

    13 avril 2011

    If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
    You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.

Sur d’autres sites (6257)

  • Why are no dts pts written to my mp4 container

    14 mai 2019, par Kiamur

    Based on my (self-answered) question here Muxing AVPackets into mp4 file - revisited, I have to ask, what could be the reason why there are no values written for pts/dts in the resulting mp4 container.

    I examined the container file with the tool MediaInfo.
    I observe that only the very first Frame contains a value for pts in the container. After that, pts is not even shown in the mp4 file anymore, but dts is, with a value of all zeros.

    This is the output from MediaInfo for the first 3 frames :

    0000A2   slice_layer_without_partitioning (IDR) - 0 (0x0) - Frame 0 - slice_type I - frame_num 0 - DTS 00:00:00.000 - PTS 00:00:00.017 (141867 bytes)
    0000A2    Header (5 bytes)
    0000A2     zero_byte:                          0 (0x00)
    0000A3     start_code_prefix_one_3bytes:       1 (0x000001)
    0000A6     nal_ref_idc:                        3 (0x3) - (2 bits)
    0000A6     nal_unit_type:                      5 (0x05) - (5 bits)
    0000A7    slice_header (3 bytes)
    0000A7     first_mb_in_slice:                  0 (0x0)
    0000A7     slice_type:                         7 (0x07) - I
    0000A8     pic_parameter_set_id:               0 (0x0)
    0000A8     frame_num:                          0 (0x0)
    0000A8     idr_pic_id:                         0 (0x0)
    0000A8     no_output_of_prior_pics_flag:       No
    0000A8     long_term_reference_flag:           No
    0000A9     slice_qp_delta:                     -5 (0xFFFFFFFB)
    0000AA     disable_deblocking_filter_idc:      0 (0x0)
    0000AA     slice_alpha_c0_offset_div2:         0 (0x0)
    0000AA     slice_beta_offset_div2:             0 (0x0)
    0000AA    slice_data (141856 bytes)
    0000AA     (ToDo):                             (Data)
    022ACD   slice_layer_without_partitioning (IDR) - 0 (0x0) - Frame 0 - slice_type I - frame_num 0 - DTS 00:00:00.000 - PTS 00:00:00.017 - first_mb_in_slice 8040 (2248 bytes)
    022ACD    Header (5 bytes)
    022ACD     zero_byte:                          0 (0x00)
    022ACE     start_code_prefix_one_3bytes:       1 (0x000001)
    022AD1     nal_ref_idc:                        3 (0x3) - (2 bits)
    022AD1     nal_unit_type:                      5 (0x05) - (5 bits)
    022AD2    slice_header (6 bytes)
    022AD2     first_mb_in_slice:                  8040 (0x001F68)
    022AD5     slice_type:                         7 (0x07) - I
    022AD6     pic_parameter_set_id:               0 (0x0)
    022AD6     frame_num:                          0 (0x0)
    022AD6     idr_pic_id:                         0 (0x0)
    022AD6     no_output_of_prior_pics_flag:       No
    022AD6     long_term_reference_flag:           No
    022AD7     slice_qp_delta:                     -5 (0xFFFFFFFB)
    022AD8     disable_deblocking_filter_idc:      0 (0x0)
    022AD8     slice_alpha_c0_offset_div2:         0 (0x0)
    022AD8     slice_beta_offset_div2:             0 (0x0)
    022AD8    slice_data (2237 bytes)
    022AD8     (ToDo):                             (Data)
    023395  1 (36212 bytes)
    023395   slice_layer_without_partitioning (non-IDR) - 2 (0x2) - Frame 1 - slice_type P - frame_num 1 - DTS 00:00:00.000 (36017 bytes)
    023395    Header (5 bytes)
    023395     zero_byte:                          0 (0x00)
    023396     start_code_prefix_one_3bytes:       1 (0x000001)
    023399     nal_ref_idc:                        3 (0x3) - (2 bits)
    023399     nal_unit_type:                      1 (0x01) - (5 bits)
    02339A    slice_header (3 bytes)
    02339A     first_mb_in_slice:                  0 (0x0)
    02339A     slice_type:                         5 (0x5) - P
    02339A     pic_parameter_set_id:               0 (0x0)
    02339A     frame_num:                          1 (0x1)
    02339B     num_ref_idx_active_override_flag (0 bytes)
    02339B      num_ref_idx_active_override_flag:  Yes
    02339B      num_ref_idx_l0_active_minus1:      0 (0x0)
    02339B     ref_pic_list_modification_flag_l0:  No
    02339B     adaptive_ref_pic_marking_mode_flag: No
    02339C     cabac_init_idc:                     0 (0x0)
    02339C     slice_qp_delta:                     -3 (0xFFFFFFFD)
    02339C     disable_deblocking_filter_idc:      0 (0x0)
    02339C     slice_alpha_c0_offset_div2:         0 (0x0)
    02339D     slice_beta_offset_div2:             0 (0x0)
    02339D    slice_data (36012 bytes)
    02339D     (ToDo):                             (Data)
    02C046   slice_layer_without_partitioning (non-IDR) - 2 (0x2) - Frame 1 - slice_type P - frame_num 1 - DTS 00:00:00.000 - first_mb_in_slice 8040 (195 bytes)
    02C046    Header (5 bytes)
    02C046     zero_byte:                          0 (0x00)
    02C047     start_code_prefix_one_3bytes:       1 (0x000001)
    02C04A     nal_ref_idc:                        3 (0x3) - (2 bits)
    02C04A     nal_unit_type:                      1 (0x01) - (5 bits)
    02C04B    slice_header (6 bytes)
    02C04B     first_mb_in_slice:                  8040 (0x001F68)
    02C04E     slice_type:                         5 (0x5) - P
    02C04E     pic_parameter_set_id:               0 (0x0)
    02C04E     frame_num:                          1 (0x1)
    02C04F     num_ref_idx_active_override_flag (0 bytes)
    02C04F      num_ref_idx_active_override_flag:  Yes
    02C04F      num_ref_idx_l0_active_minus1:      0 (0x0)
    02C04F     ref_pic_list_modification_flag_l0:  No
    02C04F     adaptive_ref_pic_marking_mode_flag: No
    02C050     cabac_init_idc:                     0 (0x0)
    02C050     slice_qp_delta:                     -3 (0xFFFFFFFD)
    02C050     disable_deblocking_filter_idc:      0 (0x0)
    02C050     slice_alpha_c0_offset_div2:         0 (0x0)
    02C051     slice_beta_offset_div2:             0 (0x0)
    02C051    slice_data (190 bytes)
    02C051     (ToDo):                             (Data)
    02C109  1 (26280 bytes)
    02C109   slice_layer_without_partitioning (non-IDR) - 4 (0x4) - Frame 2 - slice_type P - frame_num 2 - DTS 00:00:00.000 (26157 bytes)
    02C109    Header (5 bytes)
    02C109     zero_byte:                          0 (0x00)
    02C10A     start_code_prefix_one_3bytes:       1 (0x000001)
    02C10D     nal_ref_idc:                        3 (0x3) - (2 bits)
    02C10D     nal_unit_type:                      1 (0x01) - (5 bits)
    02C10E    slice_header (3 bytes)
    02C10E     first_mb_in_slice:                  0 (0x0)
    02C10E     slice_type:                         5 (0x5) - P
    02C10E     pic_parameter_set_id:               0 (0x0)
    02C10E     frame_num:                          2 (0x2)
    02C10F     num_ref_idx_active_override_flag (0 bytes)
    02C10F      num_ref_idx_active_override_flag:  Yes
    02C10F      num_ref_idx_l0_active_minus1:      0 (0x0)
    02C10F     ref_pic_list_modification_flag_l0:  No
    02C10F     adaptive_ref_pic_marking_mode_flag: No
    02C110     cabac_init_idc:                     0 (0x0)
    02C110     slice_qp_delta:                     -2 (0xFFFFFFFE)
    02C110     disable_deblocking_filter_idc:      0 (0x0)
    02C110     slice_alpha_c0_offset_div2:         0 (0x0)
    02C111     slice_beta_offset_div2:             0 (0x0)
    02C111    slice_data (26152 bytes)
    02C111     (ToDo):                             (Data)
    032736   slice_layer_without_partitioning (non-IDR) - 4 (0x4) - Frame 2 - slice_type P - frame_num 2 - DTS 00:00:00.000 - first_mb_in_slice 8040 (123 bytes)
    032736    Header (5 bytes)
    032736     zero_byte:                          0 (0x00)
    032737     start_code_prefix_one_3bytes:       1 (0x000001)
    03273A     nal_ref_idc:                        3 (0x3) - (2 bits)
    03273A     nal_unit_type:                      1 (0x01) - (5 bits)
    03273B    slice_header (6 bytes)
    03273B     first_mb_in_slice:                  8040 (0x001F68)
    03273E     slice_type:                         5 (0x5) - P
    03273E     pic_parameter_set_id:               0 (0x0)
    03273E     frame_num:                          2 (0x2)
    03273F     num_ref_idx_active_override_flag (0 bytes)
    03273F      num_ref_idx_active_override_flag:  Yes
    03273F      num_ref_idx_l0_active_minus1:      0 (0x0)
    03273F     ref_pic_list_modification_flag_l0:  No
    03273F     adaptive_ref_pic_marking_mode_flag: No
    032740     cabac_init_idc:                     0 (0x0)
    032740     slice_qp_delta:                     -2 (0xFFFFFFFE)
    032740     disable_deblocking_filter_idc:      0 (0x0)
    032740     slice_alpha_c0_offset_div2:         0 (0x0)
    032741     slice_beta_offset_div2:             0 (0x0)
    032741    slice_data (118 bytes)
    032741     (ToDo):                             (Data)
    0327B1  1 (21125 bytes)

    It goes on like that, even though I set pts and dts. The settings may not be correct already (I do some calculations like (1 / framerate) * FrameNumber), but I would expect at least some numbers in pts and dts, when I set the according fields in the avPacket structure and write that via av_interleaved_write_frame(outFmtCtx, &avPacket) ; to the file.

    What could be wrong here ?

    Edit :

    (please see below in the comments the download to my testdata and source file)
    One thing that bugs me is the fact, if I compare the output of MediaInfo from my file and that of the muxing.c generated is, that in the header, the muxing.c generated already mentions the duration of the file as 9960 ms, whereas mine is only 40 ms.

    muxing.c also does call avformat_write_header before even one frame is drawn. Yes, I suppose that the header will be updated, when the either av_interleaved_write_frame or av_write_trailer is called, but I totally not understand the mechanics behind it.
    Maybe somebody can enlighten me with some background information of any kind.

    Additionally, I think it could be necessarry to extract some SPS and PPS from my raw data (preceding the I-slice), and give that as extra data to the avformat_write_header call. But I just cannot figure out myself if I have to do that at all and if so, how to do it.

  • Revert "lavf/dashenc : Write media trailers when DASH trailer is written."

    3 décembre 2018, par Karthick J
    Revert "lavf/dashenc : Write media trailers when DASH trailer is written."
    

    This reverts commit e444b3b184f36e3c97bb3489822f6b05ccb848a8.
    Causing build error due to rebasing. Sorry for about it.

    • [DH] libavformat/dashenc.c
  • MOOV atom is not being written to the output.

    18 juillet 2014, par AnilJ

    I am facing a problem where a MOOV atom is not written to the end of the file, and the file is not playable by the vlc player. Also, FFmpeg command gives me the following error.

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2334ba0] moov atom not found
    queueout/1000_wrecord.mp4: Invalid data found when processing input

    In my design, I am using an object of DataChunkQueue class to initialize the IContainer object, where it writes into this queue when it calls IContainer.WritePacket(packet) method. Finally when the recording is complete, I am flushing out this queue into a file. However, when I try to play the file, above error is thrown. When I test with the FLV file type however, I am able to playout the file correctly.

    I am not sure what is the issue with the MP4 file and why it does not write the MOOV item to the end. Can anyone offer me an suggestions as to how this can be resolved ?

    I am pasting below some of the code snippets for reference.

    public class DataChunkQueue implements ByteChannel {

       private ConcurrentLinkedQueue<datachunk> mChunkQueue = null;
       private static String BASE_PATH = null;
       private static String mOutputFileName = null;
       private FileChannel mOutputFileChannel = null;

       // constructor
       public DataChunkQueue() {
           mChunkQueue = new ConcurrentLinkedQueue<datachunk>();
       }

       @Override
       public void close() throws IOException {
           return;
       }

       @Override
       public boolean isOpen() {
           return true;
       }

       @Override
       public int write(ByteBuffer buffer) throws IOException {
           DataChunk vChunk = new DataChunk(buffer);
           mChunkQueue.add(vChunk);    
           return 0;
       }

       public int read(ByteBuffer buffer) throws IOException {

           int result = 0;

           buffer = mChunkQueue.poll().GetBuffer();
           if (buffer != null ) {
               result = 0;
           } else {
               result = 1;
           }

           return result;
       }
    }

    private boolean InitStreamEncoder() {

       DataChunkQueue mOutQueue = null;
       // Change this to change the frame rate you record at
       mFrameRate = IRational.make(Constants.FRAME_RATE, 1);

       // try opening a container format
       mOutFormat = IContainerFormat.make();
       mOutFormat.setOutputFormat(mRecordFormat, null, null);

       // Initialize the output container.
       mOutputContainer = IContainer.make();
       int retval = mOutputContainer.open(mOutQueue, IContainer.Type.WRITE, mOutFormat);
       if (retval &lt; 0)
           throw new RuntimeException("could not open data output stream buffer");

       // Guess the Encoding CODEC based on the type of input file.
       ICodec videoCodec = ICodec.guessEncodingCodec(null, null, ("out." + mRecordFormat), null, ICodec.Type.CODEC_TYPE_VIDEO);
       if (videoCodec == null)
           throw new RuntimeException("could not guess a codec");

       // Initialize the encoding parameters.
       mOutStream = mOutputContainer.addNewStream(videoCodec);
       mOutStreamCoder = mOutStream.getStreamCoder();

       mOutStreamCoder.setNumPicturesInGroupOfPictures(Constants.GOP);
       mOutStreamCoder.setCodec(videoCodec);

       //mOutStreamCoder.setBitRate(Constants.BITRATE);
       //mOutStreamCoder.setBitRateTolerance(Constants.TOLERANCE);
       mOutStreamCoder.setPixelType(IPixelFormat.Type.YUV420P);
       mOutStreamCoder.setWidth(Constants.MAIN_SCREEN_WIDTH);
       mOutStreamCoder.setHeight(Constants.MAIN_SCREEN_HEIGHT);
       //mOutStreamCoder.setFlag(IStreamCoder.Flags.FLAG_QSCALE, true);
       //mOutStreamCoder.setGlobalQuality(0);

       mOutStreamCoder.setFrameRate(mFrameRate);
       mOutStreamCoder.setTimeBase(IRational.make(mFrameRate.getDenominator(), mFrameRate.getNumerator()));

       retval = mOutStreamCoder.open(null, null);
       if (retval &lt; 0) {
           System.out.println("could not open input decoder");
           return false;      
       }

       retval = mOutputContainer.writeHeader();
       if (retval &lt; 0) {
           System.out.println("could not write file header");
           return false;
       }

       return true;
    }
    </datachunk></datachunk>

    This function is called at the very end to write the trailer.

    public void Cleanup() {
       if (mOutputContainer != null) {
           mOutputContainer.flushPackets();
           mOutputContainer.writeTrailer();
           mOutputContainer.close();
       }

       if (mOutStreamCoder != null) {
           mOutStreamCoder.close();
           mOutStreamCoder = null;
       }
    }