Recherche avancée

Médias (91)

Autres articles (102)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

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

  • Way to bypass video upload when testing using Rspec

    1er mars 2014, par Justin

    I'm testing a page on my app that shows videos. I'm trying to speed up the test by bypassing the video upload process or another way ??

    Maybe I'm using FactoryGirl incorrectly for file uploads..

    Using FactoryGirl, I'm creating the video with

    FactoryGirl.define do
    factory :video do
     user_id 1
     type "Live"
     title "FooBar"
     description "Foo bar is the description"
     video { fixture_file_upload(Rails.root.join('spec', 'files', 'concert.mov'), 'video/mp4') }
    end
    end

    And in the request's spec I'm describing the videos as :

    describe "videos page" do

     let(:user) { FactoryGirl.create(:user) }
     let!(:video1) { FactoryGirl.create(:video) }

     before { visit user_video_path(user) }

     it { should have_title(user.name) }
     it { should have_content(user.name) }

     describe "videos" do
       it { should have_content(video1.description) }
     end
    end

    Now, everytime I run the test for this page it goes through the file upload process which takes more time. I'm also using FFmpeg

    **video.rb (video model)**

    validates :video, presence: true
    has_attached_file :video, :styles => {
                                         :medium => { :geometry => "640x480", :format => 'mp4' },
                                         :thumb => { :geometry => "470x290#", :format => 'jpg', :time => 10 }
                                        },
                             :processors => [:ffmpeg]

    What this does when I test the page is the CLI goes through the video upload process like it would if you were uploading the video and watching your local server.

  • Merge commit ’c708b5403346255ea5adc776645616cc7c61f078’

    9 mars 2014, par Michael Niedermayer
    Merge commit ’c708b5403346255ea5adc776645616cc7c61f078’
    

    * commit ’c708b5403346255ea5adc776645616cc7c61f078’ :
    timer : use mach_absolute_time as high resolution clock on darwin

    Conflicts :
    configure

    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] configure
    • [DH] libavutil/timer.h
  • Python : Extracting device and lens information from video metadata

    14 mai 2023, par cat_got_my_tongue

    I am interested in extracting device and lens information from videos. Specifically, make and model of the device and the focal length. I was able to do this successfully for still images using the exifread module and extract a whole bunch of very useful information :

    &#xA;

    image type      : MPO&#xA;Image ImageDescription: Shot with DxO ONE&#xA;Image Make: DxO&#xA;Image Model: DxO ONE&#xA;Image Orientation: Horizontal (normal)&#xA;Image XResolution: 300&#xA;Image YResolution: 300&#xA;Image ResolutionUnit: Pixels/Inch&#xA;Image Software: V3.0.0 (2b448a1aee) APP:1.0&#xA;Image DateTime: 2022:04:05 14:53:45&#xA;Image YCbCrCoefficients: [299/1000, 587/1000, 57/500]&#xA;Image YCbCrPositioning: Centered&#xA;Image ExifOffset: 158&#xA;Thumbnail Compression: JPEG (old-style)&#xA;Thumbnail XResolution: 300&#xA;Thumbnail YResolution: 300&#xA;Thumbnail ResolutionUnit: Pixels/Inch&#xA;Thumbnail JPEGInterchangeFormat: 7156&#xA;Thumbnail JPEGInterchangeFormatLength: 24886&#xA;EXIF ExposureTime: 1/3&#xA;EXIF FNumber: 8&#xA;EXIF ExposureProgram: Aperture Priority&#xA;EXIF ISOSpeedRatings: 100&#xA;EXIF SensitivityType: ISO Speed&#xA;EXIF ISOSpeed: 100&#xA;EXIF ExifVersion: 0221&#xA;EXIF DateTimeOriginal: 2022:04:05 14:53:45&#xA;EXIF DateTimeDigitized: 2022:04:05 14:53:45&#xA;EXIF ComponentsConfiguration: CrCbY&#xA;EXIF CompressedBitsPerPixel: 3249571/608175&#xA;EXIF ExposureBiasValue: 0&#xA;EXIF MaxApertureValue: 212/125&#xA;EXIF SubjectDistance: 39/125&#xA;EXIF MeteringMode: MultiSpot&#xA;EXIF LightSource: Unknown&#xA;EXIF Flash: Flash did not fire&#xA;EXIF FocalLength: 1187/100&#xA;EXIF SubjectArea: [2703, 1802, 675, 450]&#xA;EXIF MakerNote: [68, 88, 79, 32, 79, 78, 69, 0, 12, 0, 0, 0, 21, 0, 3, 0, 5, 0, 2, 0, ... ]&#xA;EXIF SubSecTime: 046&#xA;EXIF SubSecTimeOriginal: 046&#xA;EXIF SubSecTimeDigitized: 046&#xA;EXIF FlashPixVersion: 0100&#xA;EXIF ColorSpace: sRGB&#xA;EXIF ExifImageWidth: 5406&#xA;EXIF ExifImageLength: 3604&#xA;Interoperability InteroperabilityIndex: R98&#xA;Interoperability InteroperabilityVersion: [48, 49, 48, 48]&#xA;EXIF InteroperabilityOffset: 596&#xA;EXIF FileSource: Digital Camera&#xA;EXIF ExposureMode: Auto Exposure&#xA;EXIF WhiteBalance: Auto&#xA;EXIF DigitalZoomRatio: 1&#xA;EXIF FocalLengthIn35mmFilm: 32&#xA;EXIF SceneCaptureType: Standard&#xA;EXIF ImageUniqueID: C01A1709306530020220405185345046&#xA;EXIF BodySerialNumber: C01A1709306530&#xA;

    &#xA;

    Unfortunately, I have been unable to extract this kind of info from videos so far.

    &#xA;

    This is what I have tried so far, with the ffmpeg module :

    &#xA;

    import ffmpeg&#xA;from pprint import pprint&#xA;&#xA;test_video = "my_video.mp4"&#xA;pprint(ffmpeg.probe(test_video)["streams"])&#xA;

    &#xA;

    And the output I get contains a lot of info but nothing related to the device or lens, which is what I am looking for :

    &#xA;

    [{&#x27;avg_frame_rate&#x27;: &#x27;30/1&#x27;,&#xA;  &#x27;bit_rate&#x27;: &#x27;1736871&#x27;,&#xA;  &#x27;bits_per_raw_sample&#x27;: &#x27;8&#x27;,&#xA;  &#x27;chroma_location&#x27;: &#x27;left&#x27;,&#xA;  &#x27;codec_long_name&#x27;: &#x27;H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&#x27;,&#xA;  &#x27;codec_name&#x27;: &#x27;h264&#x27;,&#xA;  &#x27;codec_tag&#x27;: &#x27;0x31637661&#x27;,&#xA;  &#x27;codec_tag_string&#x27;: &#x27;avc1&#x27;,&#xA;  &#x27;codec_time_base&#x27;: &#x27;1/60&#x27;,&#xA;  &#x27;codec_type&#x27;: &#x27;video&#x27;,&#xA;  &#x27;coded_height&#x27;: 1088,&#xA;  &#x27;coded_width&#x27;: 1920,&#xA;  &#x27;display_aspect_ratio&#x27;: &#x27;16:9&#x27;,&#xA;  &#x27;disposition&#x27;: {&#x27;attached_pic&#x27;: 0,&#xA;                  &#x27;clean_effects&#x27;: 0,&#xA;                  &#x27;comment&#x27;: 0,&#xA;                  &#x27;default&#x27;: 1,&#xA;                  &#x27;dub&#x27;: 0,&#xA;                  &#x27;forced&#x27;: 0,&#xA;                  &#x27;hearing_impaired&#x27;: 0,&#xA;                  &#x27;karaoke&#x27;: 0,&#xA;                  &#x27;lyrics&#x27;: 0,&#xA;                  &#x27;original&#x27;: 0,&#xA;                  &#x27;timed_thumbnails&#x27;: 0,&#xA;                  &#x27;visual_impaired&#x27;: 0},&#xA;  &#x27;duration&#x27;: &#x27;20.800000&#x27;,&#xA;  &#x27;duration_ts&#x27;: 624000,&#xA;  &#x27;has_b_frames&#x27;: 0,&#xA;  &#x27;height&#x27;: 1080,&#xA;  &#x27;index&#x27;: 0,&#xA;  &#x27;is_avc&#x27;: &#x27;true&#x27;,&#xA;  &#x27;level&#x27;: 40,&#xA;  &#x27;nal_length_size&#x27;: &#x27;4&#x27;,&#xA;  &#x27;nb_frames&#x27;: &#x27;624&#x27;,&#xA;  &#x27;pix_fmt&#x27;: &#x27;yuv420p&#x27;,&#xA;  &#x27;profile&#x27;: &#x27;Constrained Baseline&#x27;,&#xA;  &#x27;r_frame_rate&#x27;: &#x27;30/1&#x27;,&#xA;  &#x27;refs&#x27;: 1,&#xA;  &#x27;sample_aspect_ratio&#x27;: &#x27;1:1&#x27;,&#xA;  &#x27;start_pts&#x27;: 0,&#xA;  &#x27;start_time&#x27;: &#x27;0.000000&#x27;,&#xA;  &#x27;tags&#x27;: {&#x27;creation_time&#x27;: &#x27;2021-05-08T13:23:20.000000Z&#x27;,&#xA;           &#x27;encoder&#x27;: &#x27;AVC Coding&#x27;,&#xA;           &#x27;handler_name&#x27;: &#x27;VideoHandler&#x27;,&#xA;           &#x27;language&#x27;: &#x27;und&#x27;},&#xA;  &#x27;time_base&#x27;: &#x27;1/30000&#x27;,&#xA;  &#x27;width&#x27;: 1920},&#xA; {&#x27;avg_frame_rate&#x27;: &#x27;0/0&#x27;,&#xA;  &#x27;bit_rate&#x27;: &#x27;79858&#x27;,&#xA;  &#x27;bits_per_sample&#x27;: 0,&#xA;  &#x27;channel_layout&#x27;: &#x27;stereo&#x27;,&#xA;  &#x27;channels&#x27;: 2,&#xA;  &#x27;codec_long_name&#x27;: &#x27;AAC (Advanced Audio Coding)&#x27;,&#xA;  &#x27;codec_name&#x27;: &#x27;aac&#x27;,&#xA;  &#x27;codec_tag&#x27;: &#x27;0x6134706d&#x27;,&#xA;  &#x27;codec_tag_string&#x27;: &#x27;mp4a&#x27;,&#xA;  &#x27;codec_time_base&#x27;: &#x27;1/48000&#x27;,&#xA;  &#x27;codec_type&#x27;: &#x27;audio&#x27;,&#xA;  &#x27;disposition&#x27;: {&#x27;attached_pic&#x27;: 0,&#xA;                  &#x27;clean_effects&#x27;: 0,&#xA;                  &#x27;comment&#x27;: 0,&#xA;                  &#x27;default&#x27;: 1,&#xA;                  &#x27;dub&#x27;: 0,&#xA;                  &#x27;forced&#x27;: 0,&#xA;                  &#x27;hearing_impaired&#x27;: 0,&#xA;                  &#x27;karaoke&#x27;: 0,&#xA;                  &#x27;lyrics&#x27;: 0,&#xA;                  &#x27;original&#x27;: 0,&#xA;                  &#x27;timed_thumbnails&#x27;: 0,&#xA;                  &#x27;visual_impaired&#x27;: 0},&#xA;  &#x27;duration&#x27;: &#x27;20.864000&#x27;,&#xA;  &#x27;duration_ts&#x27;: 1001472,&#xA;  &#x27;index&#x27;: 1,&#xA;  &#x27;max_bit_rate&#x27;: &#x27;128000&#x27;,&#xA;  &#x27;nb_frames&#x27;: &#x27;978&#x27;,&#xA;  &#x27;profile&#x27;: &#x27;LC&#x27;,&#xA;  &#x27;r_frame_rate&#x27;: &#x27;0/0&#x27;,&#xA;  &#x27;sample_fmt&#x27;: &#x27;fltp&#x27;,&#xA;  &#x27;sample_rate&#x27;: &#x27;48000&#x27;,&#xA;  &#x27;start_pts&#x27;: 0,&#xA;  &#x27;start_time&#x27;: &#x27;0.000000&#x27;,&#xA;  &#x27;tags&#x27;: {&#x27;creation_time&#x27;: &#x27;2021-05-08T13:23:20.000000Z&#x27;,&#xA;           &#x27;handler_name&#x27;: &#x27;SoundHandler&#x27;,&#xA;           &#x27;language&#x27;: &#x27;und&#x27;},&#xA;  &#x27;time_base&#x27;: &#x27;1/48000&#x27;}]&#xA;

    &#xA;

    Are these pieces of info available for videos ? Should I be using a different package ?

    &#xA;

    Thanks.

    &#xA;

    Edit :

    &#xA;

    pprint(ffmpeg.probe(test_video)["format"]) gives

    &#xA;

    {&#x27;bit_rate&#x27;: &#x27;1815244&#x27;,&#xA; &#x27;duration&#x27;: &#x27;20.864000&#x27;,&#xA; &#x27;filename&#x27;: &#x27;my_video.mp4&#x27;,&#xA; &#x27;format_long_name&#x27;: &#x27;QuickTime / MOV&#x27;,&#xA; &#x27;format_name&#x27;: &#x27;mov,mp4,m4a,3gp,3g2,mj2&#x27;,&#xA; &#x27;nb_programs&#x27;: 0,&#xA; &#x27;nb_streams&#x27;: 2,&#xA; &#x27;probe_score&#x27;: 100,&#xA; &#x27;size&#x27;: &#x27;4734158&#x27;,&#xA; &#x27;start_time&#x27;: &#x27;0.000000&#x27;,&#xA; &#x27;tags&#x27;: {&#x27;artist&#x27;: &#x27;Microsoft Game DVR&#x27;,&#xA;          &#x27;compatible_brands&#x27;: &#x27;mp41isom&#x27;,&#xA;          &#x27;creation_time&#x27;: &#x27;2021-05-08T12:12:33.000000Z&#x27;,&#xA;          &#x27;major_brand&#x27;: &#x27;mp42&#x27;,&#xA;          &#x27;minor_version&#x27;: &#x27;0&#x27;,&#xA;          &#x27;title&#x27;: &#x27;Snipping Tool&#x27;}}&#xA;

    &#xA;