
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (47)
-
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 -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (7210)
-
ffmpeg to generate dash and HLS - best practise
8 septembre 2017, par LaborCLooking for the correct way to encode a given input video in multiple bitrates and then package it for dash and HLS. I thought this is a basic task, but for me it was quite a challenge. So the way I do it is as follows :
First I split my video (mp4) into video and audio (I encode the audio, because I need to make sure that the output codec is aac, which is a requirement for web I think).
ffmpeg -c:v copy -an video_na.mp4 -i source_input.mp4
ffmpeg -c:a aac -ac 2 -async 1 -vn audio.mp4 -i source_input.mp4Then I encode the video with the following commands :
ffmpeg.exe -i video_na.mp4 -an -c:v libx264 -crf 18 \
-preset fast -profile:v high -level 4.2 -b:v 2000k -minrate 2000k \
-maxrate 2000k -bufsize 4000k -g 96 -keyint_min 96 -sc_threshold 0 \
-filter:v "scale='trunc(oh*a/2)*2:576'" -movflags +faststart \
-pix_fmt yuv420p -threads 4 -f mp4 video-2000k.mp4
ffmpeg.exe -i video_na.mp4 -an -c:v libx264 -crf 18 \
-preset fast -profile:v high -level 4.2 -b:v 1500k -minrate 1500k \
-maxrate 1500k -bufsize 3000k -g 96 -keyint_min 96 -sc_threshold 0 \
-filter:v "scale='trunc(oh*a/2)*2:480'" -movflags +faststart \
-pix_fmt yuv420p -threads 4 -f mp4 video-1500k.mp4After that I fragment the videos (I used the parameter —timescale 10000 but then the result was out of sync).
Sidenote : the -g parameter is 4 times 24 (frames). this is important because the fragmentation is 4000 (4 seconds)mp4fragment --fragment-duration 4000 video-2000k.mp4 \
video-2000k-f.mp4
mp4fragment --fragment-duration 4000 video-1500k.mp4 \
video-1500k-f.mp4And finally package everything together again for dash (I used to use —use-segment-timeline but then again the result was out-of-sync).
I use mp4dash and not mp4box because I want to be able to encrypt everything later on for DRM.mp4dash --media-prefix=out \
video-2000k-f.mp4 \
video-1500k-f.mp4 \
--out dashThe result works in Firefox, Chrome, IE Edge via a webserver and via Cloudfront AWS Streaming also on older browsers.
So for me there are still 2 tasks to accomplish.
First I need to generate a HLS package for Apple Phone, IPad Users.
And second : I need to encrypt everything.So far my HLS command is :
ffmpeg -y -loglevel info ^
-i video-2000k.mp4 \
-i video-1500k.mp4 \
-i audio.mp4 \
-profile:v baseline -start_number 0 -hls_time 10 \
-flags -global_header -hls_list_size 0 -f hls hls/master.m3u8This basically works, but generates only 1 bandwith without the posibility of multi-streams.
I am not certain about that statement, but it looks that way.
Has anyone an idea on what I am doing wrong ? -
movenc : Add support for writing sidx atoms for DASH segments
5 octobre 2014, par Martin Storsjömovenc : Add support for writing sidx atoms for DASH segments
A flag "dash" is added, which enables the necessary flags for
creating DASH compatible fragments.When this is enabled, one sidx atom is written for each track
before every moof atom.Signed-off-by : Martin Storsjö <martin@martin.st>
-
Why DASH video fragments are not reproducible nor readable with ffmpeg ?
21 mai 2020, par salgarjiI'm streaming live video using DASH through FFmpeg. Everything's OK, fragments are generated, and the mpd file, but I wanted to have reproducible independent fragments. Video players won't open those fragments. I guess it's because they are mpd file dependant. My question would be : can those fragments be generated in a way that they are reproducible ? I don't know if it has something to do to the frames I P B or just the way dash cuts video information, in a way that it only saves 'timeline' on the mpd...



My purpose is not only being able to reproduce them sepparately, but I need to insert information in a metadata tag of the video, and ffmpeg won't let me read those live streaming generated fragments.



FFmpeg input information command will behave like this :



input :



ffmpeg -i /path/video0-0-1.mp4




output :



ffmpeg version N-97777-g3b5a36c56d Copyright (c) 2000-2020 the FFmpeg developers
 built with Apple clang version 11.0.3 (clang-1103.0.32.59)
 configuration: --enable-gpl --enable-libx264
 libavutil 56. 45.100 / 56. 45.100
 libavcodec 58. 84.100 / 58. 84.100
 libavformat 58. 43.100 / 58. 43.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 81.100 / 7. 81.100
 libswscale 5. 6.101 / 5. 6.101
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] could not find corresponding track id 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] could not find corresponding trex (id 1)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] could not find corresponding track id 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] trun track id unknown, no tfhd was found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] error reading header
/path/video0-0-1.mp4: Invalid data found when processing input




I execute this FFmpeg code using fluent-ffmpeg over JS to generate the fragments :



var ffmpeg = require('fluent-ffmpeg');

var grabacion = new ffmpeg();

grabacion.addInput('0')
.inputOptions(['-y -nostdin', '-f avfoundation', '-video_size 1280x720', '-pix_fmt nv12', '-framerate 30'])
.outputOptions(['-vcodec libx264', '-keyint_min 0', '-g 100', '-map 0:v', '-b:v 1000k', '-f dash',
 '-use_template 1', '-use_timeline 0', '-init_seg_name video0-$RepresentationID$-$Number$.mp4',
 '-media_seg_name video0-$RepresentationID$-$Number$.mp4', '-remove_at_exit 0', '-window_size 20', '-seg_duration 4'])
.output('/path/path/path/video.mpd')
.run();




So, the final purpose would be to be able to insert a tag like this :



ffmpeg -i video0-0-0.mp4 -movflags use_metadata_tags -metadata sample_tag=whateveryouwanttoadd video0-0-0-tagged.mp4




Is there any way to do it ? Thank you in advance !