
Recherche avancée
Autres articles (72)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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 (12776)
-
ffmpeg hwo to choose the best bit rate for HLS streaming ?
7 février 2023, par Josef KranzI'm building a video streaming white label product, but I've run into the following scenario where I'm not sure what might be the optimal way to get the best video quality in return. At the moment I'm using crf based encoding, which is from a streaming based point of view a very bad idea. From a quality point of view, it will definitely give me the best quality and also the best efficiency. Why is crf based encoding bad for streaming ? First you have a non-fixed file size, meaning your bit rate might vary between 20 kbps and 20 Mbit/s depending on the codec and picture motion of the current frames ...
When you have such heavily varying stream according to the bit rate, automatic quality selection at the player might not function correctly, and the player automatically switches from 1080p to 480p for no reason (using VideoJS here).


To fix this issue, it's fine if I set minrate, maxrate with ffmpeg but this will also come at the cost that some frames might look pixelated, which I absolutely do not want.


Currently, my encoding command looks something like this :


/usr/bin/ffmpeg -i "/tmp/VODProcessing/Tester 2160p UHD-HDR.mp4" -map 0:0 -c:v libsvtav1 -crf 19 -vf zscale=width=3840:height=2160 -svtav1-params "profile=0:enable-force-key-frames=1:superres-mode=1:enable-tf=0:tune=0:enable-overlays=1:scd=1:scm=2:enable-mfmv=1:enable-cdef=1:enable-dlf=1:fast-decode=1:color-primaries=9:transfer-characteristics=16:matrix-coefficients=9:input-depth=10:mastering-display=G(0.265,0.69)B(0.15,0.06)R(0.68,0.32)WP(0.3127,0.329)L(4000.0,0.005):content-light=368,226:enable-hdr=1:color-range=1" -pix_fmt yuv420p10le -color_trc smpte2084 -color_primaries bt2020 -colorspace bt2020nc -chroma_sample_location:v topleft -color_range:v pc -max_muxing_queue_size 1024 -preset 7 -bf 0 -force_key_frames "expr:gte(t,n_forced*4.004)" -keyint_min 48 -sc_threshold 0 -use_timeline 1 -use_template 1 -map_metadata -1 -map_chapters -1 -f hls -seg_duration 4.004 -hls_time 4.004 -streaming 1 -hls_list_size 0 -hls_segment_filename "/tmp/VODProcessing/output/Tester 2160p UHD-HDR/v-av01-2160p-av01.0.12M.10_PQ/f-%04d.m4s" -hls_fmp4_init_filename "init-v-av01-2160p-av01.0.12M.10_PQ.m4s" -hls_segment_type fmp4 -hls_playlist_type vod -movflags frag_keyframe+frag_every_frame+write_colr+prefer_icc+skip_trailer+faststart -hls_flags independent_segments -strict experimental "/tmp/VODProcessing/output/Tester 2160p UHD-HDR/v-av01-2160p-av01.0.12M.10_PQ/master.m3u8"



Which will form a stream made out of independent m4s segments. As you can see, I'm using libsvtav1 in crf mode to output the result in AV1.


Now my question is, how can I have the same nice quality output as with the crf mode while having a static/fixed bit rate ? Will 2 pass encoding solve this problem by distributing the pixels or data rate differently ?


Thanks in advance


-
How to transcode 4K HDR using libx265 or libsvtav1 with ffmpeg ?
28 octobre 2022, par Asav MaliIm currently trying to transcode a mp4 file containing a HEVC 10 Bit HDR stream with proper grading information to HLS (fragmented mp4 aka fmp4) in two different codecs, HEVC and AV1. The problem is that the x265 encoder pops the following message while transcoding starts :


Output #0, hls, to '/tmp/output/testclip/v-hevc-2160p-hvc1.2.4.L150.B0/master.m3u8':
 Metadata:
 encoder : Lavf59.27.100
 Stream #0:0: Video: hevc (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x1600 [SAR 1:1 DAR 12:5], q=2-31, 7864 kb/s, 23.98 fps, 24k tbn (default)
 Metadata:
 encoder : Lavc59.37.100 libx265
 Side data:
 cpb: bitrate max/min/avg: 8257000/0/0 buffer size: 31457000 vbv_delay: N/A
 Mastering Display Metadata, has_primaries:1 has_luminance:1 r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=4000.000000
 Content Light Level Metadata, MaxCLL=368, MaxFALL=226
x265 [warning]: unable to parse mastering display color volume infoed= 0x 
x265 [warning]: unable to parse mastering display color volume infoeed=0.758x 
x265 [warning]: unable to parse mastering display color volume infoeed=1.06x 



Why is the message "unable to parse mastering display color volume info" coming up if I explicitly define the grading info using the following command ? :


