[FFmpeg-user] It is not possible to complete 2 passes/dash
Варзанов Дмитрий
cool.zuldek at gmail.com
Fri Sep 6 17:03:36 EEST 2024
-dash_segment_type auto \
-use_template 1 -use_timeline 1 -seg_duration 10 \
-adaptation_sets "id=0, streams=v id=0, streams=a" \
Maybe I'm asking something stupid...
The segment length is 10 seconds, what if I make the duration of 1 segment 3 seconds, and the following 10 seconds.
Will the response speed be higher?
When the user opens the page with the player, will the player start playing faster?
Is it possible to specify that the first segment is 3 seconds, the following ones are 10 seconds?
________________________________
От: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> от имени Ferdi Scholten <ferdi at sttc-nlp.nl>
Отправлено: 6 сентября 2024 г. 06:45
Кому: ffmpeg-user at ffmpeg.org <ffmpeg-user at ffmpeg.org>
Тема: Re: [FFmpeg-user] It is not possible to complete 2 passes/dash
> ffmpeg -i {file} -cpu-used 8 -movflags +faststart -map_metadata -1
> -c:v libaom-av1 -pix_fmt yuv420p
> -an
> -map 0:v:0 -filter:v:0 {crop},scale=-2:144,fps={min(30, fps)},setdar=16/9
> -map 0:v:0 -filter:v:1 {crop},scale=-2:240,fps={min(30, fps)},setdar=16/9
> -pass 1 -f null /dev/null &&
> ffmpeg -i {file} -cpu-used 8 -movflags +faststart -map_metadata -1
> -c:v libaom-av1 -pix_fmt yuv420p
> -c:a libopus -b:a 128k
> -map 0:a:0
> -map 0:v:0 -filter:v:0 {crop},scale=-2:144,fps={min(30, fps)},setdar=16/9
> -map 0:v:0 -filter:v:1 {crop},scale=-2:240,fps={min(30, fps)},setdar=16/9
> -init_seg_name "init-$RepresentationID$.$ext$"
> -media_seg_name "chunk-$RepresentationID$-$Number%05d$.$ext$"
> -dash_segment_type auto
> -use_template 1 -use_timeline 1 -seg_duration 10
> -adaptation_sets "id=0, streams=v id=0, streams=a"
> -pass 2 -f dash /mkv_f/manifest.mpd
> """"""
> I don't understand what's going on. Can't do 2 passes...
> If there's one video stream, everything works. But if there are two or more video streams, it gives an error
> """"""
> Error opening file ffmpeg2pass-2.log. [vost#0:2/libaom-av1 @ 0x5596009d8780] Error reading log file 'ffmpeg2pass-2.log' for pass-2 encoding Error opening output file /mkv_f/manifest.mpd. Error opening output files: Input/output error
> """"""
> Experimented with -passlogfile, started to each video stream. Nothing works
> _______________________________________________
>
As far as I know multiple pass encoding only works with one video stream
at a time.
For every stream you want to encode you need to do seperate multiple
passes and after separately encoding them, you can mux them together as
desired.
On suitable hardware you can do these multi pass encodes in parallel
(multiple encodes at once in separate processes)
So if you have a processor with enough cores You can start two separate
instances of ffmpeg for encoding each stream. As libaom does not scale
very well over multiple cores (on my 8 core system it rarely uses more
than 4 cores at once) you can assign each proces the desired number of
cores (threads) for encoding.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list