
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (74)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (8076)
-
ffmpeg gets stuck at 20 FPS on 4Kp30
1er mars 2023, par Ivy GrowingPlease, help me to understand why putting OBS between the capture card and the ffmpeg improves the FPS rate.


Details :


timeit ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -hwaccel qsv -f dshow -video_size 3840x2160 -rtbufsize 2002000k -framerate 30 -c:v rawvideo -i video="USB Capture HDMI 4K+" -r 30 -t 00:01:00 -c:v h264_qsv -preset veryfast -b:v 10000K -movflags faststart -f mpegts output4kqsv.mpg -benchmark
...
Input #0, dshow, from 'video=USB Capture HDMI 4K+':
 Duration: N/A, start: 787911.842300, bitrate: N/A
 Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422(tv, bt709/bt709/unknown), 3840x2160, 30 fps, 30 tbr, 10000k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'output4kqsv.mpg':
 Metadata:
 encoder : Lavf59.27.100
 Stream #0:0: Video: h264, nv12(tv, bt709/bt709/unknown, progressive), 3840x2160, q=2-31, 10000 kb/s, 30 fps, 90k tbn
 Metadata:
 encoder : Lavc59.37.100 h264_qsv
...
frame= 1800 fps= 19 q=17.0 Lsize= 74557kB time=00:00:59.90 bitrate=10196.5kbits/s speed=0.648x
...
Elapsed Time: 0:01:34.749



Capturing the video from the capture card is limited to 19-20 FPS and speed 0.65. Tried million tweaks like changing codec from QSV to pure software, changing bitrate, presets, flags, etc - nothing helps.


However, if the same capture card is sourced to OBS and the OBS is set as Virtual camera then it's 30 FPS and speed 1.0 :


timeit ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -hwaccel qsv -f dshow -video_size 3840x2160 -rtbufsize 2002000k -framerate 30 -i video="OBS Virtual Camera" -r 30 -t 00:01:00 -c:v h264_qsv -preset veryfast -b:v 10000K -movflags faststart -f mpegts obs4kqsv1.mpg -benchmark
...
Input #0, dshow, from 'video=OBS Virtual Camera':
 Duration: N/A, start: 1576816.988000, bitrate: N/A
 Stream #0:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 3840x2160, 30 fps, 30 tbr, 10000k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'obs4kqsv1.mpg':
 Metadata:
 encoder : Lavf59.27.100
 Stream #0:0: Video: h264, nv12(progressive), 3840x2160, q=2-31, 10000 kb/s, 30 fps, 90k tbn
 Metadata:
 encoder : Lavc59.37.100 h264_qsv
...
frame= 1800 fps= 30 q=17.0 Lsize= 74629kB time=00:00:59.90 bitrate=10206.3kbits/s speed=0.999x
...
Elapsed Time: 0:01:02.780



Is OBS just providing "artificial" extra frames ?


How to tweak the ffmpeg command to have all 30 FPS encoded ?


-
ffmpeg : How does one designate what parts of an overlay video stream let the underlay video stream show through ?
21 février 2023, par Walt HowardStream 0 is a rotating planet created using povray. (https://www.povray.org/)


Stream 1 is just a static jpeg of stars.


I'm using overlay like this :


nice ffmpeg -i protoplanet.mp4 -i stars.jpg \
 -filter_complex "[0:v]scale=1024:768[scaled];[1:v][scaled]overlay=0:0" \
 -movflags faststart -pix_fmt yuv420p -r 10 planet.mp4



I had it working when I used the output from povray directly. I didn't have to know why that worked, because it just did. However, after adding some post processing to the planet video, the entire video has no alpha channel (educated guess) so the background stream (Stream 1) cannot show through.


The post processing I did was this (which works great) : https://www.reddit.com/r/ffmpeg/comments/im2mkp/creating_a_retro_glow_effect_with_ffmpeg/


But that made the video unable to have an overlay background possibly due to it destroying the alpha channel and turning many of the blacks to dark grey.


I can merge the pure POVRAY output and the background and then add the glow effect, but it adds the effect to the background stars and captions also which ruins the effect to some degree. I want to glo-ify the planet first, then stick it on a pure starfield background.


In thinking this over I may have to recreate the alpha channel after adding the glow effect, using a nearest match to black and dark grey to alpha.


Hmmm. It might be a codec issue as I didn't specify any -c:v in any of my commands....


-
PIL image save causes FFMPEG to fail
6 janvier 2023, par XorgonI have been attempting to convert some videos using FFMPEG with image2pipe using PIL. I have found that when the frame is particularly simple (such as all one colour), it causes FFMPEG to fail with the following message :


[image2pipe @ 000001785b599bc0] Could not find codec parameters for stream 0 (Video: none, none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2pipe, from 'pipe:':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: none, none, 24 tbr, 24 tbn, 24 tbc
Output #0, mp4, to '<your filepath="filepath" here="here">/test.mp4':
Output file #0 does not contain any stream
</your>


The minimum code I have found to reproduce this is as follows :


import numpy as np
from subprocess import Popen, PIPE
from PIL import Image

output_file = "<your filepath="filepath" here="here">/test.mp4"

p = Popen(['ffmpeg',
 '-y', # Overwrite files
 '-f', 'image2pipe', # Input format
 '-r', '24', # Framerate
 '-i', '-', # stdin
 '-c:v', 'libx264', # Codec
 '-preset', 'slow',
 '-crf', f'18', # H264 Constant Rate Factor (quality, lower is better)
 output_file], stdin=PIPE)

# This one works
# vid = np.random.randint(0, 255, (10, 64, 64)) # Create a 64x64 'video' with 10 frames of random noise

# This one does not
vid = np.full((10, 64, 64), 129) # Create a 64x64 'video' with 10 frames of pure grey

for frame in vid:
 im = Image.fromarray(np.uint8(frame))
 im.save(p.stdin, 'JPEG')

p.stdin.close()
p.wait()
</your>


Notably, if I do the same thing with a randomly generated series of frames (commented as "This one works" in the script above), it will output fine.


One workaround I have found so far is to replace 'JPEG' with 'PNG' in the
im.save(...)
call. However, I would be interested in understanding what causes it to fail with JPEG.