
Recherche avancée
Autres articles (47)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (6643)
-
Python : Extracting device and lens information from video metadata
14 mai 2023, par cat_got_my_tongueI 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 :

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



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


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

import ffmpeg
from pprint import pprint

test_video = "my_video.mp4"
pprint(ffmpeg.probe(test_video)["streams"])



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 :


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



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


Thanks.


Edit :


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

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



-
embed timestamps into MP4 container
28 juin 2023, par Dmitrii DunaevI have a fragmented MP4 file. It was created by recording a stream from a digital camera. Is there some way to store timestamps inside the container for later display on the web interface ?


-
10 Matomo Features You Possibly Didn’t Know About
28 octobre 2022, par Erin