
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (86)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (6830)
-
ffmpeg how to encode first then use it for another output
10 août 2017, par mahdi ghI’m trying to capture screen with gdigrab and combine int with a sound and then send it on my decklink sdi device.
here is my code to capture :
ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i title="Play" -f dshow -i audio="CABLE Output (VB-Audio Virtual Cable)" -af aresample=resampler=soxr -ar 48000 -acodec pcm_s16le -ac 2 -c:v libx264 -qp 0 -preset ultrafast "output.avi"
here is my code for output to ffmpeg :
ffmpeg -i output.avi -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)"
this way it works, but when I combine these two arguments to send the output to decklink card on the fly, ffmpeg stops working. here is the combination code :
ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i title="Play" -f dshow -i audio="CABLE Output (VB-Audio Virtual Cable)" -af aresample=resampler=soxr -ar 48000 -acodec pcm_s16le -ac 2 -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)"
I have tried so many different combinations but no luck. it works only if i store it on a file then use that file as input. Is there a way to tell ffmpeg to use the result of first command as input of second command ?
Thanks
Update :
Here is log report :ffmpeg started on 2017-08-08 at 12:26:36
Report written to "ffmpeg-20170808-122636.log"
Command line:
ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i "title=Play" -c:v rawvideo -f dshow -i "audio=CABLE Output (VB-Audio Virtual Cable)" -af "aresample=resampler=soxr" -ar 48000 -acodec pcm_s16le -ac 2 -map 0:v:0 -map 1:a:0 -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)" -report
ffmpeg version N-71608-ga924b83 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 30.100 / 56. 30.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-framerate' ... matched as AVOption 'framerate' with argument '25'.
Reading option '-thread_queue_size' ... matched as option 'thread_queue_size' (set the maximum number of queued packets from the demuxer) with argument '512'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'gdigrab'.
Reading option '-i' ... matched as input file with argument 'title=Play'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'rawvideo'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
Reading option '-i' ... matched as input file with argument 'audio=CABLE Output (VB-Audio Virtual Cable)'.
Reading option '-af' ... matched as option 'af' (set audio filters) with argument 'aresample=resampler=soxr'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '48000'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'pcm_s16le'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:a:0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'decklink'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'uyvy422'.
Reading option 'DeckLink SDI (2)' ... matched as output file.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file title=Play.
Applying option thread_queue_size (set the maximum number of queued packets from the demuxer) with argument 512.
Applying option f (force format) with argument gdigrab.
Successfully parsed a group of options.
Opening an input file: title=Play.
[gdigrab @ 0000000002d3f2a0] Found window Play, capturing 720x576x32 at (0,0)
[gdigrab @ 0000000002d3f2a0] Cursor pos (588,602) -> (-271,597)
[gdigrab @ 0000000002d3f2a0] All info found
Input #0, gdigrab, from 'title=Play':
Duration: N/A, start: 1502178996.958615, bitrate: 331786 kb/s
Stream #0:0, 1, 1/1000000: Video: bmp, bgra, 720x576, 331786 kb/s, 25 tbr, 1000k tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: input file audio=CABLE Output (VB-Audio Virtual Cable).
Applying option c:v (codec name) with argument rawvideo.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: audio=CABLE Output (VB-Audio Virtual Cable).
[dshow @ 0000000002d3c340] Selecting pin Capture on audio only
dshow passing through packet of type audio size 88200 timestamp 111632750000 orig timestamp 111632750000
[dshow @ 0000000002d3c340] All info found
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, dshow, from 'audio=CABLE Output (VB-Audio Virtual Cable)':
Duration: N/A, start: 11163.275000, bitrate: 1411 kb/s
Stream #1:0, 1, 1/10000000: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: output file DeckLink SDI (2).
Applying option af (set audio filters) with argument aresample=resampler=soxr.
Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument pcm_s16le.
Applying option ac (set number of audio channels) with argument 2.
Applying option map (set input stream mapping) with argument 0:v:0.
Applying option map (set input stream mapping) with argument 1:a:0.
Applying option f (force format) with argument decklink.
Applying option pix_fmt (set pixel format) with argument uyvy422.
Successfully parsed a group of options.
Opening an output file: DeckLink SDI (2).
Successfully opened the file.
detected 2 logical cores
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'video_size' to value '720x576'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'pix_fmt' to value '30'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] w:720 h:576 pixfmt:bgra tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0000000002d3df00] compat: called with args=[uyvy422]
[format @ 0000000002d3df00] Setting 'pix_fmts' to value 'uyvy422'
[auto-inserted scaler 0 @ 0000000002d44ca0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0000000002d44ca0] w:iw h:ih flags:'0x4' interl:0
[format @ 0000000002d3df00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0000000002e586c0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0000000002d44ca0] w:720 h:576 fmt:bgra sar:0/1 -> w:720 h:576 fmt:uyvy422 sar:0/1 flags:0x4
[Parsed_aresample_0 @ 0000000002d513a0] Setting 'resampler' to value 'soxr'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'time_base' to value '1/44100'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'sample_rate' to value '44100'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'sample_fmt' to value 's16'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'channel_layout' to value '0x3'
[graph 1 input from stream 1:0 @ 0000000002d51460] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[audio format for output stream 0:1 @ 0000000002d51520] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:1 @ 0000000002d51520] Setting 'sample_rates' to value '48000'
[audio format for output stream 0:1 @ 0000000002d51520] Setting 'channel_layouts' to value '0x3'
[AVFilterGraph @ 0000000002d4d0c0] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[Parsed_aresample_0 @ 0000000002d513a0] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
dshow passing through packet of type audio size 88200 timestamp 111637810000 orig timestamp 111637810000
[decklink @ 0000000002dd6a00] Found Decklink mode 720 x 576 with rate 25.00(i)
Output #0, decklink, to 'DeckLink SDI (2)':
Metadata:
encoder : Lavf56.30.100
Stream #0:0, 0, 1/25: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc56.35.101 rawvideo
Stream #0:1, 0, 1/48000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
encoder : Lavc56.35.101 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (bmp (native) -> rawvideo (native))
Stream #1:0 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
Cliping frame in rate conversion by 0.000008
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Encoder did not produce proper pts, making some up.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
*** 40 dup!
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 1.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 2.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 3.
[decklink @ 0000000002dd6a00] Buffered video frames: 4.
[decklink @ 0000000002dd6a00] Buffered video frames: 5.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 6.
[decklink @ 0000000002dd6a00] Buffered video frames: 7.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 8.
[decklink @ 0000000002dd6a00] Buffered video frames: 9.
[decklink @ 0000000002dd6a00] Buffered video frames: 10.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 11.
[decklink @ 0000000002dd6a00] Buffered video frames: 12.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 13.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
dshow passing through packet of type audio size 88200 timestamp 111642810000 orig timestamp 111642810000
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 14.
[decklink @ 0000000002dd6a00] Ending audio preroll.
[decklink @ 0000000002dd6a00] Starting scheduled playback.
[decklink @ 0000000002dd6a00] Buffered video frames: 15.
[decklink @ 0000000002dd6a00] Buffered video frames: 16.
[decklink @ 0000000002dd6a00] Buffered video frames: 17.
[decklink @ 0000000002dd6a00] Buffered video frames: 18.
[decklink @ 0000000002dd6a00] Buffered video frames: 19.
[decklink @ 0000000002dd6a00] Buffered video frames: 20.
[decklink @ 0000000002dd6a00] Buffered video frames: 21.
[decklink @ 0000000002dd6a00] Buffered video frames: 22.
[decklink @ 0000000002dd6a00] Buffered video frames: 23.
[decklink @ 0000000002dd6a00] Buffered video frames: 24.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 24.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
frame= 42 fps=0.0 q=0.0 size=N/A time=00:00:01.68 bitrate=N/A dup=40 drop=0
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
dshow passing through packet of type audio size 88200 timestamp 111647710000 orig timestamp 111647710000
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (814,496) -> (-45,491)
[gdigrab @ 0000000002d3f2a0] Cursor pos (814,496) -> (-45,491)
[gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
[gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
[gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
[gdigrab @ 0000000002d3f2a0] Cursor pos (806,497) -> (-53,492) -
Using ffmpeg to stream to or from Balckmagic cards
8 mars 2016, par Dave_AI want to use blackmagic cards with ffmpeg to stream their input but there is a problem.
When I use "H264 Pro" Encoder as a "decklink" or "dshow" input, I see this error in command line output of ffmpeg. Device is ok and I can Use it with other applications like MXPTiny or MXLight.
Here is the command and output :
ffmpeg -f dshow -list_devices true -i dummy -hide_banner
[dshow @ 0000000004efa5a0] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0000000004efa5a0] "Integrated Webcam"
[dshow @ 0000000004efa5a0] Alternative name "@device_pnp_\\?\usb#vid_0c45&pid_641d&mi_00#7&11c87d18&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 0000000004efa5a0] "Decklink Video Capture"
[dshow @ 0000000004efa5a0] Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{44A8B5C7-13B6-4211-BD40-35B629D9E6DF}"
[dshow @ 0000000004efa5a0] DirectShow audio devices
[dshow @ 0000000004efa5a0] "Microphone (2- High Definition Audio Device)"
[dshow @ 0000000004efa5a0] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{11A03288-DE6D-4A21-A66E-DC9303E838FA}"
[dshow @ 0000000004efa5a0] "Decklink Audio Capture"
[dshow @ 0000000004efa5a0] Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{AAA22F7E-5AA0-49D9-8C8D-B52B1AA92EB7}"
dummy: Immediate exit requestedand when I use "Decklink Audio Capture" to identify its options, here is the output :
ffmpeg -f dshow -list_options true -i video="Decklink Video Capture" -hide_banner
[dshow @ 000000000388a660] Unable to BindToObject for Decklink Video Capture
[dshow @ 000000000388a660] Could not find video device with name [Decklink Video Capture] among source devices of type video.
video=Decklink Video Capture: Input/output error -
How can I concatenate MP4 videos and exactly match this combined video to an audio track in ffmpeg ?
17 juin 2020, par mattadorBasically I want to combine 4 videos into a single video, then swap out the concatenated audio for another track. The audio track needs to be unaltered and sync exactly to the video.



Specifically, I'm creating multipaged dynamic audio spectrograms (visualizations of a sound file) using ggplot2 and gganimate in R, which I want to combine using ffmpeg. So the original WAV is chopped up into 3 sec segments, a video is created to visualize frequency changes over time for each segment, which I want to combine into 1 video with the original audio track matched up.



All of my relevant files are at github here in the vids folder : DL link here



The individual dynamic spectrograms export fine (1-4.mp4 in the archive). They are each 20ms too long ; they should be exactly 3s, but otherwise great.



I then use ffmpeg to concatenate them :



ffmpeg -f concat -safe 0 -i "mp4Segments.txt" -codec copy -t 12 -y "(1-4)vid.mp4"




but you can see the end of (1-4)vid.mp4 is getting a little off (the cursor is not all the way to the end, so I guess the video is getting cut off before the end. Not a deal-breaker, since the audio still aligns very well to the video cursor.



Now, since the concatenated video introduces glitchy audio between clips, I want to take the uncut original audio and add that to the assembled video.



ffmpeg -ss 0 -i "(1-4)vid.mp4" -i "origWAV.wav" -c:v libx264 -map 0:v:0 -map 1:a:0 -c:a aac -ac 1 -b:a 192k -y -vsync 1 -t 12 "(1-4)vid+origWAV.mp4"




but the audio is slightly off now, and ends even further before the end of the video. Since it's really important to align audio and video precisely for this, how can I speed up the video to fit the exact duration of the audio or otherwise fix this issue ?