
Recherche avancée
Autres articles (66)
-
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 ;
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (9753)
-
ffmpeg h.264 invalid cutting
1er mai 2012, par E.ArI have an s3 bucket with several hundreds video files.
Those files were created by cutting parts of larger video files using ffmpeg.
I wrote a script for this, which downloads the original video file from another bucket, runs ffmpeg to cut the file, and uploads the new file to it's bucket.
For downloading and uploading from/to s3 i used this php library.
The ffmpeg syntax I used :ffmpeg -y -vsync 2 -async 1 -ss [time-in] -t [duration] -i [large-input-video.mp4] -vcodec copy -acodec copy [short-output-video.mp4]
Which should just cut the original file between the specified times, without any changes to the a/v codecs.
All the original video files are encoded in h.264, and this is also the required encoding for the new files (which will be streamed through a CDN to the clients' flash players).My problem is that only a small part of the new files are coming out as encoded in h.264, but most of them aren't (h.264 is a must, otherwise the files wont play on the clients' side).
I can't trace the problem to the original videos, since when i use the same ffmpeg command manually, with the same parameters and on the same files, the output files come out just fine. It seems arbitrary.I use ffprobe to get information about the files' codecs.
For example :
ffprobe of one of the large (original) video files :...
Stream #0.0(und) : Video : h264, yuv420p, 640x352, 499 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
...ffprobe of the corresponding new cut file :
...
Stream #0.0(und) : Video : mpeg4, yuv420p, 640x352 [PAR 1:1 DAR 20:11], 227 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
...As can be seen, the difference is in 'mpeg4' vs. 'h264'.
Any insights on what can cause the new files to come out in the wrong encoding would be greatly appreciated.
Thanks !
Edit : Problem Resolved
After analyzing all the files, I noticed that about two thirds of them are coming out in the wrong codec.
Since I used three machines for the cutting process (three separate EC2 servers), it occurred to me that on two of them there is a bad installation of ffmpeg (as @LordNeckbeard suggested in his answer).
I ran the process again, only on the invalid files, on the third machine alone - which produced the desired result. -
Resizing 360 stereoscopic video with FFMPEG
13 mars 2018, par Miriam TschanenI’m trying to prepare a 360 stereoscopic video from our VR app for streaming. We’d like to offer the video in different resolutions to accomodate varying internet speeds. The original file is 3840x2160 and 463MB large.
I tried using the naive FFMPEG command :
ffmpeg -i video_3840.mp4 -vf scale=2560:1440 video_2560.mp4However, this seems to remove the stereoscopic / 360 properties of the video, at any rate the Windows video player no longer lets me pan around the view and the file size is down to 74MB, which seems a bit extreme.
Does anyone know which other flags I should set ? Note that I have absolutely no clue about filming or video formats, so I don’t even know what the original file is encoded as. Ideally I’d like to copy over as many settings as possible. The only thing I want to change is the resolution.
Any help would be greatly appreciated.
-
macos - Batch create 'samples' with multiple cuts from videos [closed]
17 février, par ThiagoI'm on macOS, and have ffmpeg and python installed through homebrew. Bash solutions are also welcome - though I have no experience with bash


I have folders with many videos, most (if not all) in either mp4 or mkv. I want to generate quick samples for each video, and each sample should have multiples slices/cuts from the original video.


I don't care if the resulting encode, resolution and bitrate are the same as the original, or if it's fixed for example : mp4 at 720. Whatever is easier to write on the script or faster do execute.


Example result : folder has 10 videos of different duration. Script will result in 10 videos titled "ORIGINALTITLE-sample.EXT". Each sample will be 2 minutes long, and it'll be made of 24 cuts - 5 seconds long each - from the original video.


The cuts should be approximately well distributed during the video, but doesn't need to be precise.


Edit


someone on Reddit suggested the script below, but the result has some issues, like images blinking in and out (see it here https://youtu.be/FZC3aIvugpI). Maybe it's related to errors like this I saw ?
[hevc @ 0x11c631a30] Could not find ref with POC -43


I was also not able to change the 1-second duration of each clip for something longer, and would still need to make this loop on every video in the folder.


#!/bin/bash
f="original.mp4"
dur=$(ffprobe -v 16 -show_entries format=duration -of csv=p=0 "$f")
cnt=$(echo "scale=0; ${dur} * 0.95 / 8" | bc -l)
echo $dur $cnt

ffmpeg -i "$f" -c copy -f segment -segment_time $cnt -reset_timestamps 1 "/tmp/out_%03d.${f##*.}" -y -hide_banner

echo "#list">/tmp/1.txt
for g in /tmp/out_*; do
 echo "file $g" >> /tmp/1.txt
 echo "outpoint 1" >> /tmp/1.txt
done

o="/tmp/out.${f##*.}"
ffmpeg -f concat -safe 0 -i /tmp/1.txt -c copy "$o" -y -v error -stats test.mp4