Re: [FFmpeg-user] Slide show with vfr

2021-01-29 Thread Wolfgang Hugemann
Am 25.01.2021 um 23:45 schrieb Mark Filipak (ffmpeg):
> regarding PTS variations, I've often found that simply remuxing an
> existing stream via MKVToolNix has fixed the time stamps so that all
> players play videos correctly.

I tried that and can confirm that MKVToolNix does solve some issues with
variable frame rate.

At last, I ended up with Avidemux, which preserved vfr and provides some
rudimentary filters, comprising a pts burn-in filter.

Wolfgang Hugemann
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Slide show with vfr

2021-01-25 Thread Mark Filipak (ffmpeg)

On 01/25/2021 06:09 AM, Wolfgang Hugemann wrote:

Express duration in seconds
Repeat the last image as per
https://trac.ffmpeg.org/wiki/Slideshow#Concatdemuxer


Thanks for this hint. This really works and -vsync vfr seems to be
necessary for mp4. (For mkv it works without that.)

It works as well if you provide the durations in milliseconds, but there
seems to be a problem with short durations, which are not reproduced
exactly. So one should rather use durations larger than one second, as
in the cited example.

I now successfully produced a vfr mp4 with ffmpeg. Indeed, some
applications as VLC do not handle the timestamps correctly, but AVidemux
and ffplay do. Plus the vfr is preserved when the slide show is
processed with ffmpeg (using -vsync vfr).

Possibly, the relatively short durations in my original video are the
reason for the problems with the original video, as there seem to be
rounding errors.

Wolfgang Hugemann


I have not been following this thread as it doesn't interest me or apply to my use cases, however, 
regarding PTS variations, I've often found that simply remuxing an existing stream via MKVToolNix 
has fixed the time stamps so that all players play videos correctly. Bonus: The result is usually 
slightly smaller and MKVToolNix is very quick. I don't know what MKVToolNix is doing, but it's 
brilliant.


--
Someone's sneaking in and turning up the range so that my food burns.
I'm sure of it.
And the older I get, the more sure of it I become.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Slide show with vfr

2021-01-25 Thread Carl Eugen Hoyos
Am Mo., 25. Jan. 2021 um 12:10 Uhr schrieb Wolfgang Hugemann :

> I now successfully produced a vfr mp4 with ffmpeg.

The author of the relevant code - Baptiste - claims that such
files are not valid / do not conform to any specification.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Slide show with vfr

2021-01-25 Thread Wolfgang Hugemann
> Express duration in seconds
> Repeat the last image as per 
> https://trac.ffmpeg.org/wiki/Slideshow#Concatdemuxer

Thanks for this hint. This really works and -vsync vfr seems to be
necessary for mp4. (For mkv it works without that.)

It works as well if you provide the durations in milliseconds, but there
seems to be a problem with short durations, which are not reproduced
exactly. So one should rather use durations larger than one second, as
in the cited example.

I now successfully produced a vfr mp4 with ffmpeg. Indeed, some
applications as VLC do not handle the timestamps correctly, but AVidemux
and ffplay do. Plus the vfr is preserved when the slide show is
processed with ffmpeg (using -vsync vfr).

Possibly, the relatively short durations in my original video are the
reason for the problems with the original video, as there seem to be
rounding errors.

Wolfgang Hugemann
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Slide show with vfr

2021-01-24 Thread pdr0
Wolfgang Hugemann wrote
> I did one step backward and tried to construct a vfr video from the
> scratch using slides a an input:
> 
> ffmpeg -y -f concat -i input.txt colors.mkv
> 
> with input.txt as:
> 
> ffconcat version 1.0
> file 'red.png'
> duration 250ms
> file 'yellow.png'
> duration 500ms
> file 'green.png'
> duration 500ms
> file 'cyan.png'
> duration 250ms
> file 'blue.png'
> duration 500ms
> file 'black.png'
> duration 500ms
> 
> This resulted in cfr for mp4 an vfr for mkv or webm (according to
> MediaInfo, a Windows application). However, there seems to be something
> wrong with the result colors.mkv, as no player, including ffplay uses
> the specified durations.

Express duration in seconds

Repeat the last image as per 
https://trac.ffmpeg.org/wiki/Slideshow#Concatdemuxer

file 'red.png'
duration 0.25
file 'yellow.png'
duration 0.5
file 'green.png'
duration 0.5
file 'cyan.png'
duration 0.25
file 'blue.png'
duration 0.5
file 'black.png'
duration 0.5 
file 'black.png'





--
Sent from: http://ffmpeg-users.933282.n4.nabble.com/
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Slide show with vfr

