
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (64)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (8733)
-
How to decode Byte string from continous video frames in python
15 juillet 2021, par fresch mani am trying to get PNG from a video stream. first i connect the server during socket, and i recieve presistent byte string. however when i use Pickel ,i get a Error,that is UnpicklingError : invalid load key, '\x10.


i surpose that ,if i should first do someting to the bytestring before i use pickel.or i should use another methode


i have already search in the internet, but all the answers are , open locally video and so ..but my byte string are acctully presistent RAW video frames(yuv420) during tcp transport.


`import socket,os,struct,numpy,pickle
TCP_IP = '192.168.0.90'
TCP_PORT = 5000
BUFFER_SIZE =1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
while True :
 data = s.recv(BUFFER_SIZE)
 data = pickle.loads(data) `



thank you


-
avcodec/bsf : switch to av_get_token to parse bsf list string
3 juillet 2021, par Gyan Doshiavcodec/bsf : switch to av_get_token to parse bsf list string
The recently added setts bsf makes use of the eval API whose
expressions can contain commas. The existing parsing in
av_bsf_list_parse_str() uses av_strtok to naively split
the string at commas, thus preventing the use of setts filter
with expressions containing commas.av_get_token can work with escaped commas, allowing full use of setts.
-
Filtering string for hidden character when read from file in bash [duplicate]
19 mai 2021, par BharathYesI am writing a bash script to trim video file into small pieces and finally merge them into a single video file using ffmpeg based on specified time.


#!/bin/bash

filename="$1"
linecount=`wc -l "${filename}.txt"`
echo -n "" > to-merge.list

# file split by time
count=0
IFS=''
while read -r fromTime ; read -r toTime; do
 echo "$fromTime and $toTime done"
 ffmpeg -i "${filename}.mp4" -ss $fromTime -to $toTime -c copy "${filename}_pt_${count}.mp4"
 echo "file '${filename}_pt_${count}.mp4'" >> to-merge.list
 count=$((count+1))
done < "${filename}.txt"

# file merge
`ffmpeg -f concat -safe 0 -i to-merge.list -c copy "${filename}-trimmed.mp4"`



The input file contains time (odd lines are taken as start time and even as the end time). A file I use is :


00:00:00
00:39:34
00:39:38
01:23:14
01:23:16
02:03:45
02:03:48
02:43:43




problem faced


The echo in while loop prints this :
done02:03:45


The overwriting makes me think the time stored in the variables must contain a special character at the end that makes it invalid in ffmpeg.
ffmpeg throws this error :
Invalid duration specification for ss: 01:23:16


Is there a way to cleanup the time variable ?


I have tried to find what is causing this issue or how to get rid of it but drawing a blank.



what I have tried so far


use
grep -Eo '[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}'
to find time. While this works on the shell I am unable to use it in the script.

Tried splitting time by : into hour, min and sec and saving them into an array to then merge them back but this makes it unnecessarily complicated and error prone.


PS :
Is
while read
to be preferred for reading multiple lines like here or should tools like sed be used for best practice ? Such assed '2,4 !d' /tmp/test.txt
?