
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (112)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (12122)
-
How to use argument with dash in name in ffmpeg-python ?
8 mai 2023, par orderlyfashionFollowing is a simple ffmpeg command line for encoding an input video into a AV1 output with CRF 30 :


ffmpeg -i input.mkv -c:v libsvtav1 -crf 30 output.mkv



Converting that command line into the syntax of ffmpeg-python is pretty straight-forward :


(
 ffmpeg
 .input('input.mkv')
 .output('output.mkv', vcodec='libsvtav1', crf=30)
 .run()
)



However, what happens if we want to specify the fast-decode option ? In ffmpeg that would mean extending our command line to include
-svtav1-params fast-decode=1
, i.e. :

ffmpeg -i input.mkv -c:v libsvtav1 -crf 30 -svtav1-params fast-decode=1 output.mkv



How do we specify the same thing in ffmpeg-python ? Adding
svtav1-params='fast-decode=1'
into the output arguments results in invalid Python code since variables are not allowed to have dash in the name :

(
 ffmpeg
 .input('input.mkv')
 .output('output.mkv', vcodec='libsvtav1', crf=30, svtav1-params='fast-decode=1')
 .run()
)
# Error: Expected parameter name



Replacing the dash with an underscore in the name makes ffmpeg-python read it literally which doesn't translate into a valid ffmpeg command line.


How is it possible to specify fast-decode and other
svtav1-params
specific arguments in ffmpeg-python ?

-
How to make a MPEG-DASH MPD which starts the playback in the middle of the first segment ?
18 septembre 2018, par ravin.wangHere are the reproduce steps :
-
Normalize an H.264 video stream
ffmpeg -i 2.h264 -c:v libx264 -intra -r 25 -vf scale=640x360,setdar=16:9 2@25fps@intra@640x360.h264
(*) After that, I got an H.264 stream where all pictures are H.264 IDR frames, and fps is 25, resolution is 640x360, aspect-ratio is 16:9.
-
Generate an MP4 file
MP4Box -add 2@25fps@intra@640x360.h264:timescale=1000 -fps 25 2@25fps@intra@640x360.mp4
-
Make dash MP4 fragmented content, including init mp4, .m4s files and one .mpd file
MP4Box -dash 5000 -frag 5000 -dash-scale 1000 -frag-rap -segment-name ’seg_second$Number$’ -segment-timeline -profile live 2@25fps@intra@640x360.mp4
- Copy and publish all these files to a folder under one HTTPD server
-
I want to play from 4s of the first segment, and don’t display any frames before 4s, so I changed the .MPD file to modify the fields "SegmentTemplate@presentationTimeOffset", "SegmentTimeline:S@d/t", like as :
<?xml version="1.0"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H0M26.000S" maxsegmentduration="PT0H0M5.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011">
<period duration="PT0H0M26.000S">
<adaptationset segmentalignment="true" maxwidth="640" maxheight="360" maxframerate="25" par="16:9" lang="und">
<segmenttemplate presentationtimeoffset="4000" media="seg_second$Number$.m4s" timescale="1000" startnumber="1" initialization="seg_secondinit.mp4">
<segmenttimeline>
<s d="1000" t="4000"></s>
<s d="5000" r="4"></s>
</segmenttimeline>
</segmenttemplate>
<representation mimetype="video/mp4" codecs="avc3.64101E" width="640" height="360" framerate="25" sar="1:1" startwithsap="1" bandwidth="2261831">
</representation>
</adaptationset>
</period>
</mpd> -
Play the MPD url from VLC player, or Edge browser, it always starts the the first frame of the first segment, the frames between 0s 4s are also displayed unexpectedly.
What’s wrong with my steps ? Or any other options for it ?
-
-
ffmpeg dash Segment offset
18 mars 2019, par inkubuxI’m trying to integrate live-transcoding like "plex" or "emby" with my application.
I am able to serve dash content over to shaka-player or dash.js but only in ’live-mode’. But I want to enable seeking through the player.
I looked at plex and to enable this they create their own mpd file with duration so the player will have a full seekbar.
However when seeking the player will ask for a segment number eg : 449. I need to stop ffmpeg and restart with an offset
(-ss <<segment>>)</segment>
, but ffmpeg will just restart a transcode session from segment 0 with an initial segment.What I want is to tell ffmpeg to start at a seekpoint but only output from segment number and now-on.
When playing with hls and mpegts, I can tell ffmpeg to output at a certain segment : with the option
-segment_start_number
but this is not available for dash. And plex use their own transcoder based of ffmpeg with the option-skip_to_segment
I tried to ’hack’ around by keeping a manual offset on my web-server, even if I serve the "supposed" right segment after the seek point dash.js and shaka-player can’t recover the stream.. VLC on the other habd is able to (probably more tolerent) to errors in segments.
Is the supposed right segment after a seek in dash (contains the initial segment) or only the segment.
Is ffmpeg able to start segmenting dash as a supposed segment (for seek and resume)
The same technique works in hls with forced key frames and a custom m3u8 (with all the "predicted" segments) but calculating the right segment length and the right bandwidth is much harder and hackish and dash is more tolerant to variation.
I would really like to be able to seek through my live transcoding video.
For reference here is a custom mpd file I serve to enable "seeking" :
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" suggestedpresentationdelay="PT1S" mediapresentationduration="PT49M2.920S" maxsegmentduration="PT2S" minbuffertime="PT10S">
<period start="PT0S" duration="PT49M2.920S">
<adaptationset segmentalignment="true">
<segmenttemplate timescale="1" duration="1" initialization="$RepresentationID$/initial.mp4" media="$RepresentationID$/$Number$.m4s" startnumber="1">
</segmenttemplate>
<representation mimetype="video/mp4" codecs="avc1.640029" bandwidth="3766000" width="1920" height="1080">
</representation>
</adaptationset>
<adaptationset segmentalignment="true">
<segmenttemplate timescale="1" duration="1" initialization="$RepresentationID$/initial.mp4" media="$RepresentationID$/$Number$.m4s" startnumber="1">
</segmenttemplate>
<representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="188000" audiosamplingrate="48000">
<audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="6"></audiochannelconfiguration>
</representation>
</adaptationset>
</period>
</mpd>And here is the ffmpeg command to pull it off :
ffmpeg -ss 0 -i movie.mkv -y -acodec aac -vcodec libx264 -f dash -min_seg_duration 1000000 -individual_header_trailer 0 -pix_fmt yuv420p -vf scale=trunc(min(max(iw\,ih*dar)\,1920)/2)*2:trunc(ow/dar/2)*2 -bsf:v h264_mp4toannexb -profile:v high -level 4.1 -map_chapters -1 -map_metadata -1 -preset veryfast -movflags frag_keyframe+empty_moov -use_template 1 -use_timeline 0 -remove_at_exit 1 -crf 23 -bufsize 7532k -maxrate 3766k -start_at_zero -threads 0 -force_key_frames expr:if(isnan(prev_forced_t),eq(t,t),gte(t,prev_forced_t+1)) -init_seg_name $RepresentationID$/0_initial.mp4 -media_seg_name $RepresentationID$/0_$Number$.m4s /transcoding_temp/Z1GVWEc/index.mpd
The
media_seg_name
is where I prepend the custom seek_point let’s say I want to seek to segment 1233 the template would be :-media_seg_name $RepresentationID$/1233_$Number$.m4s
and the segments would be 1233_1 1233_2 1233_* So I can serve the right segment after seek. but the player does not recover and still downloading subsequent segments. I guess since a new initial segment is generated and I somehow miss headers for continuous playback after seek but I’m probably wrong.
Thanks for your help