
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 (66)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (8899)
-
Ffmpeg inaccurate cut duration with ts [duplicate]
30 juillet 2020, par Lemon SkyI need to accurately seek and cut a video. Some online sources say put -ss in front or after the source. The result is the same for me. In the examples below, the start time is accurate but the duration is not accurate.


ffmpeg -y -ss 00:00:05 -t 00:00:05 -i http://tyberis.com/output.ts 5s.wav
ffprobe 5s.wav

Duration: 00:00:04.74

ffmpeg -y -i http://tyberis.com/output.ts -ss 00:00:05 -t 00:00:05 5s.wav
ffprobe 5s.wav

Duration: 00:00:04.74



Sometimes the starting point is not accurate but the duration is. This is clearly audible by cutting the ts file and cutting an uncompressed wav file, and listening to both.


ffmpeg -y -i http://tyberis.com/output.ts -ss 00:00:15 -t 00:00:05 5s.wav

ffmpeg -y -i http://tyberis.com/output.wav -ss 00:00:15 -t 00:00:05 5s-reference.wav



What fixes the starting time is if I use an m3u8 file that contains the byte offset for every keyframe AND I put the -ss option in front of the source file (if I put it after the source, the start time is inaccurate but the duration is accurate) :


ffmpeg -y -ss 00:00:15 -t 00:00:05 -i http://tyberis.com/output.m3u8 5s.wav



This fixes the start time but the duration is at the location that I would get had I used no m3u8 file (duration is just 4.47s).


It seems different timestamps are involved, and sometimes one or the other gets used.


The ts file was generated by capturing a UDP stream and storing it with ffmpeg and -codec:v copy.


Is ffmpeg broken, or the ts file ? How do I work around this issue or fix the ts file ? What I realize is that the video starts later than the audio, probably because the video does not start with a keyframe. Can I get ffmpeg to start the -codec:v copy after the first keyframe ? What I also notice is that using ffprobe reports "start : 1.400000". Can I force it to start at 0 ?


Any hints would be appreciated.


I tried both ffmpeg 4.3.1 and ffmpeg git-2020-07-24-21442a8.


-
ffmpeg : LIVE HLS Playback getting delayed over time
31 juillet 2020, par KrishnakumarWe are converting UDP Input to Live HLS output and pushing the chunks to a webdav server. Initial playback works fine, But the playback was delayed by almost an hour, when we checked after 15 hours. Not sure this is caused due to network as we use internet to push the chunks. Below is the ffmpeg command used.


ffmpeg -i udp://230.1.1.15:10000?fifo_size=10000000&overrun_nonfatal=1 -filter_complex [i:0xd49]yadif,setdar=256/144[v0];[i:0xd49]yadif,setdar=512/288[v1];[i:0xd49]yadif,setdar=640/360[v2];[i:0xd49]yadif,setdar=1280/720[v3] -f hls -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:0 libfdk_aac -b:a:0 48000 -ar:0 48000 -map [v0] -b:v:0 100000 -maxrate:v:0 100000 -minrate:v:0 100000 -bufsize:v:0 200000 -s:v:0 256x144 -r:0 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:0 libx264 -profile:v:0 baseline -level:v:0 3.0 -preset:v:0 fast -nal-hrd cbr -g 50 -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:1 libfdk_aac -b:a:1 48000 -ar:1 48000 -map [v1] -b:v:1 200000 -maxrate:v:1 200000 -minrate:v:1 200000 -bufsize:v:1 400000 -s:v:1 512x288 -r:1 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:1 libx264 -profile:v:1 baseline -level:v:1 3.0 -preset:v:1 fast -nal-hrd cbr -g 50 -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:2 libfdk_aac -b:a:2 64000 -ar:2 48000 -map [v2] -b:v:2 700000 -maxrate:v:2 700000 -minrate:v:2 700000 -bufsize:v:2 1400000 -s:v:2 640x360 -r:2 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:2 libx264 -profile:v:2 baseline -level:v:2 3.0 -preset:v:2 fast -nal-hrd cbr -g 50 -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:3 libfdk_aac -b:a:3 64000 -ar:3 48000 -map [v3] -b:v:3 1000000 -maxrate:v:3 1000000 -minrate:v:3 1000000 -bufsize:v:3 2000000 -s:v:3 1280x720 -r:3 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:3 libx264 -profile:v:3 high -level:v:3 4.0 -preset:v:3 fast -nal-hrd cbr -g 50 -var_stream_map a:0,v:0,name:148k a:1,v:1,name:248k a:2,v:2,name:764k a:3,v:3,name:1064k -master_pl_name master.m3u8 -hls_list_size 3 -hls_time 6 -hls_segment_filename https://usr:pass@example.com:8043/httppush/media_%v_%03d.ts -hls_flags delete_segments+independent_segments+discont_start https://usr:pass@example.com:8043/httppush/playlist_%v.m3u8



FFMPEG V4.3


ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
 configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs=-lpthread --extra-libs=-lm --bindir=/root/bin --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100



With Split Filter :


