
Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (83)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
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 (...)
Sur d’autres sites (7763)
-
FFMPEG - converting interlaced 720x480 MPEG2 to scaled up progressive 1440x1080 HEVC (Nvidia available)
6 février 2024, par PCSO SAR COMMI am trying to improve the video of a ripped DVD. The current file is encoded in MPEG2 interlaced and 720:480. I am trying see if it is possible, with a bit of conversion, for it to look better... possibly upscaling to near-HD if it is possible. My computer does have an Nvida (1050 Ti) card, so I was thinking that may help.


I used


ffmpeg -hwaccel cuda -i "input.mkv" -c:v hevc_nvenc -preset p7 -profile:v 1 -level 0 -tier 1 -tune 1 -vf yadif -vf "scale=1440x1080:flags=lanczos" -c:a aac -c:s srt output.mkv




The "-vf yadif" portion in that was intended to de-interlace, after looking at ideas on de-interlacing but the output still ends up being interlaced. The interlace artifact is quite annoying when viewed on my computer.


-
How can I pipe JPEG files into FFMPEG and create an RTSP, H.264 stream ?
25 janvier 2023, par Michael SchmidtI have an input RTSP stream that I would like to manipulate on a frame-by-frame basis using openCV. After these changes are applied, I'd like to create a separate RTSP stream from those frames. I'm piping the resulting JPEG images to FFMPEG via STDIN. I need the intermediate frame to be a JPEG.


In other words, I must conform to this pattern :
RTSP IN -> Create JPEG as input -> manipulation, JPEG out -> RTSP


The PROBLEM I'm trying to solve deals with a codec at this point. See the last few lines of FFMPEG's output error message.


Here is what I have :


def open_ffmpeg_stream_process():
 args = (
 "ffmpeg -re -stream_loop -1 "
 "-f jpeg_pipe "
 "-s 512x288 "
 "-i pipe:0 "
 "-c:v h264 "
 "-f rtsp "
 "rtsp://localhost:8100/out0"
 ).split()
 return subprocess.Popen(args, stdin=subprocess.PIPE)

video_source = cv2.VideoCapture('rtsp://localhost:9100/in0')

frame_cnt = 0
FRAME_SKIP = 30

ffmpeg_process = open_ffmpeg_stream_process()
while video_source.isOpened():

 frame_cnt += 1
 if frame_cnt % FRAME_SKIP:
 continue
 else:
 frame_cnt = 0

 _, frame = video_source.read()
 _, jpg = cv2.imencode('.jpg', frame)

 # Work on the JPEG occurs here, and the output will be a JPEG

 ffmpeg_process.stdin.write(jpg.astype(np.uint8).tobytes())

 if cv2.waitKey(1) & 0xFF == ord('q'):
 break

video_source.release()



Here is FFMPEG's output :


ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: ---- noisy configuration stuff ----
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, jpeg_pipe, from 'pipe:0':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: mjpeg, rgb24(bt470bg/unknown/unknown), 512x288, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
[libx264 @ 0x562a1ffc5840] using SAR=1/1
[libx264 @ 0x562a1ffc5840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x562a1ffc5840] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x562a1ffc5840] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - 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=18 lookahead_threads=3 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=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.40 aq=1:1.00
[tcp @ 0x562a20826c00] Connection to tcp://localhost:8100?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 -- 
Conversion failed!



How does one create an H.264, RTSP stream from a series of JPEG frames using FFMPEG.


Notes : The FFMPEG command/subproccess might need unrelated improvements, feel free to comment on my crappy code.


Edit : Oof, I just found out the FFMPEG command doesn't even work stand alone.


-
PHP/ffmpeg (Windows 7) : - Permission Denied. Tried everything, but still doesn't work
14 janvier, par user365465I have a command-line PHP script that, when given the folder name as an argument when executing the script, will find all images in said folder and resize them using FFmpeg. Problem is, I always get a Permission Denied error in FFmpeg when it attempts to get at the files within the folder. This is while being on Windows 7.



The big problem is that I've tried every solution that keeps popping up on the interwebs when I search for how to fix it. I've changed the settings in Avast !, did the attrib command (both as normal and "Run as Administrator") to unmark as read-only, took ownership of the folder both via command line and using that GUI takeown context menu thing everyone keeps throwing around (obviously before my efforts to mark everything as not-read-only), messed with permissions, everything. I keep searching and searching for a solution, but all of the sites keep throwing out the same things over and over again - things that I've already tried multiple times. I'm at the end of my rope here. All I want to do is resize images quickly and automatically so I can put them up on my website, yet this has been a massive headache...



Please help me ! :(



Update (Additional Points) :



- 

-
The error is through FFmpeg, not PHP. FFmpeg spits out the permission denied error, the script just continues doing what it does normally (or, at least, it would if it weren't for my die statement that kicks in in the event of FFmpeg failing).
-
FFmpeg will execute just fine if it's run normally through the command line instead of through the script. However, this does not help the problem of me having to resize hundreds of photos by hand !
-
I'm just running this script in the normal terminal using the CLI engine. Weird use for PHP, I know, but since I already knew how to work with FFmpeg in PHP (but in Linux !) so I figured I might as well use the code as a normal, stand-alone program...
-
FFmpeg spits out the same error regardless of which PHP function is used to execute it. It happens for shell_exec, exec, passthru, and system.










-