
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (30)
-
À propos des documents
21 juin 2013, parQue faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
Document bloqué en file d’attente ?
Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...) -
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (5898)
-
How can I increase the size of an mp4 file to a specific value ?
20 juin 2023, par zoomer-girlthis is my first time here. I'm not a programmer. Question : For example, I have a video file size of 1500 mb, I need to increase the video size to 3500 mb, without changing the video quality or lenght. It is important that the final file size should have an accuracy of +- 10 mb. I thought it could be done by adding a second empty audio track using FFMPEG, but I didn't succeed :( If anyone knows how to do this, please help


I tried to add an empty audio track lasting several hours and with a bitrate of 192 kbps using FFMPEG. However, the file size did not change much, although this audio track appeared in the VLC player, but for some reason it showed that the bitrate was 1 kbps


-
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'}}



-
Reading images from AXIS ip camera using OpenCV
14 juin 2016, par batumanI am trying to access AXIS IP camera from my program using OpenCV.
My OpenCV version is 3.1. I follow this tutorial link.I have all libraries installed.
My following program can load mp4 video successfully. That means ffmpeg and necessary libraries are working fine.#include <iostream>
#include <opencv2></opencv2>opencv.hpp>
using namespace std;
int main() {
cv::VideoCapture vcap("test.mp4");
cv::Mat image;
// const string address = "rtsp://root:pass@192.168.0.90/axis-media/media.amp?camera=1";
// if(!vcap.open(address)){
// std::cout << "Error opening video stream or file " << std::endl;
// return -1;
// }
for(;;){
if(!vcap.read(image)){
std::cout << "No frame" << std::endl;
cv::waitKey(0);
}
cv::imshow("Display", image);
cv::waitKey(1);
}
return 0;
}
</iostream>When I tried to access the IP Camera as follow
cv::VideoCapture vcap("rtsp://root:pass@192.168.0.90/axis-media/media.amp?camera=1");
I have the following error
GStreamer Plugin: Embedded video playback halted; module source reported: Could
not open resource for reading and writing.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /home/Softwares/opencv/opencv/modules
/videoio/src/cap_gstreamer.cpp, line 818
terminate called after throwing an instance of 'cv::Exception'
what(): /home/Softwares/opencv/opencv/modules/videoio/src/cap_gstreamer.
cpp:818: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamerUser is root and password is pass and ip 192.168.0.90 are all defaults.
My if config gave me
ifconfig
eth0 Link encap:Ethernet HWaddr b8:2a:72:c6:b8:13
inet6 addr: fe80::ba2a:72ff:fec6:b813/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:723959 errors:0 dropped:0 overruns:0 frame:0
TX packets:116637 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:199422245 (199.4 MB) TX bytes:13701699 (13.7 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:24829 errors:0 dropped:0 overruns:0 frame:0
TX packets:24829 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2502903 (2.5 MB) TX bytes:2502903 (2.5 MB)
wlan0 Link encap:Ethernet HWaddr a0:a8:cd:99:92:60
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)What could be the problem for this access to the camera ?
Thanks