
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (75)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (10104)
-
ffmpeg output to stdout is a black box (python)
27 juillet 2022, par dwilliamsProject Background :
The project I'm working on takes an image from a UE simulation camera, uses OpenCV to convert the image to .jpg, and streams the .jpg to a localhost port so that a second program can retrieve the images and annotate the objects in the simulation. I am attempting to convert these to a suitable format for UE4's WmfMediaPlayer via ffmpeg so that it can be streamed to another localhost port.


Problem :
I have managed to get a the stream active but the video at the end of stream is a black square. I'm confident but not 100% certain that I've setup the ffmpeg correctly. The output to console seem to imply that the conversion is working but I've been fooled before. It could also be the flask yield component.


ffmpeg declaration/setup :


process = (
 ffmpeg
 .input('C:/MOT/test.jpg') 
 .output('pipe:1', vcodec='libx264', format='avi') 
 .overwrite_output()
 .run_async(pipe_stdin=True, pipe_stdout=True)
 )



Flask Integration :


@app.route('/annotated')
def annotated():
 return Response(
 frame_generator_annotated(),
 mimetype='multipart/x-mixed-replace; boundary=frame'
 )


def frame_generator_annotated():
 global process
 while (True):
 frame = process.stdout.read()
 yield (b'--frame\r\n'
 b'Content-Type: video/avi\r\n\r\n' + frame + b'\r\n\r\n')



stream view :
http://localhost:5001/annotated


ffmpeg console output :


Running on all addresses.
 WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://192.168.1.220:5001/ (Press CTRL+C to quit)
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 10.2.1 (GCC) 20200726
 configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
[mjpeg @ 00000269be0faec0] EOI missing, emulating
Input #0, image2, from 'C:/MOT/test.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 1968 kb/s
 Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1024x576 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 00000269be0fc240] using SAR=1/1
[libx264 @ 00000269be0fc240] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000269be0fc240] profile High, level 3.1, 4:2:0, 8-bit
Output #0, avi, to 'pipe:1':
 Metadata:
 ISFT : Lavf58.45.100
 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc), 1024x576 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 25 tbn, 25 tbc
 Metadata:
 encoder : Lavc58.91.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 1 fps=0.0 q=28.0 Lsize= 2kB time=00:00:00.04 bitrate= 447.2kbits/s speed= 2.9x 
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 157.307251%
[libx264 @ 00000269be0fc240] frame I:1 Avg QP:13.00 size: 869
[libx264 @ 00000269be0fc240] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 00000269be0fc240] 8x8 transform intra:0.0%
[libx264 @ 00000269be0fc240] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0%
[libx264 @ 00000269be0fc240] i16 v,h,dc,p: 97% 0% 3% 0%
[libx264 @ 00000269be0fc240] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 00000269be0fc240] kb/s:173.80



-
Socket code Python code at the end influences code in the beginning
21 décembre 2019, par Samy SmartSo basically i am trying to do the following things : Client sends project file, Server receives Project file, Server generates Video file, Server sends video File, Client receives Video File. Everything works up until sending the Video back. The Thing is when i include my code for sending the Video, not even the Things that worked before work anymore.
The commented code in the code is the code that should send the Video backClient :
import socket
s = socket.socket()
ip = socket.gethostname()
file = "testae.aep"
s.connect((ip, 1234))
f = open(file, "rb")
txt = f.read(1024)
while txt:
s.send(txt)
print(f"Sending... {txt}")
txt = f.read(1024)
f.close()
#f2 = open("final_output.mp4", "wb")
#txt2 = s.recv(1024)
#while txt2:
# f2.write(txt2)
# txt2 = s.recv(1024)
#f2.close()
print("received final output")
s.close()Server :
import os
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((socket.gethostname(), 1234))
counter = 0
s.listen(5)
aerpath = "C:/aerender.lnk"
ffmpegpath = '"C:/Program Files/ffmpeg/bin/ffmpeg.exe"'
while True:
c, addr = s.accept()
print("Client Connected")
print(addr)
f = open(f"ae_render_file{counter}.aep", "wb")
txt = c.recv(1024)
while txt:
f.write(txt)
print(f"Receiving... {txt}")
txt = c.recv(1024)
print("Out of WHILE")
f.close()
print("received file")
os.system(aerpath + " -project " + f"C:/Users/weilu/PycharmProjects/localAERF/ae_render_file{counter}.aep "
+ '-comp "Comp 1" ' + f"-output C:/Users/weilu/PycharmProjects/localAERF/output/output{counter}")
os.system(ffmpegpath + " -i " + f"output/output{counter}.avi -f mp4 -vcodec libx264 -preset slow -profile:v main "
f"-pix_fmt yuv420p -acodec aac -hide_banner output/outputr{counter}.mp4")
#f2 = open(f"output/outputr{counter}.mp4","rb")
#txt2 = f2.read(1024)
#while txt2:
# c.send(txt2)
# print("Sending...")
# txt2 = f.read(1024)
#f2.close()
c.close()
counter += 1 -
Evolution #3560 (Fermé) : Supprimer l’option expérimentale Google Closure Compiler
4 mai 2017Fait en 3.2 par https://zone.spip.org/trac/spip-zone/changeset/104154