
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (72)
-
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 -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)
Sur d’autres sites (7379)
-
Anomalie #4363 : mot de passe vide bloque le formulaire de réinitialisation du mot de passe d’un u...
3 août 2019, par b bComme tu le dis, "on" ne veut pas, mais en attendant que quelqu’un
propose mieuxmette à disposition la super fonctionnalité "qu’on veut", on peut répondre à la demande avec ce bouton. C’est bien de rappeler qu’on fait de la merde et qu’on devrait s’améliorer, mais en attendant on peut toujours s’en sortir avec l’existant :* -
How to get native frame rate of vide with FFmpex ?
18 juin 2021, par Flame_PhoenixBackground


I have an
.mp4
video and I need to get the video's frame rate. Using ffmepg (in Linux) I know I can get this information via the following command :

ffprobe -v 0 -of compact=p=0 -select_streams 0 -show_entries stream=r_frame_rate 'MyVideoFIle.mp4'



Which returns :


r_frame_rate=24000/1001



FFmpex


Doing this in bash is fine, but what I really want is to use it in my Elixir application. To this end I found out about
ffmpex
.

First I tried using
FFprobe
:

> FFprobe.format("Devil May Cry 5 Bury the Light LITTLE V COVER.mp4")

{:ok,
 %{
 "bit_rate" => "611784",
 "duration" => "482.999000",
 "filename" => "Devil May Cry 5 Bury the Light LITTLE V COVER.mp4",
 "format_long_name" => "QuickTime / MOV",
 "format_name" => "mov,mp4,m4a,3gp,3g2,mj2",
 "nb_programs" => 0,
 "nb_streams" => 2,
 "probe_score" => 100, 
 "size" => "36936415",
 "start_time" => "0.000000",
 "tags" => %{
 "compatible_brands" => "isomiso2avc1mp41",
 "encoder" => "Lavf58.19.102",
 "major_brand" => "isom",
 "minor_version" => "512"
 }
 }}



Which gives me some information, but not the frame rate.


My next tentative was to use the command options :


command = 
 FFmpex.new_command() 
 |> add_input_file("Devil May Cry 5 Bury the Light LITTLE V COVER.mp4") 
 |> add_video_option(???) 



But the problem here is that I can't find in the documentation the video option I need to get the native frame rate. I only found
vframe
which is used to set the video frame rate.

Question


- 

- How can I get the native fps of a video using
ffmpex
?




- How can I get the native fps of a video using
-
CMTimeGetSeconds doesn't get the right video duration
26 février 2015, par JLCastillosome users don’t get the right duration of videos they capture with their own device. The funny thing is others do actually see it right, using the same device models and OS version. Anyway, we observed it in a iPhone 5c 7.1.2 and an iPhone 5s 8.1.3.
This code works for most users, but not all :
ALAssetRepresentation *representation = [mediaObject.asset defaultRepresentation];
NSURL *url = [representation url];
NSDictionary *options = @{ AVURLAssetPreferPreciseDurationAndTimingKey : @YES };
AVAsset *avAsset = [AVURLAsset URLAssetWithURL:url options:options];
videoDurationTime = CMTimeGetSeconds(avAsset.duration);I asked them to send the input videos, and this is the output from "ffmpeg -i"
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bug_duration1.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2015-02-23 08:30:01
encoder : 8.1.3
encoder-eng : 8.1.3
date : 2015-02-23T16:30:01+0800
date-eng : 2015-02-23T16:30:01+0800
model : iPhone 5s
model-eng : iPhone 5s
make : Apple
make-eng : Apple
Duration: 00:00:03.67, start: 0.000000, bitrate: 16793 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 16719 kb/s, 29.99 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2015-02-23 08:30:01
handler_name : Core Media Data Handler
encoder : H.264
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 61 kb/s (default)
Metadata:
creation_time : 2015-02-23 08:30:01
handler_name : Core Media Data HandlerThe video is detected with a duration of several minutes. Did anybody face this problem before ?
Thanks in advance.