
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (111)
-
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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (6869)
-
What ffmpeg settings to ensure 0 duplicate frames and 0 dropped frames when capturing to mpeg-2 program stream using ffmpeg/avfoundation on Mac ?
16 février 2017, par aerodavoI’m trying to capture to a DVD compliant mpeg-2 file (ffmpeg :
-target ntsc-dvd
) from the HDMI output of a camcorder into a Magewell HDMI to USB 3.0 box into my Late 2012 15" non-retina MacBook Pro (quad core 2.3, 16gb ram, ssd), using ffmpeg/avfoundation.I’ve tried everything I can think of, or find online. I’m still getting duplicate and dropped frames, which either leads to audio/video sync issues, or audio dropouts, especially for longer recordings. I need this to be stable for recordings of up to 2.5 hours. This is the Terminal output for a 1.5 hour recording :
Lapaki:~ Lapaki$ /Users/Lapaki/Desktop/ffmpeg -f avfoundation -video_size 960x540 -pixel_format uyvy422 -framerate ntsc -i "XI:XI" -vf crop=iw-240:ih:120:0 -target ntsc-dvd -aspect 4:3 -q:v 3 -ab 256k /Users/Lapaki/Desktop/FF\ Test/`date +%F`\ `date +%H_%M_%S`.mpg
ffmpeg version 3.2.3-tessus Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, avfoundation, from 'XI:XI':
Duration: N/A, start: 610606.984208, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 960x540, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc
Stream #0:1: Audio: pcm_f32le, 48000 Hz, stereo, flt, 3072 kb/s
Output #0, dvd, to '/Users/Lapaki/Desktop/FF Test/2017-02-15 17_46_28.mpg':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 6000 kb/s, 29.97 fps, 90k tbn, 29.97 tbc
Metadata:
encoder : Lavc57.64.101 mpeg2video
Side data:
cpb: bitrate max/min/avg: 9000000/0/6000000 buffer size: 1835008 vbv_delay: -1
Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Metadata:
encoder : Lavc57.64.101 ac3
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (pcm_f32le (native) -> ac3 (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7fd315892800] Warning: data is not aligned! This can lead to a speedloss
frame= 20 fps=0.0 q=3.0 size= 298kB time=00:00:00.65 bitrate=3721.4kbits/sframe= 35 fps= 35 q=3.0 size= 498kB time=00:00:01.13 bitrate=3591.2kbits/sframe= 50 fps= 33 q=3.0 size= 708kB time=00:00:01.64 bitrate=3519.4kbits/sframe= 65 fps= 32 q=3.0 size= 920kB time=00:00:02.16
...
bitrate=2721.7kbits/frame=162094 fps= 30 q=3.0 size= 1796936kB time=01:30:08.47 bitrate=2721.7kbits/frame=162109 fps= 30 q=3.0 size= 1797142kB time=01:30:08.98 bitrate=2721.8kbits/frame=162110 fps= 30 q=3.0 Lsize= 1797202kB time=01:30:09.01 bitrate=2721.9kbits/s dup=221 drop=0 speed= 1x
video:1579050kB audio:168069kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.866632%I deleted the middle part (denoted by the "..."), which is just a lot more of the same accumulating information. By the end there are 221 duplicate frames, and for this one I didn’t get any dropped frames, but that happens every other time as well it seems.
With this code, the audio seems to stay in pretty good sync, but I get little dropouts every 30 seconds to a minute or so. On this recording, there are dropouts at :
00:00:43, 00:01:19, 00:01:47, 00:02:17, 00:03:18, ...
I stopped listening there ; they happen at the end too, so I assume similarly spaced dropouts are happening throughout the file.
Is there some secret ffmpeg code to ensure there are no dropped or duplicate frames when capturing from a live source to dvd compliant mpeg-2 files ?
When I convert from pretty much any type of file to mpeg-2 files using
-target ntsc-dvd
, the speed is something like 10x on this machine, so it seems like it would have no problem keeping up with a live source, right ?I’ve also tried constant bit rate using
-b:v 5000k -minrate 5000k -maxrate 5000k -bufsize 2500k
, which also doesn’t prevent dropped/duplicate frames.I’ve tried separating out the audio and video inputs, which doesn’t solve it.
I’ve tried using
-vsync 0
on the video input, which does seem to solve the issue, because the output doesn’t report dups/drops, but the audio/video drift out of sync more and more, so that hasn’t worked either.Thanks so much for any help. I’ve been testing and testing and searching and searching for weeks...
-
Merge video with ffmpeg
17 mars 2017, par BjörnI have tried this command :
ffmpeg -i 'concat:10.mov|11.mov' -codec copy out.mov
The output file out.mov only shows whats in the first movie (10.mov).Been googling for several hours and tried lots of things but nothing works. I want this done without re-encoding the files. Just merge with the same codec
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff678802600] Found duplicated MOOV Atom. Skipped it
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:10.mov|11.mov':
Metadata:
creation_time : 2017-03-17T12:15:22.000000Z
major_brand : qt<br />
minor_version : 537134592
compatible_brands: qt<br />
Duration: 00:00:29.96, start: 0.000000, bitrate: 140810 kb/s
Stream #0:0: Video: prores (apcn / 0x6E637061), yuv422p10le, 1280x720, 116735 kb/s, SAR 1:1 DAR 16:9, 50 fps, 50 tbr, 5k tbn, 5k tbc (default)
Metadata:
handler_name : Telestream Inc. Telestream Media Framework - Local 99.99.999999
encoder : Apple ProRes 422
Output #0, mov, to 'out.mov':
Metadata:
compatible_brands: qt<br />
major_brand : qt<br />
minor_version : 537134592
encoder : Lavf57.56.101
Stream #0:0: Video: prores (apcn / 0x6E637061), yuv422p10le, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 116735 kb/s, 50 fps, 50 tbr, 10k tbn, 5k tbc (default)
Metadata:
handler_name : Telestream Inc. Telestream Media Framework - Local 99.99.999999
encoder : Apple ProRes 422
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 1498 fps=0.0 q=-1.0 Lsize= 426938kB time=00:00:29.94 bitrate=116815.8kbits/s speed=50.8x<br />
video:426930kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001997%Any ideas ? Would make my life very much easier if I got this to work :)
-
Best way to extract all keyframes from a video in Java ?
2 mars 2017, par JT JI have a Windows batch script that I’m currently trying to recreate in Java. The script runs an ffmpeg command that extracts all of the keyframes from a video and pastes them as .BMP images in a folder.
This is what it the script looks like :
ffmpeg -i input.mp4 -vf "select=eq(pict_type\,I)" -vsync 1 %%3d.bmp
The end result of this is that it takes "input.mp4" and outputs each keyframe as 001.bmp, 002.bmp... and so on.
I’m trying to avoid simply starting an ffmpeg runtime, because I want to be able to run this script on other platforms in the future. Also, I’ll be doing this for very long videos (multiple hours long sometimes) so performance is very important, and needs to be done as fast as possible. Is it possible to use multithreading ? That’s something I’m not familiar with in Java. What would be the best way to do this ?