
Recherche avancée
Autres articles (20)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
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 (1988)
-
av_interleaved_write_frame() : Connection reset by peer mjpeg : What is wrong with mjpeg stream, ffserver and ffplay ?
31 décembre 2016, par Ilya YevlampievI’m creating mjpeg stream from image files using ffmpeg and write it to ffserver’s feed :
sudo ffmpeg -loop 1 -i fon.jpeg -vcodec mjpeg -f mjpeg http://localhost:8090/feed1.ffm
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 19 2013 23:10:58 with gcc 4.7 (Debian 4.7.2-5)
configuration:
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Input #0, image2, from 'fon.jpeg':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Output #0, mjpeg, to 'http://localhost:8090/feed1.ffm':
Metadata:
encoder : Lavf55.12.100
Stream #0:0: Video: mjpeg, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> mjpeg)
Press [q] to stop, [?] for helpffserver is configured as
Port 8090
RTSPPort 8594
BindAddress 0.0.0.0
MaxClients 100
MaxBandwidth 20000
NoDaemon
<feed>
File /tmp/feed.ffm
FileMaxSize 3M
</feed>
<stream>
Feed feed.ffm
Format rtsp
VideoCodec mjpeg
VideoFrameRate 30
VideoBufferSize 80000
VideoBitRate 200
VideoQMin 1
VideoQMax 5
VideoSize 1280x720
PreRoll 1
Noaudio
</stream>
<stream>
Feed feed.ffm
Format swf
VideoCodec flv
VideoFrameRate 30
VideoBufferSize 50000
VideoBitRate 100
VideoQMin 1
VideoQMax 5
VideoSize 1280x720
PreRoll 0
Noaudio
</stream>Then I’m trying to retrieve the rtsp stream from the ffserver :
ffplay http://localhost:8090/test.rtsp -loglevel debug
avplay version 0.8.5-6:0.8.5-1, Copyright (c) 2003-2012 the Libav developers
built on Jan 13 2013 12:05:48 with gcc 4.7.2
configuration: --arch=amd64 --enable-pthreads --enable-runtime-cpudetect --extra- version='6:0.8.5-1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-swscale --enable-libcdio --enable-x11grab --enable-libx264 --enable-libxvid --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-staticavutil configuration : —arch=amd64 —enable-pthreads —enable-runtime-cpudetect —extra-version=’6:0.8.4-1’ —libdir=/usr/lib/x86_64-linux-gnu —prefix=/usr —enable-bzlib —enable-libdc1394 —enable-libdirac —enable-libfreetype —enable-frei0r —enable-gnutls —enable-libgsm —enable-libmp3lame —enable-librtmp —enable-libopencv —enable-libopenjpeg —enable-libpulse —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-vaapi —enable-vdpau —enable-libvorbis —enable-libvpx —enable-zlib —enable-gpl —enable-postproc —enable-swscale —enable-libcdio —enable-x11grab —enable-libx264 —enable-libxvid —shlibdir=/usr/lib/x86_64-linux-gnu —enable-shared —disable-static
avcodec configuration : —arch=amd64 —enable-pthreads —enable-runtime-cpudetect —extra-version=’6:0.8.4-1’ —libdir=/usr/lib/x86_64-linux-gnu —prefix=/usr —enable-bzlib —enable-libdc1394 —enable-libdirac —enable-libfreetype —enable-frei0r —enable-gnutls —enable-libgsm —enable-libmp3lame —enable-librtmp —enable-libopencv —enable-libopenjpeg —enable-libpulse —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-vaapi —enable-vdpau —enable-libvorbis —enable-libvpx —enable-zlib —enable-gpl —enable-postproc —enable-swscale —enable-libcdio —enable-x11grab —enable-libx264 —enable-libxvid —shlibdir=/usr/lib/x86_64-linux-gnu —enable-shared —disable-static
avformat configuration : —arch=amd64 —enable-pthreads —enable-runtime-cpudetect —extra-version=’6:0.8.4-1’ —libdir=/usr/lib/x86_64-linux-gnu —prefix=/usr —enable-bzlib —enable-libdc1394 —enable-libdirac —enable-libfreetype —enable-frei0r —enable-gnutls —enable-libgsm —enable-libmp3lame —enable-librtmp —enable-libopencv —enable-libopenjpeg —enable-libpulse —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-vaapi —enable-vdpau —enable-libvorbis —enable-libvpx —enable-zlib —enable-gpl —enable-postproc —enable-swscale —enable-libcdio —enable-x11grab —enable-libx264 —enable-libxvid —shlibdir=/usr/lib/x86_64-linux-gnu —enable-shared —disable-static
swscale configuration : —arch=amd64 —enable-pthreads —enable-runtime-cpudetect —extra-version=’6:0.8.4-1’ —libdir=/usr/lib/x86_64-linux-gnu —prefix=/usr —enable-bzlib —enable-libdc1394 —enable-libdirac —enable-libfreetype —enable-frei0r —enable-gnutls —enable-libgsm —enable-libmp3lame —enable-librtmp —enable-libopencv —enable-libopenjpeg —enable-libpulse —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-vaapi —enable-vdpau —enable-libvorbis —enable-libvpx —enable-zlib —enable-gpl —enable-postproc —enable-swscale —enable-libcdio —enable-x11grab —enable-libx264 —enable-libxvid —shlibdir=/usr/lib/x86_64-linux-gnu —enable-shared —disable-static
postproc configuration : —arch=amd64 —enable-pthreads —enable-runtime-cpudetect —extra-version=’6:0.8.4-1’ —libdir=/usr/lib/x86_64-linux-gnu —prefix=/usr —enable-bzlib —enable-libdc1394 —enable-libdirac —enable-libfreetype —enable-frei0r —enable-gnutls —enable-libgsm —enable-libmp3lame —enable-librtmp —enable-libopencv —enable-libopenjpeg —enable-libpulse —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-vaapi —enable-vdpau —enable-libvorbis —enable-libvpx —enable-zlib —enable-gpl —enable-postproc —enable-swscale —enable-libcdio —enable-x11grab —enable-libx264 —enable-libxvid —shlibdir=/usr/lib/x86_64-linux-gnu —enable-shared —disable-staticlibavutil 51. 22. 1 / 51. 22. 1
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0
http://localhost:8090/test.rtsp: Invalid data found when processing inputSo, what is wrong in this streaming example, if I have no problem when I substitute streams to the files ?
I create a mjpeg file using the same parameters 9i.e. file is an output insteadof stream)
sudo ffmpeg -loop 1 -i fon.jpeg -vcodec mjpeg -f mjpeg test.mjpg
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 19 2013 23:10:58 with gcc 4.7 (Debian 4.7.2-5)
configuration:
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Input #0, image2, from 'fon.jpeg':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Output #0, mjpeg, to 'test.mjpg':
Metadata:
encoder : Lavf55.12.100
Stream #0:0: Video: mjpeg, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> mjpeg)
Press [q] to stop, [?] for help
frame= 36 fps=0.0 q=0.0 size= 888kB time=00:00:01.36 bitrate=5349.2kbits/sframe= 78 fps= 76 q=0.0 size= 1711kB time=00:00:03.04 bitrate=4609.9kbits/sframe= 120 fps= 78 q=0.0 size= 2533kB time=00:00:04.72 bitrate=4396.9kbits/sframe= 161 fps= 79 q=0.0 size= 3336kB time=00:00:06.36 bitrate=4297.5kbits/sframe= 202 fps= 79 q=0.0 size= 4139kB
time=00:00:08.00 bitrate=4238.8kbits/sframe= 243 fps= 79 q=0.0 size= 4943kB
time=00:00:09.64 bitrate=4200.1kbits/sframe= 282 fps= 79 q=0.0 size= 5706kB
time=00:00:11.20 bitrate=4173.9kbits/sframe= 321 fps= 79 q=0.0 size= 6470kB
time=00:00:12.76 bitrate=4154.0kbits/sframe= 358 fps= 78 q=0.0 size= 7195kB
time=00:00:14.24 bitrate=4139.2kbits/sframe= 397 fps= 68 q=0.0 size= 7959kB
time=00:00:15.80 bitrate=4126.6kbits/s
[1]+ Stopped sudo ffmpeg -loop 1 -i fon.jpeg -vcodec mjpeg -f mjpeg test.mjpgAnd then I playback this mjpeg file with ffplay. The play back is correct, I see no errors or exceptions.
ffplay test.mjpg
avplay version 0.8.5-6:0.8.5-1, Copyright (c) 2003-2012 the Libav developers
built on Jan 13 2013 12:05:48 with gcc 4.7.2
[mjpeg @ 0x7fc3680008c0] max_analyze_duration reached
[mjpeg @ 0x7fc3680008c0] Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'test.mjpg':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 1280x720 [PAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1200k tbn, 1200k tbc
[avsink @ 0x7fc360001020] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x7fc360001700] w:1280 h:720 fmt:yuvj420p -> w:1280 h:720 fmt:yuv420p flags:0x4
27.99 A-V: 0.000 s:0.0 aq= 0KB vq= 0KB sq= 0B f=0/0 0/0So, what is the configuration issue for ffserver, or may be it is a bug of the ffserver ?
UPD. I have realized, that i fed file1.ffm instead of file.ffm ; that caused some ffserver problem :
Mon Sep 9 11:43:20 2013 [ffm @ 0x2110000]Format ffm probed with size=2048 and score=101
Mon Sep 9 11:43:20 2013 Deleting feed file 'feed1.ffm' as stream counts differ (1 != 2)
Mon Sep 9 11:43:20 2013 [AVIOContext @ 0x210d660]Statistics: 4096 bytes read, 0 seeks
Mon Sep 9 11:43:20 2013 [AVIOContext @ 0x210a9a0]Statistics: 0 seeks, 1 writeouts
Mon Sep 9 11:43:20 2013 FFserver started.
Mon Sep 9 11:44:18 2013 File '/feed1.ffm' not found
Mon Sep 9 11:44:18 2013 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 404 149After i set a correct feed, i got another exception on ffmpeg side :
sudo ffmpeg -loop 1 -i fon.jpeg -vcodec mjpeg -f mjpeg http://localhost:8090/feed.ffm
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 19 2013 23:10:58 with gcc 4.7 (Debian 4.7.2-5)
configuration:
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Input #0, image2, from 'fon.jpeg':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Output #0, mjpeg, to 'http://localhost:8090/feed.ffm':
Metadata:
encoder : Lavf55.12.100
Stream #0:0: Video: mjpeg, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> mjpeg)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peerWhile ffserver shows no error at all :
sudo ffserver -f /etc/ffserver3.conf
ffserver version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 19 2013 23:10:58 with gcc 4.7 (Debian 4.7.2-5)
configuration:
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Mon Sep 9 12:08:19 2013 FFserver started.
Mon Sep 9 12:08:40 2013 127.0.0.1 - - [POST] "/feed.ffm HTTP/1.1" 200 4096
Mon Sep 9 12:12:28 2013 127.0.0.1 - - [GET] "/ HTTP/1.1" 200 1847So, what is the problem now ?
-
ffmpeg usage corrupts pointer to filenames
1er décembre 2014, par user296612Say I have 2 files in a folder named ’jack.aac’ and ’jill.aac’, and I run the following script ;
ls -f -tr *.aac |
while read i; do
echo $i
done- I get ’jack.aac’ and ’jill.aac’ printed as expected. If however I include ’ffmpeg -i "$i" -f ffmetadata metadata.txt’ in the while-loop, the second filename to be ’read’ ends up missing a character - ’ack.aac’ (instead of ’jack.aac’) for instance. ffmpeg-usage somehow seems to alter the pointer-to-filenames value. Can anyone tell me how to get around this ?
-
Play MPEG-CENC encrypted local file on android
26 mai 2018, par rd7773I need to decrypt and play a cenc-aes-ctr mp4 video on the fly which is locally stored on the device.
The video was encrypted at server end by using following ffmpeg command and then downloaded to phone :ffmpeg -i SampleVideo_1280x720_1mb.mp4 -vcodec copy -acodec copy -encryption_scheme cenc-aes-ctr -encryption_key 76a6c65c5ea762046bd749a2e632ccbb -encryption_kid a7e61c373e219033c21091fa607bf3b8 SampleVideo_1280x720_1mb_encrypted.mp4
It is successfully getting played with ffmpeg command :
ffplay SampleVideo_1280x720_1mb_encrypted.mp4 -decryption_key 76a6c65c5ea762046bd749a2e632ccbb
But I do not want to use ffmpeg in android so I am using libeasy library which creates a local http server to make a stream of offline video and then decrypt it on the fly using Cipher. The Cipher which is provided to the LocalHttpServer for decryption process, needs the initialisation vector (iv) for CTR mode which is not externally available to us.
From above command it is clear that ffmpeg doesn’t require the IV for encryption or decryption to be passed but i guess internally it uses 8 byte random iv.This is how i am creating Cipher to pass to LocalHttpServer :
final Cipher c = Cipher.getInstance("AES/CTR/NoPadding","BC);
c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(hexStringToBytes("76a6c65c5ea762046bd749a2e632ccbb"), "AES"), new IvParameterSpec(new byte[16]));So my question is, what value of iv should i pass in this case to Cipher ? My basic requirement is to play a offline MPEG-CENC encrypted mp4 video stored on device.
Keeping in mind my very limited knowledge of cryptography, references to any library that provides such implementation with or without any tweaks is welcomed.