/usr/bin/ffmpeg -i "/tmp/testclip.m4v" -map 0:0 -c:v libx265 -b:v 7864320 -maxrate:v 8257536 -bufsize 31457280 -vf zscale=width=3840:height=1600 -x265-params colorprim=bt2020:transfer=smpte-2084:colormatrix=bt2020nc:master-display="G(13250.0,34500.0)B(7500.0,3000.0)R(34000.0,16000.0)WP(15635.0,16450.0)L(40000000.0,50.0):max-cll="368.0,226.0"" -pix_fmt yuv420p10le -profile:v main10 -bf 0 -crf 16 -preset fast -keyint_min 48 -g 48 -sc_threshold 0 -use_timeline 1 -use_template 1 -seg_duration 6 -tune fastdecode -vtag hvc1 -map_metadata -1 -map_chapters -1 -f hls -hls_time 6 -streaming 1 -hls_list_size 0 -hls_segment_filename "/tmp/output/testclip/v-hevc-2160p-hvc1.2.4.L150.B0/f-%04d.m4s" -hls_fmp4_init_filename "init-v-hevc-2160p-hvc1.2.4.L150.B0.m4s" -hls_segment_type fmp4 -movflags frag_every_frame+delay_moov+skip_trailer+faststart -hls_flags independent_segments "/tmp/output/testclip/v-hevc-2160p-hvc1.2.4.L150.B0/master.m3u8"



No matter if I define the "master-display" or not, the image stays the same according to the colors, If I don't define "master-display" I dont get the annoying message form the x265 encoder for some reason. Can somebody give an answer how the x265 encoder works with ffmpeg and HDR ?


Besides the HEVC stream, I also create a AV1 stream using libsvtav1. Here I'm using a quite similar command, but the image looks differently compared against the HEVC version, much colder, why that ? I define the grading information explicitly for the libsvtav1 encoder the same way as I do it for x265 using mastering-display...? :


/usr/bin/ffmpeg -i "/tmp/testclip.m4v" -map 0:0 -c:v libsvtav1 -b:v 6291456 -maxrate:v 6606028 -bufsize 25165824 -vf zscale=width=3840:height=1600 -svtav1-params input-depth=10:fast-decode=1:color-primaries=9:transfer-characteristics=16:matrix-coefficients=9:mastering-display="G(0.265,0.69)B(0.15,0.06)R(0.68,0.32)WP(0.3127,0.329)L(4000.0,0.005):content-light="368.0,226.0"":enable-hdr=1 -pix_fmt yuv420p10le -max_muxing_queue_size 1024 -profile:v main -preset 7 -crf 20 -keyint_min 48 -g 48 -use_timeline 1 -use_template 1 -seg_duration 6 -strict experimental -map_metadata -1 -map_chapters -1 -f hls -hls_time 6 -streaming 1 -hls_list_size 0 -hls_segment_filename "/tmp/output/testclip/v-av01-2160p-av01.0.12H.10/f-%04d.m4s" -hls_fmp4_init_filename "init-v-av01-2160p-av01.0.12H.10.m4s" -hls_segment_type fmp4 -movflags frag_every_frame+delay_moov+skip_trailer+faststart -hls_flags independent_segments "/tmp/output/testclip/v-av01-2160p-av01.0.12H.10/master.m3u8"



I would expect that grading information will get placed properly with both encoders.


Thanks in advance.


-
FFMPEG segment creates black frame in the beginning - and key_frame looks offset [closed]
30 septembre 2022, par jackyrooI'm trying to split a video using ffmpeg segment :


ffmpeg -r 60 -accurate_seek -I input.mov -map 0:a? -map 0:v? -codec copy -reset_timestamps 1 -map_metadata 0 -avoid_negative_ts 1 -f segment output_%%03d.mov -y -loglevel debug


The problem with this approach is that the first split segment has 2 black frames at the beginning, while the consecutive ones are fine.


I cannot figure out why, and I'm genuinely lost in this process.


I've also tried specifying -force_key_frames but it makes no difference at all.


Then I found something interesting by comparing keyframes of the original video and the first split chunk using this command :


ffprobe -select_streams v -skip_frame nokey -show_frames -v quiet input.mov


Original Video KeyFrames
The first keyframe of the original video looks fine :


[FRAME]
media_type=video
stream_index=0
key_frame=1
pts=0
pts_time=0.000000
pkt_dts=127488
pkt_dts_time=8.300000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=256
pkt_duration_time=0.016667
duration=256
duration_time=0.016667
pkt_pos=40
pkt_size=128838
width=1420
height=2000
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[SIDE_DATA]
side_data_type=H.26[45] User Data Unregistered SEI message
[/SIDE_DATA]
[/FRAME]



Split Video - First Chunk Keyframes


On the other hand, it seems like the first keyframe of the chunk (the one with the two added black frames in the beginning) gets shifted !


[FRAME]
media_type=video
stream_index=1
key_frame=1
pts=507
pts_time=0.033008
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=507
best_effort_timestamp_time=0.033008
pkt_duration=256
pkt_duration_time=0.016667
duration=256
duration_time=0.016667
pkt_pos=40
pkt_size=128838
width=1420
height=2000
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[SIDE_DATA]
side_data_type=H.26[45] User Data Unregistered SEI message
[/SIDE_DATA]
[/FRAME]



Might this be the cause of the two black frames at the beginning ?


The following is the first (and only) keyframe of the second chunk, and it looks fine :


[FRAME]
media_type=video
stream_index=1
key_frame=1
pts=0
pts_time=0.000000
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=256
pkt_duration_time=0.016667
duration=256
duration_time=0.016667
pkt_pos=40
pkt_size=158598
width=1420
height=2000
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]



Please help me spreading some light over this...


Thanks !