
Recherche avancée
Autres articles (41)
-
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 (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5326)
-
Best Web Video Encoding Practices for IOS (FFMpeg)
21 juin 2012, par MagicMushroomI am working on an online video repository system for a client, written mostly in PHP. At the moment I am building a mobile version of our desktop website. Our desktop site allows users to watch videos in the browser, much like YouTube.
My client uploads videos through the manager interface I have created, and my application uses FFmpeg on the server to transcode his videos into several resolutions and bitrates. I am no expert on FFmpeg, and while I do not know the ins and outs of each individual setting, I do understand how it works as a whole. Right now, we are using the mp4 container format with the h.264 codec to encode our videos. Our command looks like :
ffmpeg -y -i "INPUT FILE.mov" -f mp4 -s 640x480 -vcodec libx264 -preset fast -maxrate 1500 -bitrate 1000 -bufsize 4096 -acodec libfaac -ab 192 -ac 2 "OUTPUT_FILE.mp4" >> "FILE.log" 2>&1 &
I'm hoping to gain information about best practices with encoding video for web streaming on IOS and other mobile devices using FFmpeg. What resolutions and settings make for good mobile streaming video ? How can I ensure maximum compatibility across the sea of Android devices ?
-
ffmpeg video duration is not equal to duration after hls process
9 décembre 2022, par Timur KhazhievProblem


For videofile input I preprocess/encode it to
libx264
. Then I'm trying to cut video into 2 second chunks except last one (last one being < 2 seconds) using hls processing

ffmpeg -v error -i video.mp4 -x264-params "keyint=60:min-keyint=60:scenecut=0" 
-hls_time 2 -hls_list_size 0 -hls_segment_filename chunk%03d.ts index.m3u8



which follows this problem


then looking into
index.m3u8
file reveals that sum of all chunks' durations does not add up to original video duration :

% ffprobe -loglevel quiet -print_format flat -show_entries format=duration index.m3u8 

format.duration="204.880000"

% ffprobe -loglevel quiet -print_format flat -show_entries format=duration video.mp4 

format.duration="204.892813"



Moreover duration of a chunk in
index.m3u8
is not the same as in chunk file.

% ffprobe -loglevel quiet -print_format flat -show_entries format=duration chunk000.ts

format.duration="2.023222"

% cat index.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:2.000000,
chunk000.ts
#EXTINF:2.000000,
chunk001.ts
#EXTINF:2.000000,
chunk002.ts
...



Misc


Used these videos : Me at the zoo and I finally found a useful monorail.


OS : macos Monterey 12.3.1 (21E258)


ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 14.0.0 (clang-1400.0.29.102)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --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
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100



What I tried


- 

- Preprocess/transcode video before proceeding with hls
- Force keyframes before proceeding with hls
- Use 1, 3, 4 seconds chunks
- Use different GOP sizes
-hls_flags split_by_time












but it leads to same result or very unequal chunks


Questions


- 

- Is it ok or I'm missing something ?
- If not, what parameters/options should I use to force chunks to be precisely 2 seconds ?






-
Bash : bash script to download trimmed mp3 from youtube url
25 août 2017, par Bhishan PoudelI would like to download the initially x seconds trimmed mp3 from a video url of youtube.
I found that youtube-dl can download the video from youtube to local machine. But, when I looked at the man pages of youtube-dl, I could not find any trim options.So I tried to use the ffmpeg to trim downloaded mp3 file.
Instead of doing this is two steps, I like to write one bash script which does the same thing.
My attempt is given below.However, I was stuck at one place :
"HOW TO GET THE VARIABLE NAME OF OUTPUT MP3 FILE FROM YOUTUBE-DL ?"
The script is given below :# trim initial x seconds of mp3 file
# e.g. mytrim https://www.youtube.com/watch?v=dD5RgCf1hrI 30
function mytrim() {
youtube-dl --extract-audio --embed-thumbnail --audio-format mp3 -o "%(title)s.%(ext)s" $1
ffmpeg -ss $2 -i $OUTPUT_MP3 -acodec copy -y temp.mp3
mv temp.mp3 $OUTPUT_MP3
}How to get the variable value $OUTPUT_MP3 ?
echo "%(title)s.%(ext)s" gives the verbatim output, does not give the output filename.How could we make the script work ?
The help will be appreciated.