
Recherche avancée
Autres articles (76)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
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 ;
Sur d’autres sites (12348)
-
Play MPEG-CENC encrypted local file on android
26 mai 2018, par rd7773I need to decrypt and play a cenc-aes-ctr mp4 video on the fly which is locally stored on the device.
The video was encrypted at server end by using following ffmpeg command and then downloaded to phone :ffmpeg -i SampleVideo_1280x720_1mb.mp4 -vcodec copy -acodec copy -encryption_scheme cenc-aes-ctr -encryption_key 76a6c65c5ea762046bd749a2e632ccbb -encryption_kid a7e61c373e219033c21091fa607bf3b8 SampleVideo_1280x720_1mb_encrypted.mp4
It is successfully getting played with ffmpeg command :
ffplay SampleVideo_1280x720_1mb_encrypted.mp4 -decryption_key 76a6c65c5ea762046bd749a2e632ccbb
But I do not want to use ffmpeg in android so I am using libeasy library which creates a local http server to make a stream of offline video and then decrypt it on the fly using Cipher. The Cipher which is provided to the LocalHttpServer for decryption process, needs the initialisation vector (iv) for CTR mode which is not externally available to us.
From above command it is clear that ffmpeg doesn’t require the IV for encryption or decryption to be passed but i guess internally it uses 8 byte random iv.This is how i am creating Cipher to pass to LocalHttpServer :
final Cipher c = Cipher.getInstance("AES/CTR/NoPadding","BC);
c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(hexStringToBytes("76a6c65c5ea762046bd749a2e632ccbb"), "AES"), new IvParameterSpec(new byte[16]));So my question is, what value of iv should i pass in this case to Cipher ? My basic requirement is to play a offline MPEG-CENC encrypted mp4 video stored on device.
Keeping in mind my very limited knowledge of cryptography, references to any library that provides such implementation with or without any tweaks is welcomed. -
How can I debug this rtmp stream ? It wont play on Vlc, and logs show no error
12 avril 2020, par SquirrelSenpaiI am creating a rtmp stream using FFMPEG and sending the data to local NGINX server with the RTMP module.



When playing the stream in VLC I am unable to hear any music. Have I missed something ?



No FFMPEG errors according to logs



fmpeg -hide_banner -loglevel warning -i http://x.x.x.x:8138 -f mp3 rtmp://localhost/live




To test VLC >> Open Network Stream >> rtmp ://localhost/live



Nginx.conf



worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
 worker_connections 768;
 # multi_accept on;
}

rtmp_auto_push on;

rtmp{

 server{

 listen 1935;

 application live {

 # enable live streaming
 live on;
 record off;

 # publish only from localhost
 allow publish all;
 allow play all;

 }

 }

}



-
How to play video file with audio with DearPyGUI (Python) ?
1er mars 2023, par Vi TietI'm using DearPyGUI to make a simple media player that can play video file (mp4, etc.) together with it's audio. The pre-requisite is that DearPyGUI is a must, however video feature will not exist until v2.0, which is still far in the future.


Currently, I can only render the frames using OpenCV library for Python, however, the problem is how can I play the audio as well as play it in sync with the output video frames ?


For context, I'm quite new to Python, and I don't know much about video and audio streaming, but I've thought of some approaches to this problem by looking through help posts online (However, I still have no idea how I can implement any of these seamlessly) :


- 

-
OpenCV for video frames, and audio ??? some libraries like ffmpeg-python or miniaudio to play sound... (How...?)


-
Extract video frames and audio here and then use the raw data to play it (How...?)


-
This example here is pretty close to what I want excluding the playing video and audio part, but I have no idea where to go from there. The video stream and the audio stream are instances of ffmpeg.nodes.FilterableStream, and they appear to hold addresses to somewhere. (No idea...)


-
Another very close idea is using ffpyplayer I was able to get the video frame. However, the below code yields a blueish purple color tint to the video, and the frame rate is very slow compared to original (So close...)












import time
import numpy as np
import cv2 as cv
from ffpyplayer.player import MediaPlayer


# https://github.com/Kazuhito00/Image-Processing-Node-Editor/blob/main/node_editor/util.py 
def cv2dpg(frame): 

 data = cv.resize(frame, (VIDEO_WIDTH, VIDEO_HEIGHT))
 data = np.flip(frame, 2)
 data = data.ravel()
 data = np.asfarray(data, dtype=np.float32)

 return np.true_divide(data, 255.0)


# https://stackoverflow.com/questions/59611075/how-would-i-go-about-playing-a-video-stream-with-ffpyplayer
# https://matham.github.io/ffpyplayer/examples.html#examples
def play_video(loaded_file_path):

 global player, is_playing
 player = MediaPlayer(loaded_file_path)

 while is_playing:

 frame, val = player.get_frame()

 if val == 'eof':
 is_playing = False
 break

 elif not frame:
 time.sleep(0.01)

 elif val != 'eof' and frame is not None:
 img, t = frame
 w = img.get_size()[0]
 h = img.get_size()[1]
 cv_mat = np.uint8(np.asarray(list(img.to_bytearray()[0])).reshape((h, w, 3)))
 texture_data = cv2dpg(cv_mat)
 dpg.set_value(VIDEO_CANVAS_TAG, texture_data)

 dpg.set_value(VIDEO_CANVAS_TAG, DEFAULT_VIDEO_TEXTURE)



I still need to do more research, but any pointer to somewhere good to start off (either handling raw data or using different libraries) would be greatly appreciated !


EDIT :
For more context, I'm using raw texture like this example of DearPyGUI official documentation to render the video frames that were extracted in the while loop.


-