
Recherche avancée
Autres articles (32)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (5608)
-
Multiple trims to a video using ffmpeg generating video with shorter duration than expected [closed]
9 septembre 2024, par GerardoI have an application that given a video it trims multiple parts of that video using
ffmpeg
. Each part is cropped, scaled and then concatenated to generate a single video.

To share an example, I have a video of 1 minute and 44 seconds of duration and 60 fps. My goal is to trim 3 parts of the video :


- 

- First one between seconds 0 to 44.666
- Second one between seconds 44.666 to 74.349
- Third one between seconds 74.349 to 103.985








The ffmpeg command I use to achieve that is the following one :


ffmpeg -y -hide_banner -i bg_720_1280.png -i error.mp4 -filter_complex "
[1:v]trim=0.0:44.666,setpts=PTS-STARTPTS,crop=405.0:720.0:437.5:0.0,scale=-2:1280.0[crop_1_0_v];
[1:a]atrim=0.0:44.666,volume=1.0,asetpts=PTS-STARTPTS[crop_1_0_a];
[0:v][crop_1_0_v]overlay=enable='between(t,0,44.666)':x=0.0:y=0.0[crop_1_0_v];
[1:v]trim=44.666:74.349,setpts=PTS-STARTPTS,crop=405.0:720.0:437.5:0.0,scale=-2:1280.0[crop_2_0_v];
[1:a]atrim=44.666:74.349,volume=1.0,asetpts=PTS-STARTPTS[crop_2_0_a];
[0:v][crop_2_0_v]overlay=enable='between(t,0,29.683)':x=0.0:y=0.0[crop_2_0_v];
[1:v]trim=74.349:103.985,setpts=PTS-STARTPTS,crop=405.0:720.0:437.5:0.0,scale=-2:1280.0[crop_3_0_v];
[1:a]atrim=74.349:103.985,volume=1.0,asetpts=PTS-STARTPTS[crop_3_0_a];
[0:v][crop_3_0_v]overlay=enable='between(t,0,29.636)':x=0.0:y=0.0[crop_3_0_v];
[crop_1_0_a][crop_2_0_a][crop_3_0_a]concat=n=3:v=0:a=1[a];
[crop_1_0_v][crop_2_0_v][crop_3_0_v]concat=n=3:v=1:a=0[outv];
[a]amix=1:duration=longest[outa]" -map "[outv]" -map "[outa]" -vcodec libx264 -acodec aac -sws_flags lanczos -pix_fmt yuv420p -crf 17 -preset superfast -r 60 test.mp4



Running this command it generates a video of 11 seconds of duration and I'm unable to understand it. What is wrong with the command ? Also I'm open to recommendations of the ffmpeg command in case you find another way more efficient or performant.


I'm using the following FFMPEG version :


ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.3.9.4)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/7.0.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
 libavutil 59. 8.100 / 59. 8.100
 libavcodec 61. 3.100 / 61. 3.100
 libavformat 61. 1.100 / 61. 1.100
 libavdevice 61. 1.100 / 61. 1.100
 libavfilter 10. 1.100 / 10. 1.100
 libswscale 8. 1.100 / 8. 1.100
 libswresample 5. 1.100 / 5. 1.100
 libpostproc 58. 1.100 / 58. 1.100



But I got the same issue with static ffmpeg builds


The file
bg_720_1280.png
is just a transparent image of resolution 720x1280. I think I could achieve the same by usingnullsrc
filter with that resolution instead of using this background image.

-
Generate special file list
11 novembre 2020, par michelHow can I get a list like this in bash :
I have to create a list like this and then concatenate the files for ffmpeg.


ls -l stream
-rw-r - r-- 1 root root 0 Nov 9 20:30 Il.Gatto.Nero.2019.mp4
-rw-r - r-- 1 root root 0 Nov 9 20:30 My.Name.2019.mp4
-rw-r - r-- 1 root root 0 Nov 9 20:30 Terminator.2019.mp4
-rw-r - r-- 1 root root 0 Nov 9 20:30 spot-Il.Gatto.Nero.2019.mp4
-rw-r - r-- 1 root root 0 Nov 9 20:30 spot-My.Name.2019.mp4
-rw-r - r-- 1 root root 0 Nov 9 20:30 spot-Terminator.2019.mp4

i need to create a txt file like this:

file '/stream/spot-Il.Gatto.Nero.2019.mp4'
file '/stream/Il.Gatto.Nero.2019.mp4'
file '/stream/spot-Terminator.2019.mp4'
file '/stream/Terminator.2019.mp4'
file '/stream/spot-My.Name.2019.mp4'
file '/stream/My.Name.2019.mp4'
file ..........



ls -l | awk {'print "file \047/data/"$9 "\047" '} | awk NF
file '/data/'
file '/data/Il.Gatto.Nero.2019.mp4'
file '/data/Il.Mio.Nome.2019.mp4'
file '/data/Terminator.2019.mp4'
file '/data/spot-Il.Gatto.Nero.2019.mp4'
file '/data/spot-Il.Mio.Nome.2019.mp4'
file '/data/spot-Terminator.2019.mp4'



Greetings Mich


in php have write this :


<?php
$db_host = 'localhost';
$db_name = 'genlist';
$db_user = '********';
$db_pass = '********';
$conn = mysqli_connect($db_host, $db_user, $db_pass);

if (!$conn) {
 die("Connection failed: " . mysqli_connect_error());
} else {
//echo "Connected successfully";
}
mysqli_select_db($conn,$db_name) or die ("Error select db: " . mysqli_error());

$sql = "SELECT * FROM tb_movie ORDER BY RAND()";
$query = mysqli_query($conn,$sql);

while($result = mysqli_fetch_assoc($query)) {

$data = "file '/data/EagleCinema/CinemaDramaNew/stream/" . $result['spot'] . "'"."\n";
$data .= "file '/data/EagleCinema/CinemaDramaNew/stream/" . $result['movie'] . "'"."\n";

file_put_contents('/var/www/html/random-cinema-drama.txt', $data, FILE_APPEND );

}


?>



php result :


file '/data/EagleCinema/CinemaDramaNew/stream/spot-Demolition.-.Amare.E.Vivere.2015.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/Demolition.-.Amare.E.Vivere.2015.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/spot-Una.Giusta.Causa.2018.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/Una.Giusta.Causa.2018.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/spot-Io.Prima.Di.Te.2016.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/Io.Prima.Di.Te.2016.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/spot-A.Beautiful.Day.2017.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/A.Beautiful.Day.2017.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/spot-Un.Improbabile.Amicizia.2019.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/Un.Improbabile.Amicizia.2019.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/spot-The.Intervention.2016.mp4'
file '/data/EagleCinema/CinemaDramaNew/stream/The.Intervention.2016.mp4'



...


i need same result but with bash script no DB, only scan ffrom directory the file and generate the list.


-
doc/libav-merge : add skipped fixup commits to the list of missing changes
13 novembre 2016, par Hendrik Leppkes