
Recherche avancée
Autres articles (52)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (7784)
-
FFmpeg - Convert video changing resolution and bitrates
8 avril 2021, par parvaresI’m trying to convert a video and change these parameters :


resolution : from 1.280x720 to 640x360 pixels


average bitrate : from 1.410 to 300 kb/s


maximum bitrate : from 1.680 to 2500 kb/s


Sampling rate : from 48.0 to 44.1 kHz


Bit rate audio : 128 kb/s


I used this string with ffmpeg vers. 4.3.2-2021-02-20 full build :


ffmpeg -i input.mp4 -c:v -vf scale=640:360 libx264 -b:v 300k -maxrate 2500k -bufsize 2500k -crf 25 -c:a -ar 44100 libfdk_aac -b:a 128k output.mp4



I get the error : “ffmpeg unable to find a suitable output format for scale ‘640:360’ scale 640:360 : invalid argument”. Could you help me please ?


Below is the original file analyzed by MediaInfo, thanks !


General


Complete name : C :\Users\parvares\Desktop\input.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 424 MiB
Duration : 38 min 21 s
Overall bit rate : 1 545 kb/s
Writing application : Lavf58.64.100


Video


ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 38 min 21 s
Bit rate : 1 410 kb/s
Maximum bit rate : 1 680 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.061
Stream size : 387 MiB (91%)
Writing library : x264 core 161 r3027 4121277
Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=125 / scenecut=40 / intra_refresh=0 / rc_lookahead=125 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1680 / vbv_bufsize=8400 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC


Audio


ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 38 min 21 s
Bit rate mode : Constant
Bit rate : 129 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 35.3 MiB (8%)
Default : Yes
Alternate group : 1


-
How to create video file using fs from react form ?
7 avril 2021, par KirasirisI'm developing a section in which I need to create a video from a form that I'm using in a React application ; the returned data that I get from said file is this :


File >
 lastModified: 1617759553928
 lastModifiedDate: Tue Apr 06 2021 20:39:13 GMT-0500 (Central Daylight Time) {}
 name: "Shinobi Sisters.mp4"
 path: "Shinobi Sisters.mp4"
 size: 2564227
 type: "video/mp4"
 webkitRelativePath: ""
 __proto__: File



I'm sending all of that to a function called
createDirectoryAndFile(path, file)
, which so far looks like this :

// CREATE VIDEO FILE
const dir = './temp';
const createDirectoryAndFile = async (inputPath, inputContent) => {
 if (!fs.existsSync(dir)) {
 fs.mkdir(dir, { recursive: true });
 }

 fs.writeFile(inputPath, inputContent, (err) => {
 if (err) {
 console.error('An error ocurred', err);
 } else {
 console.log('Your file has been made');
 }
 });
};



It gets to the point in which is able to create the 'temp' directory but fails to place the video within it. Is there a reason for this ?


I need this because this is the starting point for me to work in my application. I'm trying to upload a video, create a second copy of it with a watermark(thanks to ffmpeg and ffprobe) and then finally upload it to AWS S3.


From my understanding all of that is only possible if the video is actually exists(not in memory).


Do you have guys have any idea ? Yes, I already installed
ffmpeg
andffprobe


-
Python : How to clip/trim required part from the video and move the trimmed video file to other directory
4 avril 2021, par saurabhI'm trying to remove duplicate segments from videos from a directory and paste these trimmed videos to other directory.


For example :


I've following directory structure for saving live rtsp stream (each 1 min long) :-


Live_videos
------2021-04-04
 ------stream1
 -------14 36 08.avi( 1 min)
 14 37 08.avi( Saved only till 14 37 39 mark due to disconnect with stream1 camera)
 14 38 35.avi( 1 min)
 stream2
 -------14 36 15.avi( 1 min)
 14 37 15.avi( 1 min)
 14 38 14.avi( 1 min)



So, the disconnect and reconnect time are 14 37 40 and 14 38 34 respectively which will be sent to some other server and that server will search for videos saved in their machine which contains segments from the given timestamps and sends the video file in following directory structure : -


Edge_videos
-----------2021-04-04
 ----------stream1
 -------14 36 35.avi
 -------14 37 35.avi



Now, you can see that the received video files have the required segments from disconnect period as well as duplicate segments which are already saved in Live_videos directory.


How do I remove the duplicate segments from the received videos and move only the required trimmed video file to the Live_videos----> stream1 directory and delete all the files from Edge_videos afterwards.