
Recherche avancée
Autres articles (62)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (7054)
-
How to replace a snippet in a video without reencoding the whole video
3 novembre 2022, par Simon StreicherI am trying to edit and replace a section of a video without reencoding the whole video.
Here are the steps I think I need to take :


1. Find keyframes


input :


ffprobe -v error -select_streams v:0 -skip_frame nokey -show_entries frame=pkt_pts_time -of csv=p=0 'example.mkv'



output :


0.000000
1.001000
11.011000
13.430000
20.812000
30.822000
40.832000
50.842000
⋮



2. Export relevant section


For example, export the snippet
40.832000 → 50.842000
.

3. Edit and reencode


After editing that section, I need to reencode it to the original codecs for compatibility with the surrounding video. For example, this is the original codecs :


Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1600 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)



4. Inject edit back into the video stream


Finally, I need to use FFmpeg somehow to retain everything from the original file (audio, subtitles, chapters, etc.) and to construct a new video stream (for example,
Stream #0:0
) that is exactly0 → 40.832000
of the original, the whole edited section, and50.842000 → end
of the original section.

My main questions are :


- 

- A. How do I trim the video stream in 2. without reencoding ?
- B. Assuming that the edited video's resolution will remain the same, what is the command for FFmpeg to encode my edit to the codecs in 3. (and would the video be concatenable with the original video) ?
- C. How should I go about glueing the sections together ? Should I simply trim
Stream #0:0
into sectionsv1 = 0 → 40.832
andv2 = 50.842 → end
and then concatenate a new stream asnew = v1 + edited + v2
? - D. How do I replace
Stream #0:0
withnew
?










And probably the most important question : are my assumptions correct and can this be achieved ?


-
How to read a video stream(H.264) bitrate via ffprobe if the video is VBR
26 janvier 2021, par Sean- 

- if the video stream is VBR, which means the bitrate is variable, so how to read the bitrate via ffprobe ?
- How to get know the video stream is CBR or VBR ?






-
FFMPEG scaling video disable viewing it in HTML player while process is not ended, for video transcoding on the fly
6 juillet 2022, par Lucas FGood day all,


I'm working on a video player with 1080p original video files, and I would like to change their resolution on the fly :


Actually I host all my original video files under a web mp4 1080p format, and I would like to be able to offer 720p, 480p, etc ... qualities.


So I started to look for tutorials about video transcoding on the fly and I found the FFMPEG tool.


I'm actually using the following command to scale videos - to 720p for e.g. :


ffmpeg -i input.mp4 -vf scale=-1:720 output.mp4



The problem is, once FFMPEG starts scaling it, I have to wait the end of the process before being able to play the video. Do you know if there is any parameter for this command to allow playing the video while it's under scaling ?


Or any workaround that can help me doing this ?


Thank you in advance for your help !


EDIT - To allow fragmented video metas


Now I found how to access readable content while transcoding (by transcoding to fragmented MP4) :


ffmpeg -i input.mp4 -vf scale=-2:720 -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov output.mp4



But my problem is when opening the video it comes as an "ended" video of the current transcoded data.


So if video lasts 1min and is half transcoded, I'll see only 30s, it will not load more data, once the rest is transcoded.


EDIT - To play entire video while transcoding


I found the following solution that creates a streaming flow througout RTMP protocol :


ffmpeg -i input.mp4 -vf scale=-2:720 -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov output.mp4 -listen 1 -f flv rtmp://127.0.0.1:10000/test-stream



My only problem, is that it's not supported into the HTML5 video player, so I tried to convert the RTMP stream to HTTP with the following command :


ffmpeg -v verbose -i rtmp://127.0.0.1:10000/test-stream -c:v libx264 -c:a aac -ac 1 -strict -2 -crf 18 -profile:v baseline -maxrate 400k -bufsize 1835k -pix_fmt yuv420p -flags -global_header -hls_time 10 -hls_list_size 6 -start_number 1 C:\www\test-stream.m3u8



But this is only supported on Apple devices, any idea about how to read this .m3u8 on all other devices ?