
Recherche avancée
Autres articles (63)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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
Sur d’autres sites (11256)
-
Checking if a video has a sound even if it has an audio codec ?
19 janvier 2023, par SreenivasanI am new to intermediate python and I am trying to find if a downloaded video has sound, every video I download has an audio codec but I want to get the decibel of sound that audio has in that particular video.


For example, this 'FFmpeg' command line script allows me to get the full info :


ffmpeg -hide_banner -i testvideo.mp4 -af volumedetect -vn -f null - 2>&1



this yields the below result in my command prompt(windows user here with win 11)


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testvideo.mp4':

Metadata:

major_brand : mp42

minor_version : 0

compatible_brands: mp42mp41isomavc1

creation_time : 2022-04-12T23:21:45.000000Z

Duration: 00:00:40.58, start: 0.000000, bitrate: 4104 kb/s

Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 3846 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)

Metadata:

creation_time : 2022-04-12T23:21:45.000000Z

handler_name : L-SMASH Video Handler

vendor_id : [0][0][0][0]

encoder : AVC Coding

Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)

Metadata:

creation_time : 2022-04-12T23:21:45.000000Z

handler_name : L-SMASH Audio Handler

vendor_id : [0][0][0][0]

Stream mapping:

Stream #0:1 -> #0:0 (aac (native) -> pcm_s16le (native))

Press [q] to stop, [?] for help

Output #0, null, to 'pipe:':

Metadata:

major_brand : mp42

minor_version : 0

compatible_brands: mp42mp41isomavc1

encoder : Lavf59.35.100

Stream #0:0(und): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)

Metadata:

creation_time : 2022-04-12T23:21:45.000000Z

handler_name : L-SMASH Audio Handler

vendor_id : [0][0][0][0]

encoder : Lavc59.56.100 pcm_s16le

size=N/A time=00:00:40.55 bitrate=N/A speed=1.22e+03x

video:0kB audio:7608kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

[Parsed_volumedetect_0 @ 0000026609be08c0] n_samples: 3895296

[Parsed_volumedetect_0 @ 0000026609be08c0] mean_volume: -91.0 dB

[Parsed_volumedetect_0 @ 0000026609be08c0] max_volume: -91.0 dB

[Parsed_volumedetect_0 @ 0000026609be08c0] histogram_91db: 3895296



As you can see there are 'parsed_volumedetect' values with dB which has a mean value of -91 dB which means the audio has no sound, i.e., the video has audio but there is no sound.


Now I am trying to do the same in python and I want to get just the mean volume value to be stored in a variable so that I can check if the video has any sound in it.


I have seen the subprocess codes so far but when I try to run my code in VS-Code - python 3.11 :


import subprocess 
result = subprocess.run(["ffmpeg", "-hide_banner", "-af", "volumedetect", "-vn", "-f", "null", "testvideo1.mp4"],
 stdout=subprocess.PIPE,
 stderr=subprocess.STDOUT,
 shell=True)
 print(result.stdout)



It says that :


PS C:\Users\balaj\OneDrive\Documents\Programming language\python files> c:; cd 'c:\Users\balaj\OneDrive\Documents\Programming language\python files'; & 'C:\Python311\python.exe' 'c:\Users\balaj\.vscode\extensions\ms-python.python-2022.20.2\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '51760' '--' 'c:\Users\balaj\OneDrive\Documents\Programming language\python files\devproject\sample.py'

b"Output #0, null, to 'testvideo1.mp4':\r\nOutput file #0 does not contain any stream\r\n"



Any help is much appreciated. Sorry for the long post... TIA !!!


Just a quick update :
The result is the same for video files that have sound(I tested in VLC) and don't have sound.


Another update :
I have changed the
subprocess.run
code to the exact same as I called in the cmd windows :

result = subprocess.run(["ffmpeg", "-hide_banner","-i","testvideo-sound.mp4", "-af", "volumedetect", "-vn", "-f", "null", "-2>&1"]



Now the result is this :


b'The handle could not be duplicated\r\nduring redirection of handle 1.\r\n'



-
How easy is it to create a YouTube to MP3 application using yt-dlp and ffmpeg ?
26 juin 2022, par fowlisI was thinking I could automate the process of downloading a video and converting it to mp3 (or other formats).

Instead of doing the process myself (which doesn't take that long and isn't too much hassle), which looks something like this :

•yt-dlp https://www.youtube.com/watch?v=dQw4w9WgXcQ

• wait for download then (find and) rename file to something simpler for next command

•ffmpeg -i video.mp4 video.mp3



I thought I could turn it into a simple JS (or other language) program instead, where it :


- 

- Asks for link and what format I want it in
- Downloads the video
- Renames it (not sure how easy this is)
- Turns it into requested format
- Opens file location












If something like this is possible, please let me know some things I should know since I've never written a windows app before, and some general guidance for how I could do this.

I apologise if questions like this aren't exactly allowed on this site, its my first time posting too.

Thanks in advance !

-
Manipulate video with ffmpeg without losing quality
17 août 2016, par TheChymeraI am rotating a video with ffmpeg with the following code :
ffmpeg -i nd750_a0040.MOV -vf "transpose=dir=clock, transpose=dir=clock" out.mkv
The resulting file is almost 10x smaller than the input.
I have found this question which addresses a related question and suggsts passing to ffmpeg the codec and bitrate obtained from the following :bitratev="$(ffmpeg -i "$1" -f null - |& grep video: | awk -F'[:|kB]' '{print $2}')"
codecv="$(ffprobe -loglevel error -select_streams v:0 -show_entries stream=codec_name -of default=nk=1:nw=1 "$1")"however, both of these commands give me the same output for both files :
2643
andh264
respectively.
Am I correct in assuming that ffmpeg keeps these values the same for the output - by default ?However, if I inspect the files with
ffmpeg -i
I get different bitrate values :Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'nd750_a0040.MOV':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt niko
creation_time : 2016-06-18 04:28:03
Duration: 00:15:40.74, start: 0.000000, bitrate: 11569 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 10029 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2016-06-18 04:28:03
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
creation_time : 2016-06-18 04:28:03and
Input #0, matroska,webm, from 'out.mkv':
Metadata:
COMPATIBLE_BRANDS: qt niko
MAJOR_BRAND : qt
MINOR_VERSION : 537331968
ENCODER : Lavf56.40.101
Duration: 00:15:40.74, start: 0.000000, bitrate: 1445 kb/s
Stream #0:0(eng): Video: h264 (High), yuvj420p(pc), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
Metadata:
CREATION_TIME : 2016-06-18 04:28:03
LANGUAGE : eng
ENCODER : Lavc56.60.100 libx264
DURATION : 00:15:40.742000000
Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
Metadata:
CREATION_TIME : 2016-06-18 04:28:03
LANGUAGE : eng
ENCODER : Lavc56.60.100 libvorbis
DURATION : 00:15:40.743000000So I have a few questions :
- Which bitrate is the correct one for each video ?
- Is all of the information loss between these two files covered by the bitrate (or does ffmpeg by default change other things that lead to a lower file size as well - if so, what ?) ?
- How do I make sure nothing else changes but the container format and the rotation ?