
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (97)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (8112)
-
error when I try to seek on a streaming with ffmpeg and flask
29 juillet 2021, par Martin Oller ExpositoI want to get a seekable stream from a google drive file but
When calling 127.0.0.1:500/, it works and it returns the video stream but it does not show me the duration of the video nor does it allow me to advance or rewind it




I have also done tests using an html player and it gives me an error in the content length and it seems that after 8 seconds it starts to upload the duration of the file up to 10 seconds (the total duration of the file is 10s)




import threading
from flask import Flask, request
from flask.helpers import stream_with_context
import requests
import subprocess
from requests import Response

from flask import request, make_response, Response, stream_with_context, send_file



app = Flask(__name__)

@app.route('/<id>')
def index(id):
 
 range = request.headers.get('Range')
 
 
 token = "ya29.a0ARrdaM8vW_pKmGhIRleJiZ9fuoprk2-zS0bgJPaslD3V4idJ6wK52_iwJE8MOYnj7kCOWl5m2oHlEWc3LEWcPt5-b4nemoC7SKy7l-4QO1DviJnPBfVeHruAU27I_UE3gMPRV4H-Tk1ZLrNp56UfxyR-ObAx"

 headers = {
 "Authorization":"Bearer "+token
 }
 if (range != None):
 headers = {
 "Authorization": "Bearer " + token,
 "Range":range
 }

 url = "https://www.googleapis.com/drive/v3/files/"+id+"?alt=media"
 r = requests.get(url, headers=headers, stream=True)
 
 
 def getVideoStreaming():
 for chunck in r.iter_content(1024):
 if chunck:
 process.stdin.write(chunck)
 process.stdin.close()

 thread = threading.Thread(target=getVideoStreaming)
 


 command = ("ffmpeg","-i", "-","-y","-vcodec","copy","-movflags", "frag_keyframe+empty_moov","-f","mp4","pipe:1")
 process = subprocess.Popen(command,shell=True,stdout = subprocess.PIPE,stdin=subprocess.PIPE)

 thread.start()
 
 
 def readingFfmpeg():
 
 for data in iter(process.stdout.readline, b''):
 if not data:
 break
 yield data
 
 
 
 response = Response(stream_with_context(readingFfmpeg()),mimetype=r.headers.get('Content-Type'))
 
 response.headers.set('Content-Range',r.headers.get('Content-Range'))
 response.headers.set('Cache-Control', r.headers.get('Cache-Control'))
 response.headers.set('Content-Length', r.headers.get('Content-Length'))
 
 
 
 if(range != None):
 return response,200
 else:
 return response,206
 
</id>


-
Is there a way to extract a video frame, encode a sentence behind it, put it back, and then decode it ?
29 juillet 2021, par Jesse HixI am trying to do stenography on an MP4 video where I am pulling a frame out at a certain time, 5.52 sec, saving that frame as a jpg or jpeg using any image stenography tool, in this case stegosuite, to encode a sentence behind the image and then reinsert that image back into the video at the same time and then extract it again with the same command and using the same steno tool read the message.


Up until decoding the message everything runs without issue.
I know that it is not working because the videos are not the same in size meaning that the frankenstein video is not the same as the original and thus messing up the frame extraction.


Question :
Is there a way to extract a frame encode a sentence behind it put it back and then decode it ?

What I tried :

Used to extract the frame both times :

ffmpeg -ss 5.52 -i original.mp4 -vframes 1 frames_%d.jpg



Used to combine the image back into the video :


ffmpeg -i original.mp4 -i frames_1_embed.jpg -filter_complex "[1]setpts=5.52/TB[im];[0][im]overlay=eof_action=pass" -c:a copy out_1.mp4



-
Frame seek inconsistency between Chrome and ffmpeg : example videos
17 avril 2021, par OlgaPpThere is a known issue where Chrome doesn't do an accurate frame seek via
<video></video>
element's currentTime. (I.e. if one sets video's currentTime to desired_frame_number/fps, it may be off by a few frames, as compared to "canonical" ffmpeg frames. Typically, chrome inserts stale frames in the beginning).

This seems to be explained by b-frames. Another reason could be varying frame rates, but let's assume a constant frame rate for now.


I am looking for some sample videos or an ffmpeg command to generate one. I have tried the
-bf
flag when converting a well-behaved video to have some b-frames, but it still produced a well behaved video.