
Recherche avancée
Médias (1)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (9)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
À propos des documents
21 juin 2013, parQue faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
Document bloqué en file d’attente ?
Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)
Sur d’autres sites (2727)
-
Python program which reads and extracts specific information from JSON file generated by FFPROBE
3 février 2017, par Georgе StoyanovI want to create a simple Python script, which runs a custom ffprobe script and then extracts some specific information from the generated JSON file. So the ffprobe command is :
ffprobe -v quiet -print_format json -show_format -show_streams example.mp4 > output.json
This command is extracting the video specific information into output.json file. Then I want to read the file and extract some specific information out of it. For example the JSON file has the following format :
{
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High 4:2:2 Intra",
"codec_type": "video",
"codec_time_base": "1/100",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"width": 3840,
"height": 2160,
"coded_width": 3840,
"coded_height": 2160,
"has_b_frames": 0,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv422p10le",
"level": 52,
"color_range": "tv",
"color_space": "bt709",
"color_transfer": "bt709",
"color_primaries": "bt709",
"chroma_location": "left",
"field_order": "progressive",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"r_frame_rate": "50/1",
"avg_frame_rate": "50/1",
"time_base": "1/50",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 15000,
"duration": "300.000000",
"bits_per_raw_sample": "10",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"file_package_umid": "0x060A2B340101010501010D0013EC94F152947134B6EC94F10052947134B6EC01",
"file_package_name": "Source Package"
}
}
],
"format": {
"filename": "300sec.mxf",
"nb_streams": 1,
"nb_programs": 0,
"format_name": "mxf",
"format_long_name": "MXF (Material eXchange Format)",
"start_time": "0.000000",
"duration": "300.000000",
"size": "16772788991",
"bit_rate": "447274373",
"probe_score": 100,
"tags": {
"uid": "adab4424-2f25-4dc7-92ff-29bd000c0000",
"generation_uid": "adab4424-2f25-4dc7-92ff-29bd000c0001",
"company_name": "FFmpeg",
"product_name": "OP1a Muxer",
"product_version": "57.66.101",
"product_uid": "adab4424-2f25-4dc7-92ff-29bd000c0002",
"modification_date": "0-01-02T00:00:00.000000Z",
"material_package_umid": "0x060A2B340101010501010D0013EC94F152947134B6EC94F10052947134B6EC00",
"timecode": "00:00:00:00"
}
}
}Perfect will be if the Python script runs and then asks you for the path to the input file.
Unfortunately I have very little experience with Python, but it comes pre-installed on my system and I want to use it. The other option is to write a bash script doing the same. Any suggestions will be greatly appreciated.
So far I have figured out how I can open the JSON file and to extract data from it using :
import json
with open('output.json') as json_data:
data = json.load(json_data)
json_data.close()
print(data["streams"][0]["codec_name"])
print(data["streams"][0]["profile"]) -
Convert ts m3u8 to png FFMPEG
10 novembre 2019, par Kerbin LozadaI recently saw a movie website that used m3u8 but the video files instead of being .ts are .png and when I download a file it is an image instead of a video with ffmpeg I extracted the information from the file and this it was what came out
video url : VIDEO EN PNG
{
"streams": [
{
"index": 0,
"codec_name": "png",
"codec_long_name": "PNG (Portable Network Graphics) image",
"codec_type": "video",
"codec_time_base": "0/1",
"codec_tag_string": "
[0][0][0]",
"codec_tag": "0x0000",
"width": 1,
"height": 1,
"coded_width": 1,
"coded_height": 1,
"has_b_frames": 0,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "1:1",
"pix_fmt": "rgb24",
"level": -99,
"color_range": "pc",
"refs": 1,
"r_frame_rate": "25/1",
"avg_frame_rate": "0/0",
"time_base": "1/25",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
}
}
],
"format": {
"filename": "84a9c6afffed621b4c2e684dcd4cd9b34a.ts_5daadc5f87309.mp4",
"nb_streams": 1,
"nb_programs": 0,
"format_name": "png_pipe",
"format_long_name": "piped png sequence",
"size": "3025296",
"probe_score": 99
}I am trying to convert a video into png and tried some way with ffmpeg but since I am very new to ffmpeg I have not managed to convert a video in m3u8 list with image format and at the same time they are video format.
Example the file for download
-
JSON Python check for data
3 mars 2017, par Georgе StoyanovSo I am trying to write a script which is looking into a JSON file and check if stream with index 1 exists. Right now my program doesn’t do that. Here is the program itself. I want to check if
(data["streams"][1])
exists and in case it exists to print the codec, sample rate and the bitrate of all available audio streams.#!/usr/bin/env python
import subprocess
import json
import os.path
# Saving the file path and the name path into input_file
input_file = raw_input("Please enter the input file path: ")
# Loop until the user enters a valid input file
while os.path.isfile(input_file) == False:
print "Please try again, the specified file / path don't exist!"
input_file = raw_input("Please enter the input file path again: ")
# Execution of the ffprobe command to list the general statistics of the file. I have separated both scripts because the script for analyzing the frames is taking longer time.
returned_data = subprocess.check_output(['ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', input_file])
# Loading of the json file
data = json.loads(returned_data.decode('utf-8'))
t = (data["streams"][0]["avg_frame_rate"])
fps = [float(x) for x in t.split('/')]
# Printing of the general information about the video file
print "========================== Video ============================="
print
print "Codec: %s" %(data["streams"][0]["codec_long_name"])
print "Profile: %s" %(data["streams"][0]["profile"])
print "Resolution: %d x %d" %((data["streams"][0]["width"]), (data["streams"][0]["height"]))
print "Pixel Format: %s" %(data["streams"][0]["pix_fmt"])
print "Bits per sample: %s" %(data["streams"][0]["bits_per_raw_sample"])
print
print "========================== Audio ============================="
print
print "Codec: %s" %(data["streams"][1]["codec_name"])
print "Sample Rate: %.3f KHz" %(int(data["streams"][1]["sample_rate"])/1000)
print "Bitrate: %d Kbps" %(int(data["streams"][1]["bit_rate"])/1000)And here is the output of the JSON file.
{
"streams": [
{
"index": 0,
"codec_name": "mpeg4",
"codec_long_name": "MPEG-4 part 2",
"profile": "Simple Profile",
"codec_type": "video",
"codec_time_base": "1/24",
"codec_tag_string": "FMP4",
"codec_tag": "0x34504d46",
"width": 854,
"height": 480,
"coded_width": 854,
"coded_height": 480,
"has_b_frames": 0,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "427:240",
"pix_fmt": "yuv420p",
"level": 1,
"chroma_location": "left",
"refs": 1,
"quarter_sample": "false",
"divx_packed": "false",
"r_frame_rate": "24/1",
"avg_frame_rate": "24/1",
"time_base": "1/24",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 14315,
"duration": "596.458333",
"bit_rate": "2500431",
"nb_frames": "14315",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
}
},
{
"index": 1,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[0] [0][0]",
"codec_tag": "0x2000",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 6,
"channel_layout": "5.1(side)",
"bits_per_sample": 0,
"dmix_mode": "-1",