
Recherche avancée
Autres articles (51)
-
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 (...) -
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...) -
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 (9902)
-
FFMPEG Encoding a video from a Readable stream
4 novembre 2022, par Michael AubryI'm facing an issue with the
seeked
event in Chrome. The issue seems to be due to how the video being seeked is encoded.

The problem seems to occur most frequently when using
ytdl-core
and piping a Readable stream into an FFMPEG child process.

let videoStream: Readable = ytdl.downloadFromInfo(info, {
 ...options,
 quality: "highestvideo"
});



With
ytdl-core
in order to get the highest quality you must combine the audio and video. So here is how I am doing it.

const ytmux = (link, options: any = {}) => {
 const result = new stream.PassThrough({
 highWaterMark: options.highWaterMark || 1024 * 512
 });

 ytdl.getInfo(link, options).then((info: videoInfo) => {
 let audioStream: Readable = ytdl.downloadFromInfo(info, {
 ...options,
 quality: "highestaudio"
 });
 let videoStream: Readable = ytdl.downloadFromInfo(info, {
 ...options,
 quality: "highestvideo"
 });
 // create the ffmpeg process for muxing
 let ffmpegProcess: any = cp.spawn(
 ffmpegPath.path,
 [
 // supress non-crucial messages
 "-loglevel",
 "8",
 "-hide_banner",
 // input audio and video by pipe
 "-i",
 "pipe:3",

 "-i",
 "pipe:4",
 // map audio and video correspondingly

 // no need to change the codec
 // output mp4 and pipe
 "-c:v",
 "libx264",
 "-x264opts",
 "fast_pskip=0:psy=0:deblock=-3,-3",
 "-preset",
 "veryslow",
 "-crf",
 "18",
 "-c",
 "copy",
 "-pix_fmt",
 "yuv420p",
 "-movflags",
 "frag_keyframe+empty_moov",
 "-g",
 "300",
 "-f",
 "mp4",

 "-map",
 "0:v",

 "-map",
 "1:a",

 "pipe:5"
 ],
 {
 // no popup window for Windows users
 windowsHide: true,
 stdio: [
 // silence stdin/out, forward stderr,
 "inherit",
 "inherit",
 "inherit",
 // and pipe audio, video, output
 "pipe",
 "pipe",
 "pipe"
 ]
 }
 );

 audioStream.pipe(ffmpegProcess.stdio[4]);
 videoStream.pipe(ffmpegProcess.stdio[3]);
 ffmpegProcess.stdio[5].pipe(result);
 });
 return result;
};



I am playing around with tons of different arguments. The result of this video gets uploaded to a Google Bucket. Then when seeking in Chrome I am getting some issues with certain frames, they are not being
seeked
.

When I pass it through FFMPEG locally and re-encode it, then upload it, I notice there are no issues.


Here is an image comparing the two results when running
ffmpeg -i FILE
(the one on the left works fine and the differences are minor)



I tried adjusting the arguments in the muxer code and am continuing to try and compare with the re-encoded video. I have no idea why this is happening, something to do with the frames.


