
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 (16)
-
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 (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (4270)
-
How to set PTS value to .mp4 video frames without losing video quality
27 janvier, par GoanI have searched for a solution to this problem for a while now, and tried many different approaches without any success.


I have an .mp4 video (no audio) in 30Hz along with a text file
timestamps.txt
containing exact timestamps for each frame of the video. My goal is to embed the timestamps into the frames metadata without losing video quality.

E.g. the current video timestamps (which is exactly 30Hz) :


0.0333
0.0666
0.0999
...



I aim to embed exact timestamps such as (which could yield e.g. 29.94Hz) :


0.0313
0.0656
0.0975
...



I first tried the ffmpeg -filter_complex and -vf without any success. Then I tried using PyAv (pyav==13.1.0) to set the timestamp frame by frame with two different approaches :


Approach 1 : Using .add_stream(template=...)


...
TIMEBASE = Fraction(1, 10000)
pts_stamps = load_timestamps() # First five pts_stamps are [0,316,635,970,1290...]

# Open the input container and stream
input_container = av.open()
input_stream = input_container.streams.video[0]

# Create an output container and configure the output stream using template
output_container = av.open(, mode="w")
output_stream = output_container.add_stream(template=input_stream)

# Iterate through the frames and set the PTS
for i, frame in tqdm(enumerate(input_container.decode(video=0))):
 frame.pts = pts_stamps[i]
 frame.time_base = TIMEBASE

 for packet in output_stream.encode(frame):
 output_container.mux(packet)

# Finalize encoding and close the containers
for packet in output_stream.encode():
 output_container.mux(packet)

output_container.close()
input_container.close()



However, this resulted in the error "ValueError : Cannot rebase to zero time." which seems to be a relatively common issue which I don't seem to be able to resolve. Not sure why.


Approach 2 : Setting the output container settings manually


...
TIMEBASE = Fraction(1, 10000)
pts_stamps = load_timestamps() # First five pts_stamps are [0,316,635,970,1290...]

# Open the input container and stream
input_container = av.open()
input_stream = input_container.streams.video[0]

# Create an output container and configure the output stream using template
output_container = av.open(, mode="w")
output_stream = output_container.add_stream(input_stream.codec.name, rate=input_stream.average_rate)
output_stream.width = input_stream.width
output_stream.height = input_stream.height
output_stream.pix_fmt = input_stream.pix_fmt
output_stream.bit_rate = input_stream.bit_rate
output_stream.time_base = input_stream.time_base
output_stream.options = {"crf": "0"}

# Iterate through the frames and set the PTS
for i, frame in tqdm(enumerate(input_container.decode(video=0))):
 frame.pts = pts_stamps[i]
 frame.time_base = TIMEBASE

 for packet in output_stream.encode(frame):
 output_container.mux(packet)

# Finalize encoding and close the containers
for packet in output_stream.encode():
 output_container.mux(packet)

output_container.close()
input_container.close()



This result in a video with correct timestamps. However, the quality is not the same. The output file is 4x smaller, and there seem to be an average pixel value different of 2.7 pixels for each frame. I.e. it seems the encoding is lossy.


Any tips on how to resolve this ?


-
What is the FFMPEG packet UDP format to unpack with Go ?
2 décembre 2016, par ThetraNetworkHow can you unpack UDP packets sent from ffmpeg ?
I wrote a script to listen to UDP packets and write them into file, but the file is invalid and almost twice the size.
This is how I send the data :
ffmpeg -i video.mp4 -c:a aac -ar 48000 -ab 196k \
-ac 2 -strict -2 -c:v libx264 -vb 500k -r 25 -s 320x240 \
-ss 00.000 -f mp4 -movflags frag_keyframe+empty_moov \ udp://127.0.0.1:1936This is the code in Go. It should simply write the video into a new video file :
package main
import (
"net"
"os"
)
func main(){
var buf []byte = make([]byte, 512)
addr, _ := net.ResolveUDPAddr("udp", ":1936")
conn, _ := net.ListenUDP("udp", addr)
defer conn.Close()
os.Create("new_video.mp4")
f, _ := os.OpenFile("new_video.mp4", syscall.O_WRONLY, 0644)
defer f.Close()
for {
n, _ := conn.Read(buf)
f.Write(buf[0:n])
buf = make([]byte, 512)
}
}Thanks
Updated
I changed the format to mp4 but the file is still invalid.
-
Evolution #3119 (Nouveau) : Développer le classement des objets de SPIP par Glissé/lâché
13 décembre 2013, par realet RealETPossibilité de classer des articles par drag’n drop dans l’interface privée, par exemple avec sortable ( http://jqueryui.com/sortable/ ) ou mêmes les images et documents, selon ce même principe (une démo http://blog.arnaud-k.fr/demos/jquery-drag-n-drop/ )
Analyse¶
Il y a déjà une balise #RANG qui calcule le numéro de titre s’il y en a un (ça affiche la partie numéro de numéro point espace titre).
Idéalement, et pour assurer une bonne transition, il faudrait sans doute :- Créer un champ rang
- modifier la balise rang en conséquence
- Enregistrer le numéro du titre dans le champ rang
- Et que l’opération de drag’n’drop :
- modifie les champs rang impactés
- et enregistre aussi le numéro point espace dans les titres pour rétro compatibilité (pouvoir débrayer ça par un define dans mes_options)
- Et rajouter un bouton pour supprimer le classement
Et prévoir que dans les boucles, par rang !par date puisse fonctionner correctement si rang à NULL.
Discussion originale : http://thread.gmane.org/gmane.comp.web.spip.devel/64769