
Recherche avancée
Médias (1)
-
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 (89)
-
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 ) (...) -
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
Sur d’autres sites (8966)
-
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 ignores seg_duration with svt-av1
25 décembre 2022, par Asav MaliI'm trying to convert a mp4 file containing a HEVC HDR10 stream to AV1 using SVT-AV1 with ffmpeg. For some reason the seg_duration parameter gets ignored :




/usr/bin/ffmpeg -i "/tmp/VODProcessing/testclip.mp4" -map 0:0 -c:v
libsvtav1 -b:v 1048576 -maxrate:v 1101004 -bufsize 4194304 -vf
zscale=width=640:height=480 -svtav1-params
"tile-columns=0:tile-rows=0:scd=0:color-primaries=9:transfer-characteristics=16:matrix-coefficients=9:input-depth=10:fast-decode=1: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*2)" -keyint_min 48 -use_timeline 1 -use_template
1 -map_metadata -1 -map_chapters -1 -f hls -seg_duration 4 -hls_time 4
-streaming 1 -hls_list_size 0 -hls_segment_filename "/tmp/VODProcessing/output/testclip/v-av01-480p-av01.0.12M.10_PQ/f-%04d.m4s"
-hls_fmp4_init_filename "init-v-av01-480p-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/testclip/v-av01-480p-av01.0.12M.10_PQ/master.m3u8"




Using a similar command and transcoding HEVC to HEVC works as expected and the segment duration is fine. Does this make any sense ? Checking the generated master.m3u8 file always gives me this for AV1 :


#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:7
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="init-v-av01-480p-av01.0.12M.10_PQ.m4s"
#EXTINF:6.715042,
f-0000.m4s
#EXTINF:6.715042,
f-0001.m4s
#EXTINF:6.715042,
f-0002.m4s
#EXTINF:6.715042,
f-0003.m4s
#EXTINF:6.715042,
f-0004.m4s
#EXTINF:6.715042,
f-0005.m4s
#EXTINF:6.715042,
f-0006.m4s
#EXTINF:6.715042,
f-0007.m4s
#EXTINF:6.715042,
f-0008.m4s
#EXTINF:6.715042,
f-0009.m4s
#EXTINF:6.715042,
f-0010.m4s
#EXTINF:6.715042,
f-0011.m4s
#EXTINF:6.715042,
f-0012.m4s
#EXTINF:6.715042,
f-0013.m4s
#EXTINF:6.715042,
f-0014.m4s
#EXTINF:6.715042,
f-0015.m4s
#EXTINF:0.583917,
f-0016.m4s
#EXT-X-ENDLIST



As you can see, the segments are not 4 seconds long as defined in my command, they are 6.715042 seconds long, why that ???


Thanks in advance