2021-01-24 Thread Carl Eugen Hoyos
Am So., 24. Jan. 2021 um 18:23 Uhr schrieb Wolfgang Hugemann :
>
> I did one step backward and tried to construct a vfr video from the
> scratch using slides a an input:
>
> ffmpeg -y -f concat -i input.txt colors.mkv
>
> with input.txt as:
>
> ffconcat version 1.0
> file 'red.png'
> duration 250ms
> file 'yellow.png'
> duration 500ms
> file 'green.png'
> duration 500ms
> file 'cyan.png'
> duration 250ms
> file 'blue.png'
> duration 500ms
> file 'black.png'
> duration 500ms
>
> This resulted in cfr for mp4 an vfr for mkv or webm (according to
> MediaInfo, a Windows application). However, there seems to be something
> wrong with the result colors.mkv, as no player, including ffplay uses
> the specified durations.

I suspect that no player is able to deal with above frame durations.

Old RealMedia files can be good sources for vfr tests.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Slide show with vfr

2021-01-24 Thread Wolfgang Hugemann
I did one step backward and tried to construct a vfr video from the
scratch using slides a an input:

ffmpeg -y -f concat -i input.txt colors.mkv

with input.txt as:

ffconcat version 1.0
file 'red.png'
duration 250ms
file 'yellow.png'
duration 500ms
file 'green.png'
duration 500ms
file 'cyan.png'
duration 250ms
file 'blue.png'
duration 500ms
file 'black.png'
duration 500ms

This resulted in cfr for mp4 an vfr for mkv or webm (according to
MediaInfo, a Windows application). However, there seems to be something
wrong with the result colors.mkv, as no player, including ffplay uses
the specified durations.

This is the output:

ffmpeg version 2021-01-24-git-1775688292-full_build-www.gyan.dev
Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static
--disable-w32threads --disable-autodetect --enable-fontconfig
--enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt
--enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray
--enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi
--enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg
--enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype
--enable-libfribidi --enable-libvidstab --enable-libvmaf
--enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
--enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
--enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan
--enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug
--enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
--enable-libshine --enable-libtheora --enable-libtwolame
--enable-libvo-amrwbenc --enable-libilbc --enable-libgsm
--enable-libopencore-amrnb --enable-libopus --enable-libspeex
--enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite
--enable-libmysofa --enable-librubberband --enable-libsoxr
--enable-chromaprint
  libavutil  56. 63.101 / 56. 63.101
  libavcodec 58.117.101 / 58.117.101
  libavformat58. 65.101 / 58. 65.101
  libavdevice58. 11.103 / 58. 11.103
  libavfilter 7. 96.100 /  7. 96.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc55.  8.100 / 55.  8.100
Input #0, concat, from 'input.txt':
  Duration: 00:00:05.00, start: 0.00, bitrate: 0 kb/s
Stream #0:0: Video: png, pal8(pc), 800x600, 25 fps, 25 tbr, 25 tbn,
25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 02159ed90c00] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 02159ed90c00] profile High 4:4:4 Predictive, level 3.1,
4:4:4, 8-bit
[libx264 @ 02159ed90c00] 264 - core 161 r3033 0d754ec - H.264/MPEG-4
AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
aq=1:1.00
Output #0, matroska, to 'colors.mkv':
  Metadata:
encoder : Lavf58.65.101
Stream #0:0: Video: h264 (H264 / 0x34363248), yuv444p(tv,
progressive), 800x600, q=2-31, 25 fps, 1k tbn
Metadata:
  encoder : Lavc58.117.101 libx264
Side data:
  cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=1 fps=0.0 q=0.0 size=   1kB time=00:00:00.00 bitrate=N/A
speed=   0x
frame=   12 fps=0.0 q=-1.0 Lsize=   4kB time=00:00:03.76 bitrate=
9.2kbits/s speed=12.1x
video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 20.582470%
[libx264 @ 02159ed90c00] frame I:1 Avg QP: 4.00  size:   194
[libx264 @ 02159ed90c00] frame P:9 Avg QP: 4.89  size:86
[libx264 @ 02159ed90c00] frame B:2 Avg QP: 5.50  size:   960
[libx264 @ 02159ed90c00] consecutive B-frames: 66.7% 33.3%  0.0%  0.0%
[libx264 @ 02159ed90c00] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 02159ed90c00] mb P  I16..4: 22.2%  0.0%  0.0%  P16..4:
0.0%  0.0%  0.0%  0.0%  0.0%skip:77.8%
[libx264 @ 02159ed90c00] mb B  I16..4: 99.9%  0.1%  0.0%  B16..8:
0.0%  0.0%  0.0%  direct: 0.0%  skip: 0.0%
[libx264 @ 02159ed90c00] 8x8 transform intra:0.0% inter:100.0%
[libx264 @ 02159ed90c00] coded y,u,v intra: 0.0% 0.0% 0.0% inter:
0.0% 0.0% 0.0%
[libx264 @ 02159ed90c00] i16 v,h,dc,p: 97%  0%  3%  0%
[libx264 @ 02159ed90c00] i8