Recherche avancée

Médias (91)

Autres articles (56)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (3870)

  • Python program which reads and extracts specific information from JSON file generated by FFPROBE

    3 février 2017, par Georgе Stoyanov

    I want to create a simple Python script, which runs a custom ffprobe script and then extracts some specific information from the generated JSON file. So the ffprobe command is :

    ffprobe -v quiet -print_format json -show_format -show_streams example.mp4 > output.json

    This command is extracting the video specific information into output.json file. Then I want to read the file and extract some specific information out of it. For example the JSON file has the following format :

    {
       "streams": [
           {
               "index": 0,
               "codec_name": "h264",
               "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
               "profile": "High 4:2:2 Intra",
               "codec_type": "video",
               "codec_time_base": "1/100",
               "codec_tag_string": "[0][0][0][0]",
               "codec_tag": "0x0000",
               "width": 3840,
               "height": 2160,
               "coded_width": 3840,
               "coded_height": 2160,
               "has_b_frames": 0,
               "sample_aspect_ratio": "1:1",
               "display_aspect_ratio": "16:9",
               "pix_fmt": "yuv422p10le",
               "level": 52,
               "color_range": "tv",
               "color_space": "bt709",
               "color_transfer": "bt709",
               "color_primaries": "bt709",
               "chroma_location": "left",
               "field_order": "progressive",
               "refs": 1,
               "is_avc": "false",
               "nal_length_size": "0",
               "r_frame_rate": "50/1",
               "avg_frame_rate": "50/1",
               "time_base": "1/50",
               "start_pts": 0,
               "start_time": "0.000000",
               "duration_ts": 15000,
               "duration": "300.000000",
               "bits_per_raw_sample": "10",
               "disposition": {
                   "default": 0,
                   "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
               },
               "tags": {
                   "file_package_umid": "0x060A2B340101010501010D0013EC94F152947134B6EC94F10052947134B6EC01",
                   "file_package_name": "Source Package"
               }
           }
       ],
       "format": {
           "filename": "300sec.mxf",
           "nb_streams": 1,
           "nb_programs": 0,
           "format_name": "mxf",
           "format_long_name": "MXF (Material eXchange Format)",
           "start_time": "0.000000",
           "duration": "300.000000",
           "size": "16772788991",
           "bit_rate": "447274373",
           "probe_score": 100,
           "tags": {
               "uid": "adab4424-2f25-4dc7-92ff-29bd000c0000",
               "generation_uid": "adab4424-2f25-4dc7-92ff-29bd000c0001",
               "company_name": "FFmpeg",
               "product_name": "OP1a Muxer",
               "product_version": "57.66.101",
               "product_uid": "adab4424-2f25-4dc7-92ff-29bd000c0002",
               "modification_date": "0-01-02T00:00:00.000000Z",
               "material_package_umid": "0x060A2B340101010501010D0013EC94F152947134B6EC94F10052947134B6EC00",
               "timecode": "00:00:00:00"
           }
       }
    }

    Perfect will be if the Python script runs and then asks you for the path to the input file.

    Unfortunately I have very little experience with Python, but it comes pre-installed on my system and I want to use it. The other option is to write a bash script doing the same. Any suggestions will be greatly appreciated.

    So far I have figured out how I can open the JSON file and to extract data from it using :

    import json

    with open('output.json') as json_data:
       data = json.load(json_data)
       json_data.close()
       print(data["streams"][0]["codec_name"])
       print(data["streams"][0]["profile"])
  • convert video with ffmpeg command line. but the video stream and audio stream are out of sync

    24 juin 2016, par zack chen

    I use ffmpeg cmd to convert some mkv video files to flv.

    The source files are downloaded from this site : Sample mkv files

    ffmpeg -i input.mkv -c:v libx264 -crf 20 -preset ultrafast -c:a aac -ar 22050 -y output.flv

    However the output video seems lose some frames, the FPS dropped from 25 to 5 suddenly and The video stream and audio stream are out of sync.

    I tested some mkv files downloaded from another site, the output file could play well.
    So, I guess it may be caused by the mkv files downloaded from the site : http://www.sample-videos.com/index.php#sample-mkv-video

    But i couldn’t find the reason. Could you help me ?

    I get the video info by ffprobe, as below.

    {
    "streams": [
       {
           "index": 0,
           "codec_name": "h264",
           "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
           "profile": "Main",
           "codec_type": "video",
           "codec_time_base": "1/50",
           "codec_tag_string": "[0][0][0][0]",
           "codec_tag": "0x0000",
           "width": 320,
           "height": 240,
           "coded_width": 320,
           "coded_height": 240,
           "has_b_frames": 0,
           "sample_aspect_ratio": "1:1",
           "display_aspect_ratio": "4:3",
           "pix_fmt": "yuv420p",
           "level": 20,
           "chroma_location": "left",
           "refs": 1,
           "is_avc": "true",
           "nal_length_size": "4",
           "r_frame_rate": "25/1",
           "avg_frame_rate": "25/1",
           "time_base": "1/1000",
           "duration_ts": 9818,
           "duration": "9.818000",
           "bits_per_raw_sample": "8",
           "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
           }
       },
       {
           "index": 1,
           "codec_name": "aac",
           "codec_long_name": "AAC (Advanced Audio Coding)",
           "profile": "LC",
           "codec_type": "audio",
           "codec_time_base": "1/48000",
           "codec_tag_string": "[0][0][0][0]",
           "codec_tag": "0x0000",
           "sample_fmt": "fltp",
           "sample_rate": "48000",
           "channels": 6,
           "channel_layout": "5.1",
           "bits_per_sample": 0,
           "r_frame_rate": "0/0",
           "avg_frame_rate": "0/0",
           "time_base": "1/1000",
           "duration_ts": 9818,
           "duration": "9.818000",
           "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
           }
       }
    ],
    "format": {
       "filename": "big_buck_bunny_240p_1mb.mkv",
       "nb_streams": 2,
       "nb_programs": 0,
       "format_name": "matroska,webm",
       "format_long_name": "Matroska / WebM",
       "duration": "9.818000",
       "size": "1055721",
       "bit_rate": "860233",
       "probe_score": 100,
       "tags": {
           "ENCODER": "Lavf53.24.2"
       }
    }
    }
  • How to encode H.264 video using FFmpeg C API and then open the output with a media player ?

    4 avril 2016, par GummiB

    I’m trying to encode a H.264 video with the FFMPEG C API.
    I have successfully compiled and executed the decoding/encoding example provided by FFMPEG.

    The problem I’m facing is that the .mpg file (encoded with AV_CODEC_ID_MPEG1VIDEO) the example creates works. Windows creates a thumbnail and everything. On the other hand the .h264 (encoded with AV_CODEC_ID_H264) file does not. When I try to play the file in VLC the play/pause button just flickers, no thumbnail in windows, no nothing.

    During encoding libx264 reports the following :

    [libx264 @ 004b81a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 004b81a0] profile High, level 1.3
    [libx264 @ 004b81a0] frame I:3     Avg QP:26.79  size:  2116
    [libx264 @ 004b81a0] frame P:12    Avg QP:26.60  size:   789
    [libx264 @ 004b81a0] frame B:10    Avg QP:31.39  size:   499
    [libx264 @ 004b81a0] consecutive B-frames: 20.0% 80.0%
    [libx264 @ 004b81a0] mb I  I16..4: 78.3% 11.6% 10.1%
    [libx264 @ 004b81a0] mb P  I16..4: 77.4%  0.6%  0.1%  P16..4: 20.3%  0.7%  0.9%  0.0%  0.0%    skip: 0.0%
    [libx264 @ 004b81a0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  9.4%  0.2%  0.0%  direct:11.0%  skip:79.4%  L0:25.4% L1:35.4% BI:39.2%
    [libx264 @ 004b81a0] final ratefactor: 17.03
    [libx264 @ 004b81a0] 8x8 transform intra:3.4% inter:31.3%
    [libx264 @ 004b81a0] direct mvs  spatial:0.0% temporal:100.0%
    [libx264 @ 004b81a0] coded y,uvDC,uvAC intra: 4.4% 35.8% 1.6% inter: 1.3% 34.5% 9.5%
    [libx264 @ 004b81a0] i16 v,h,dc,p:  0%  0%  0% 100%
    [libx264 @ 004b81a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 20% 17% 49%  0%  0%  0%  1%  6%
    [libx264 @ 004b81a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14%  7% 18% 45%  2%  7%  2%  3%  2%
    [libx264 @ 004b81a0] i8c dc,h,v,p:  2%  6%  4% 88%
    [libx264 @ 004b81a0] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 004b81a0] ref P L0: 95.6%  1.6%  2.2%  0.5%  0.2%
    [libx264 @ 004b81a0] ref B L0: 67.5% 28.5%  3.2%  0.8%
    [libx264 @ 004b81a0] kb/s:166.45

    "ffprobe.exe test.h264 -show_streams" returns

    [STREAM]
    index=0
    codec_name=h264
    codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile=High
    codec_type=video
    codec_time_base=1/50
    codec_tag_string=[0][0][0][0]
    codec_tag=0x0000
    width=352
    height=288
    has_b_frames=1
    sample_aspect_ratio=0:1
    display_aspect_ratio=0:1
    pix_fmt=yuv420p
    level=13
    timecode=N/A
    id=N/A
    r_frame_rate=50/2
    avg_frame_rate=25/1
    time_base=1/1200000
    start_pts=N/A
    start_time=N/A
    duration_ts=N/A
    duration=N/A
    bit_rate=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    [/STREAM]

    There you can see :

    start_time=N/A
    duration_ts=N/A
    duration=N/A

    I have tried countless changes to the AVCodecContext and multitude of parameters options to av_opt_set function. Still no luck getting a working H.264 video. I have even tried different builds of FFmpeg. No luck.

    I’m using the "FFmpeg git-0fb64da 32-bit Dev" build from Zeranoe and MinGw 4.7.2