ffmpeg -i "udp://230.1.1.15:10000?fifo_size=10000000&overrun_nonfatal=1" -filter_complex "[i:0xd49]yadif[v];[v]split=4[1out1][1out2][1out3][1out4];[1out1]setdar=256/144[v0];[1out2]setdar=512/288[v1];[1out3]setdar=640/360[v2];[1out4]setdar=1280/720[v3];[i:0xd4a]aresample=async=1:min_hard_comp=0.100000:first_pts=0[a];[a]asplit=4[a0][a1][a2][a3]" -f hls -map [a0] -c:a:0 libfdk_aac -b:a:0 48000 -ar:0 48000 -map [v0] -b:v:0 100000 -maxrate:v:0 100000 -minrate:v:0 100000 -bufsize:v:0 200000 -s:v:0 256x144 -r:0 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:0 libx264 -profile:v:0 baseline -level:v:0 3.0 -preset:v:0 fast -nal-hrd cbr -g 50 -map [a1] -c:a:1 libfdk_aac -b:a:1 48000 -ar:1 48000 -map [v1] -b:v:1 200000 -maxrate:v:1 200000 -minrate:v:1 200000 -bufsize:v:1 400000 -s:v:1 512x288 -r:1 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:1 libx264 -profile:v:1 baseline -level:v:1 3.0 -preset:v:1 fast -nal-hrd cbr -g 50 -map [a2] -c:a:2 libfdk_aac -b:a:2 64000 -ar:2 48000 -map [v2] -b:v:2 700000 -maxrate:v:2 700000 -minrate:v:2 700000 -bufsize:v:2 1400000 -s:v:2 640x360 -r:2 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:2 libx264 -profile:v:2 baseline -level:v:2 3.0 -preset:v:2 fast -nal-hrd cbr -g 50 -map [a3] -c:a:3 libfdk_aac -b:a:3 64000 -ar:3 48000 -map [v3] -b:v:3 1000000 -maxrate:v:3 1000000 -minrate:v:3 1000000 -bufsize:v:3 2000000 -s:v:3 1280x720 -r:3 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:3 libx264 -profile:v:3 high -level:v:3 4.0 -preset:v:3 fast -nal-hrd cbr -g 50 -var_stream_map "a:0,v:0,name:148k a:1,v:1,name:248k a:2,v:2,name:764k a:3,v:3,name:1064k" -master_pl_name master.m3u8 -hls_list_size 3 -hls_time 6 -hls_segment_filename https://usr:pass@example.com:8043/httppush/media_%v_%03d.ts -hls_flags delete_segments+independent_segments+discont_start https://usr:pass@example.com:8043/httppush/playlist_%v.m3u8



-
Add watermark in video with Google Cloud function python
26 septembre 2020, par DharmeshsharmaI am adding watermark in uploaded video by http google cloud function but my code is return on ffmpeg non zero. my python code


import os
from google.cloud import storage
from subprocess import check_output
from videoprops import get_video_properties


def hello_world(request):

client = storage.Client()
bucket = client.get_bucket('bucket_name')
request_json = request.get_json()
req_data = request.get_json()
name = req_data['file']
videofile_name = req_data['file_name']
os.makedirs('/tmp/'+os.path.dirname(name), exist_ok=True)
file_name = '/tmp/' + name
output_file_name = '/tmp/' + name.split('.')[0] + '_.'+name.split('.')[1]
print(output_file_name)
logo_path = '/temp/watermark.png'
logo_name = 'watermark.png'
print('logo found')

print(file_name)

try:
 os.remove(file_name)
except OSError:
 pass

try:
 os.remove(logo_path)
except OSError:
 pass

print("File has been removed")

# Downloading the video to the cloud functions
blob = bucket.get_blob(name)
blob.download_to_filename(file_name)

blob_logo = bucket.get_blob(logo_name)
blob_logo.download_to_filename(logo_path)

print("Video Downloaded")

props = get_video_properties(file_name)

if os.path.exists(file_name):
 print("NEW MP4 EXISTS")
 # check_output('ffmpeg -itsoffset -4 -i '+file_name+' -vcodec mjpeg -vframes 1 -an -f rawvideo -s '+str(props['width'])+'x'+str(props['height'])+' '+thumbnail_file_name, shell=True)
 # thumbnail_blob = bucket.blob(os.path.dirname(name)+'/thumbnail.jpg')
 # thumbnail_blob.upload_from_filename(thumbnail_file_name)
 # 19-7-2020
 check_output('ffmpeg -i '+file_name+' -i '+logo_path +
 ' -filter_complex overlay=10:10 -codec:a copy -preset ultrafast -async 1 '+output_file_name, shell=True)
 thumbnail_blob = bucket.blob(
 os.path.dirname(name) + '/'+videofile_name)
 thumbnail_blob.upload_from_filename(output_file_name)
 # -------------------------------------
else:
 print("MP4 not created")

print("uploaded")



In this code accessing video add watermark also accessing from bucket and applying with ffmpeg and uploading.


error is :-


raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError : Command 'ffmpeg -i /tmp/Upload/Video/1060/ad69ec74-49db-4fdb-b118-d23b9468a7b8.mp4 -i /temp/watermark.png -filter_complex overlay=10:10 -codec:a copy -preset ultrafast -async 1 /tmp/Upload/Video/1060/ad69ec74-49db-4fdb-b118-d23b9468a7b8_.mp4' returned non-zero exit status 1.