
Recherche avancée
Autres articles (78)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (5322)
-
How to generate SDP file from FFMPEG
29 octobre 2017, par MobilityLabSo, I have been working with FFMPEG on a project that involves streaming video from one computer to another across the internet with RTP. I want to take that into ffmpeg and use ffserver to display it on a local network.
As I understand it, you need to have a SDP information so that the receiving ffmpeg instance can interpret the RTP stream. Despite what webpages say, I can not find the SDP information in the information printed to the console.
How can I force the transmitting ffmpeg instance to output the SDP information so that I can use it to configure my receiving end ?
Right now, I am testing on Windows 7, but the final solution will be on linux.
The command I’m running for testing is
ffmpeg -fflags +genpts -i files\2005-SFSD-sample-mpeg1.mpg -threads 0 -r 10 -g 45
-s 352x240 -deinterlace -y 2005.mp4 -an -threads 0 -r 10 -g 45 -s 352x240
-deinterlace -f rtp rtp://192.168.200.198:9008My ffmpeg information is...
ffmpeg version 0.8, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 23 2011 14:22:23 with gcc 4.5.3
configuration:
--disable-static
--enable-shared
--enable-gpl
--enable-version3
--enable-memalign-hack
--enable-runtime-cpudetect
--enable-avisynth
--enable-bzlib
--enable-frei0r
--enable-libopencore-amrnb
--enable-libopencore-amrwb
--enable-libfreetype
--enable-libgsm
--enable-libmp3lame
--enable-libopenjpeg
--enable-librtmp
--enable-libschroedinger
--enable-libspeex
--enable-libtheora
--enable-libvorbis
--enable-libvpx
--enable-libx264
--enable-libxavs
--enable-libxvid
--enable-zlib
--disable-outdev=sdl
libavutil 51. 9. 1 / 51. 9. 1
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 4. 0 / 53. 4. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 23. 0 / 2. 23. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0 -
ffmpeg is generating an out-of-sync audio/video file
4 mars 2020, par marcelorocksI am trying to convert a
flv
video tomp4
usinga264
, but the result video has a out of sync audio/video. The audio seems ok but the video seems slow and therefore out of sync with the audio.Here is the command I am running :
/opt/local/bin/ffmpeg -i complaint.flv -f mp4 -vcodec libx264 -acodec aac -copyts -strict experimental -fpre /opt/local/share/ffmpeg/libx264-lossless_slow.ffpreset -ab 44k -threads 0 -crf 23 complaint.mp4
And the output :
Desktop /opt/local/bin/ffmpeg -i complaint.flv -f mp4 -vcodec libx264 -acodec aac -copyts -strict experimental -fpre /opt/local/share/ffmpeg/libx264-lossless_slow.ffpreset -ab 44k -threads 0 -crf 23 complaint.mp4
ffmpeg version 0.7.8, Copyright (c) 2000-2011 the FFmpeg developers
built on Jan 12 2012 21:12:26 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
[flv @ 0x7fe57a04ac00] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'complaint.flv':
Metadata:
duration : 7
creationdate : Thu Jan 12 23:47:24
description : Recorded using VideoRecording example.
Duration: 00:00:06.61, start: 0.000000, bitrate: N/A
Stream #0.0: Video: flv, yuv420p, 288x288, 1k tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: nellymoser, 11025 Hz, mono, s16
File 'complaint.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0x7fe579c32cc0] w:288 h:288 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
[libx264 @ 0x7fe57a044600] using cpu capabilities: none!
[libx264 @ 0x7fe57a044600] profile High, level 4.2
[libx264 @ 0x7fe57a044600] 264 - core 118 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x33 me=umh subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'complaint.mp4':
Metadata:
duration : 7
creationdate : Thu Jan 12 23:47:24
description : Recorded using VideoRecording example.
encoder : Lavf52.111.0
Stream #0.0: Video: libx264, yuv420p, 288x288, q=0-69, 200 kb/s, 1k tbn, 1k tbc
Stream #0.1: Audio: aac, 11025 Hz, mono, s16, 44 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame= 6557 fps=106 q=-1.0 Lsize= 685kB time=00:00:03.62 bitrate=1549.1kbits/s dup=6367 drop=0
video:615kB audio:17kB global headers:0kB muxing overhead 8.361360%
frame I:27 Avg QP:19.98 size: 8242
[libx264 @ 0x7fe57a044600] frame P:6530 Avg QP:30.71 size: 62
[libx264 @ 0x7fe57a044600] mb I I16..4: 11.1% 79.3% 9.6%
[libx264 @ 0x7fe57a044600] mb P I16..4: 0.1% 0.2% 0.0% P16..4: 1.2% 0.2% 0.3% 0.0% 0.0% skip:98.0%
[libx264 @ 0x7fe57a044600] 8x8 transform intra:77.8% inter:64.9%
[libx264 @ 0x7fe57a044600] coded y,uvDC,uvAC intra: 75.3% 81.3% 33.3% inter: 0.5% 0.7% 0.1%
[libx264 @ 0x7fe57a044600] i16 v,h,dc,p: 78% 9% 10% 3%
[libx264 @ 0x7fe57a044600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 11% 32% 3% 4% 5% 2% 5% 4%
[libx264 @ 0x7fe57a044600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56% 7% 9% 3% 4% 7% 3% 7% 3%
[libx264 @ 0x7fe57a044600] i8c dc,h,v,p: 45% 15% 34% 6%
[libx264 @ 0x7fe57a044600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fe57a044600] ref P L0: 80.5% 9.5% 10.0%
[libx264 @ 0x7fe57a044600] kb/s:767.20Is there something I’m missing to make sure the video and audio line up perfectly ?
-
Ffmpeg error in Docker Container : ffmpeg exited with code 1 :
2 octobre 2017, par Uğur KayaI am currently working on a project and almost ready to deploy, but there is one problem : the code which is working perfectly on my Ubuntu 16.04 (Elementary OS Loki) machine does not work in Docker container. What might be the problem in my code ?
Here is my Dockerfile :
FROM beevelop/nodejs-python:latest
RUN apt-get -y update && apt-get install -y libav-tools
RUN ffmpeg --help
# Global install yarn package manager
RUN apt-get update && apt-get install -y curl apt-transport-https && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y yarn
WORKDIR /app
COPY package.json .
RUN yarn
COPY . .
RUN yarn prod:build
EXPOSE 8080
CMD [ "yarn", "start" ]I run
sudo docker exec -it ffmpeg --help
and it outputs the expected help print. In my code, I download a Youtube video in mp4 format with this code :const download = idParam => (
new Promise((fulfill, reject) => {
const id = `http://www.youtube.com/watch?v=${idParam}`
let videoMeta
youtubedl(id, ['--format=36'], { cwd: __dirname })
.on('info', (info) => {
const customDimensions = calculateCustomDimensions(info.format)
videoMeta = { ...info, ...customDimensions }
})
.pipe(fs.createWriteStream(`temp/${idParam}.mp4`))
.on('finish', () => {
console.log('Dirname: ', __dirname)
fulfill(videoMeta)
})
.on('error', (err) => {
console.log('There is an error:', err)
console.log('Dirname: ', __dirname)
reject(err)
})
})
)And then try to process the video with fluent-ffmpeg :
const processVideo = (videoName, cropStart, cropEnd) => (
new Promise((resolve, reject) => {
try {
console.log('Trying to run ffmpeg binary.')
ffmpeg()
.addInput(`temp/${videoName}.mp4`)
.seekInput(cropStart)
.duration(cropEnd)
.outputOption('-movflags frag_keyframe+faststart')
.on('end', () => {
console.log('Processing has finished with ffmpeg. ')
console.log('Resolved for upload: ', [`temp/cropped_${videoName}.mp4`, `temp/${videoName}.mp4`])
console.log('Going out of processVideo script.')
resolve([`temp/cropped_${videoName}.mp4`, `temp/${videoName}.mp4`])
})
.on('error', (err, stdout, stderr) => {
console.log('Error. Output option olmasına rağmen: ', err.message)
console.log('ffmpeg output:\n', stdout)
console.log('ffmpeg stderr:\n', stderr)
})
.save(`temp/cropped_${videoName}.mp4`)
} catch (e) {
console.log('There has been an error while converting ffmpeg binary!')
console.log(e.msg)
console.log(e.code)
reject(e)
}
})
)It gives the following error :
Entering download script.
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
`info.resolution` is deprecated, use `info.format`
Dirname: /app/lib/server/scripts
Download script is done.
Custom dimensions of the downloaded video: 320 180
Crop start and end of the downloaded video: 00:00:00.517 00:00:00.998
Entering processVideo script.
Trying to run ffmpeg binary.
Error: ffmpeg exited with code 1:
ffmpeg output:
ffmpeg stderr:
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp/kfchvCyHmsc.mp4':
Metadata:
major_brand : 3gp6
minor_version : 256
compatible_brands: isom3gp6
creation_time : 2015-03-26 09:22:44
Duration: 00:00:08.27, start: 0.000000, bitrate: 218 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 187 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
Metadata:
creation_time : 2015-03-26 09:22:44
handler_name : IsoMedia File Produced by Google, 5-11-2011
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 31 kb/s (default)
Metadata:
creation_time : 2015-03-26 09:22:44
handler_name : IsoMedia File Produced by Google, 5-11-2011
[libx264 @ 0x2641fc0] using SAR=1/1
[libx264 @ 0x2641fc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x2641fc0] profile High, level 1.2
[libx264 @ 0x2641fc0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[aac @ 0x2642f00] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.