-
VLC Ubuntu : Problems converting rstp streaming into http streaming
16 janvier 2019, par Gorka Sanz MonllorI am trying to convert in a Linux Ubuntu Machine a rstp stream into a http stream, so I execute the following comand :
vlc -vvv -Idummy rtsp://**************************************transportmode=unicast --sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8080/} --run-time= 300
vlc ://quit
and it doesn’t work. The output is the following :
root@f139da580fd9:/# vlc -vvv -Idummy rtsp://*********Streaming/Channels/101?transportmode=unicast --sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=ht tp{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8080/} --run-time= 300 vlc://quit
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[0000000000a9c178] core libvlc debug: VLC media player - 2.2.2 Weatherwax
[0000000000a9c178] core libvlc debug: Copyright © 1996-2016 the VideoLAN team
[0000000000a9c178] core libvlc debug: revision 2.2.2-0-g6259d80
[0000000000a9c178] core libvlc debug: configured with ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${pr efix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-main tainer-mode' '--disable-dependency-tracking' '--config-cache' '--disable-update-check' '--enable-fast-install' '--docdir=/usr/share/doc/vlc-data' '--libdir=/usr/lib' '--with-binary-version= 2.2.2-5ubuntu0.16.04.4' '--enable-a52' '--enable-aa' '--enable-bluray' '--enable-bonjour' '--enable-caca' '--enable-chromaprint' '--enable-dbus' '--enable-dca' '--enable-directfb' '--enable -dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freerdp' '--enable-freetype' '--enable-fribidi' '--disable-gles1' '--enable-gles2' '--enable-gnutl s' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '- -enable-mtp' '--enable-mux_ogg' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-schroe dinger' '--enable-sdl' '--enable-sdl-image' '--enable-sftp' '--enable-shine' '--enable-shout' '--enable-skins2' '--enable-speex' '--enable-svg' '--enable-svgdec' '--enable-taglib' '--enable -theora' '--enable-twolame' '--enable-upnp' '--enable-vcdx' '--enable-vdpau' '--enable-vnc' '--enable-vorbis' '--enable-x264' '--enable-x265' '--enable-zvbi' '--with-kde-solid=/usr/share/kd e4/apps/solid/actions/' '--disable-decklink' '--disable-dxva2' '--disable-fdkaac' '--disable-gnomevfs' '--disable-goom' '--disable-libtar' '--disable-mfx' '--disable-opencv' '--disable-proj ectm' '--disable-sndio' '--disable-telx' '--disable-vpx' '--disable-vsxu' '--disable-wasapi' '--enable-alsa' '--enable-atmo' '--enable-dc1394' '--enable-dv1394' '--enable-linsys' '--enable- omxil' '--enable-udev' '--enable-v4l2' '--enable-libva' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--enable-crystalhd' '--enable-mmx' '--enable-sse' '--disable-neon' '--disable-al tivec' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed' 'CPPFLAGS=-W date-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security'
[0000000000a9c178] core libvlc debug: searching plug-in modules
[0000000000a9c178] core libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat
[0000000000a9c178] core libvlc debug: recursively browsing `/usr/lib/vlc/plugins'
[0000000000a9c178] core libvlc debug: saving plugins cache /usr/lib/vlc/plugins/plugins.dat
[0000000000a9c178] core libvlc debug: plug-ins loaded: 459 modules
[0000000000a9c178] core libvlc debug: opening config file (/root/.config/vlc/vlcrc)I am trying to connect to it from an external browser as
http://********:8080/
I have checked in the Linux Server that there is not any server running. Any idea on why it does not work ?
-
PHP code not proceeding to the line after exec ffmpeg
5 avril 2014, par SelI have this PHP snippet that I call through curl, in order to perform an ffmpeg encoding. I also have another line afterwards that marks this as having been done, using a database. I want this to trigger after the exec finished, which would imply that the file has finished encoding. However, the database is never actually changed (works if I try commenting out the exec) and I can't get a good gauge of when the file is done encoding. The database only changes when you run ANOTHER request on top of this one. Code below.
$ID=$_POST['ID'];
exec("/usr/local/bin/ffmpeg -i stockvideos/Intro2.m2v -f image2 -loop 1 -r 24 -i temppics/Intro2pic".$ID.".png -filter_complex \
'[1:v]fade=in:st=0:d=1:alpha=1,fade=out:st=3:d=1:alpha=1[2wm];
[0:v][wm]overlay=10:10[outv]' \
-map [outv] -q 0 tempvideos/Intro2-".$ID.".m2v >> 1.log 2>&1");
$query_CreditVideoDone =sprintf("Update Messages SET CreditTitlesDone=%s WHERE ID=%s", GetSQLValueString(1, "boolean"),GetSQLValueString($ID, "text"));
$result = mysql_query($query_CreditVideoDone, $MMixer) or die(mysql_error());UPDATE : When I check the log (>2), it seems FFMPEG continues running even after the process is finished.
frame= 4 fps=0.0 q=0.0 size= 103kB time=00:00:00.06 bitrate=12619.2kbits/s
frame= 12 fps= 12 q=0.0 size= 562kB time=00:00:00.33 bitrate=13806.6kbits/s
frame= 21 fps= 14 q=0.0 size= 1339kB time=00:00:00.63 bitrate=17307.1kbits/s
frame= 29 fps= 14 q=0.0 size= 1682kB time=00:00:00.90 bitrate=15291.9kbits/s
frame= 38 fps= 15 q=0.0 size= 2081kB time=00:00:01.20 bitrate=14192.5kbits/s
frame= 51 fps= 16 q=0.0 size= 2677kB time=00:00:01.63 bitrate=13415.4kbits/s
frame= 58 fps= 16 q=0.0 size= 2939kB time=00:00:01.86 bitrate=12884.0kbits/s
frame= 66 fps= 16 q=0.0 size= 3338kB time=00:00:02.13 bitrate=12803.8kbits/s
frame= 74 fps= 16 q=0.0 size= 3724kB time=00:00:02.40 bitrate=12700.2kbits/s
frame= 82 fps= 16 q=0.0 size= 4012kB time=00:00:02.66 bitrate=12311.5kbits/s
frame= 92 fps= 16 q=0.0 size= 4483kB time=00:00:03.00 bitrate=12229.7kbits/s
frame= 102 fps= 16 q=0.0 size= 4951kB time=00:00:03.33 bitrate=12154.5kbits/s
frame= 111 fps= 16 q=0.0 size= 5384kB time=00:00:03.63 bitrate=12126.7kbits/s
frame= 118 fps= 16 q=0.0 size= 5622kB time=00:00:03.87 bitrate=11900.0kbits/s
frame= 127 fps= 16 q=0.0 size= 6042kB time=00:00:04.17 bitrate=11867.2kbits/s
frame= 138 fps= 16 q=0.0 size= 6550kB time=00:00:04.53 bitrate=11823.8kbits/s
frame= 149 fps= 17 q=0.0 size= 7043kB time=00:00:04.90 bitrate=11763.8kbits/s
frame= 157 fps= 17 q=0.0 size= 7338kB time=00:00:05.17 bitrate=11622.8kbits/s
frame= 167 fps= 17 q=0.0 size= 7807kB time=00:00:05.50 bitrate=11616.5kbits/s
frame= 176 fps= 17 q=0.0 size= 8215kB time=00:00:05.80 bitrate=11591.7kbits/s
frame= 186 fps= 17 q=0.0 size= 8667kB time=00:00:06.13 bitrate=11564.4kbits/s
frame= 196 fps= 17 q=0.0 size= 9254kB time=00:00:06.47 bitrate=11710.7kbits/s
frame= 203 fps= 17 q=0.0 size= 9794kB time=00:00:06.70 bitrate=11962.6kbits/s
frame= 211 fps= 17 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=3
frame= 211 fps= 16 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=13
frame= 211 fps= 15 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=28
frame= 211 fps= 15 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=41
frame= 211 fps= 14 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=57
frame= 211 fps= 14 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=73
frame= 211 fps= 13 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=89
frame= 211 fps= 13 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=98
frame= 211 fps= 13 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=107
frame= 211 fps= 12 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=115
frame= 211 fps= 12 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=126
frame= 211 fps= 11 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=138
frame= 211 fps= 11 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=153
frame= 211 fps= 11 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=169
frame= 211 fps= 11 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=183
frame= 211 fps= 10 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=194
frame= 211 fps= 10 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=203
frame= 211 fps=9.8 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=214
frame= 211 fps=9.6 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=224
frame= 211 fps=9.4 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=233
frame= 211 fps=9.1 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=242
frame= 211 fps=8.9 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=251
frame= 211 fps=8.7 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=260
frame= 211 fps=8.6 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=269
frame= 211 fps=8.4 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=278
frame= 211 fps=8.2 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=289
frame= 211 fps=8.0 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=303
frame= 211 fps=7.9 q=0.0 size= 10135kB time=00:00:06.97 bitrate=11905.1kbits/s dup=0 drop=315....And so on until it times out on the server. Any idea why this happens ? It seems to prevent execution from anything after it. Redirecting to dev/null doesn't help either - there is no error output of course but the process is still hanging the same way.
Any help would be appreciated. Thanks !
Thanks !
Sel