• Create avi from PNGs

    From Alexandru@21:1/5 to All on Thu Aug 11 04:07:04 2022
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad. I have the feeling that somehow there is some blure when interpolating between frames. Does anybody know a better way? Or are there other tricks in ffmpeg to improve the quality?

    Thanks
    Alexandru

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 04:33:15 2022
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.
    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee: https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    Did that, invested a lot of time in twiking.
    The question is Tcl related, maybe there is another Tcl solution that can create AVI from PNG.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Thu Aug 11 13:30:28 2022
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.

    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg
    forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee: https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Thu Aug 11 15:14:09 2022
    Am 11.08.2022 um 14:56 schrieb Christian Gollwitzer:
    Am 11.08.22 um 13:33 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um
    14:30:33 UTC+3:
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i
    $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.
    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg >>> forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee:
    https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    Did that, invested a lot of time in twiking.

    OK. The line you put there does not look like this. There are no options
    for the codec and no quality settings.

    The question is Tcl related, maybe there is another Tcl solution that
    can create AVI from PNG.

    Unlikely. FFMpeg is the one big solution powering all of the major open source video coding / playing software like VLC or video editors. That's
    why I suggested to find the right settings.

    1) are you sure you want .avi? Usually it is -mp4 these days. But that doesn't imply quality

    2) Do you have still images with a slow framerate (slideshow) or more a movie? What is your size / quality tradeoff? E.g. you could use a MPNG
    or MJPEG codec to get very good quality for the indiviudal images, but
    it will then be as large as the set of PNG or JPG files combined.

    I usually encode to H.264 as this is universally supported now, even on phones. "-c:v libx264 -pix_fmt yuv420p" (the pix_fmt is necessary for
    Apple hardware)

        Christian

    Just as a side not: if it is to show a slide show on a web browser, one
    may also stream the images one after the other (PNG, GIF, JPEG). The
    browser will show it like a film.
    I used this option in the past with a camera live image directly from
    the sensor.

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Thu Aug 11 14:56:18 2022
    Am 11.08.22 um 13:33 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.
    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg
    forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee:
    https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    Did that, invested a lot of time in twiking.

    OK. The line you put there does not look like this. There are no options
    for the codec and no quality settings.

    The question is Tcl related, maybe there is another Tcl solution that can create AVI from PNG.

    Unlikely. FFMpeg is the one big solution powering all of the major open
    source video coding / playing software like VLC or video editors. That's
    why I suggested to find the right settings.

    1) are you sure you want .avi? Usually it is -mp4 these days. But that
    doesn't imply quality

    2) Do you have still images with a slow framerate (slideshow) or more a
    movie? What is your size / quality tradeoff? E.g. you could use a MPNG
    or MJPEG codec to get very good quality for the indiviudal images, but
    it will then be as large as the set of PNG or JPG files combined.

    I usually encode to H.264 as this is universally supported now, even on
    phones. "-c:v libx264 -pix_fmt yuv420p" (the pix_fmt is necessary for
    Apple hardware)

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 06:14:56 2022
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 15:56:24 UTC+3:
    Am 11.08.22 um 13:33 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.
    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg >> forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee:
    https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    Did that, invested a lot of time in twiking.
    OK. The line you put there does not look like this. There are no options
    for the codec and no quality settings.
    The question is Tcl related, maybe there is another Tcl solution that can create AVI from PNG.
    Unlikely. FFMpeg is the one big solution powering all of the major open source video coding / playing software like VLC or video editors. That's
    why I suggested to find the right settings.

    1) are you sure you want .avi? Usually it is -mp4 these days. But that doesn't imply quality

    I remember I tried MP4, no better.

    2) Do you have still images with a slow framerate (slideshow) or more a movie? What is your size / quality tradeoff? E.g. you could use a MPNG
    or MJPEG codec to get very good quality for the indiviudal images, but
    it will then be as large as the set of PNG or JPG files combined.

    I'm very unsure about codecs, and some of them lead to trubbles when inserting the video into PowerPoint. Not sure how compatible they are also on differend Windows machines.


    I usually encode to H.264 as this is universally supported now, even on phones. "-c:v libx264 -pix_fmt yuv420p" (the pix_fmt is necessary for
    Apple hardware)

    Ok, I'll try that again.

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 06:12:21 2022
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 15:56:24 UTC+3:
    Am 11.08.22 um 13:33 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.
    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg >> forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee:
    https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    Did that, invested a lot of time in twiking.
    OK. The line you put there does not look like this. There are no options
    for the codec and no quality settings.
    The question is Tcl related, maybe there is another Tcl solution that can create AVI from PNG.
    Unlikely. FFMpeg is the one big solution powering all of the major open source video coding / playing software like VLC or video editors. That's
    why I suggested to find the right settings.

    1) are you sure you want .avi? Usually it is -mp4 these days. But that doesn't imply quality

    2) Do you have still images with a slow framerate (slideshow) or more a movie? What is your size / quality tradeoff? E.g. you could use a MPNG
    or MJPEG codec to get very good quality for the indiviudal images, but
    it will then be as large as the set of PNG or JPG files combined.

    I usually encode to H.264 as this is universally supported now, even on phones. "-c:v libx264 -pix_fmt yuv420p" (the pix_fmt is necessary for
    Apple hardware)

    Christian

    I tried a lot, but may it's because there are so many options I didn't get the right ones.
    But I also suppose there could be an issue with the number of PNGs. There are only 10 PNGs. The frame rate is fps=5.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Alexandru on Thu Aug 11 13:56:36 2022
    Alexandru <alexandru.dadalau@meshparts.de> wrote:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 15:56:24 UTC+3:
    Am 11.08.22 um 13:33 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.
    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg >> >> forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee:
    https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    Did that, invested a lot of time in twiking.
    OK. The line you put there does not look like this. There are no options
    for the codec and no quality settings.
    The question is Tcl related, maybe there is another Tcl solution that can create AVI from PNG.
    Unlikely. FFMpeg is the one big solution powering all of the major open
    source video coding / playing software like VLC or video editors. That's
    why I suggested to find the right settings.

    1) are you sure you want .avi? Usually it is -mp4 these days. But that
    doesn't imply quality

    2) Do you have still images with a slow framerate (slideshow) or more a
    movie? What is your size / quality tradeoff? E.g. you could use a MPNG
    or MJPEG codec to get very good quality for the indiviudal images, but
    it will then be as large as the set of PNG or JPG files combined.

    I usually encode to H.264 as this is universally supported now, even on
    phones. "-c:v libx264 -pix_fmt yuv420p" (the pix_fmt is necessary for
    Apple hardware)

    Christian

    I tried a lot, but may it's because there are so many options I
    didn't get the right ones. But I also suppose there could be an
    issue with the number of PNGs. There are only 10 PNGs. The frame
    rate is fps=5.

    The number of PNG's will not make any significant difference.

    The selected video compression algorithm, and the multitude of
    quantization and bitrate knobs you can tweak for the selected video
    compression algorithm, is what makes the difference. And, sadly, the
    defaults, if you don't specify values for enough of the knobs, are
    often such that very poor results come out of the process.

    But, the number of knobs you can tweak for most of them is on a level
    of complexity of a professional audio mixing board (hundreds of knobs
    all lined up that can be tweaked).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Alexandru on Thu Aug 11 13:58:56 2022
    Alexandru <alexandru.dadalau@meshparts.de> wrote:
    I'm very unsure about codecs, and some of them lead to trubbles when inserting the video into PowerPoint. Not sure how compatible they
    are also on differend Windows machines.

    If you also need to be able to insert the video into powerpoint, and
    have it "play" as a video, then you'll need to encode the video in a
    format compatible with powerpoint (yes, I've just stated the obvious).

    Unfortunately, our Tcl newsgroup here is unlikely to also have a
    "powerpoint guru" in attendance who would know the details with which
    to advise you as to how to encode it to be "powerpoint compatible".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Alexandru on Thu Aug 11 13:18:16 2022
    Alexandru <alexandru.dadalau@meshparts.de> wrote:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
    Am 11.08.22 um 13:07 schrieb Alexandru:
    Hi,

    currently I'm using ffmpeg like this

    exec $ffmpeg_exe -y -r $fps -hide_banner -f concat -safe 0 -i $txtfile -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $rootname.avi

    to create AVI from multiple PNGs.

    The issue is, that the video quality is quite bad.
    This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg
    forum. There are settings and other quality options specific to the
    codec used. There is a lot of information e.g. hee:
    https://trac.ffmpeg.org/wiki

    Or try to google for recommended settings.

    Christian

    Did that, invested a lot of time in twiking.
    The question is Tcl related, maybe there is another Tcl solution that
    can create AVI from PNG.

    No, the question is "digital video encoding" related. You just happen
    to be using Tcl to launch the encoder.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Thu Aug 11 17:41:16 2022
    Am 11.08.22 um 15:12 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 15:56:24 UTC+3:
    I usually encode to H.264 as this is universally supported now, even on
    phones. "-c:v libx264 -pix_fmt yuv420p" (the pix_fmt is necessary for
    Apple hardware)


    I tried a lot, but may it's because there are so many options I didn't get the right ones.
    But I also suppose there could be an issue with the number of PNGs. There are only 10 PNGs. The frame rate is fps=5.

    OK so this means that you don't care about the file size, but instead
    want the highest possibel quality. Try this:

    ffmpeg -r 5 -i frame_%03d.png -c:v libx264 -crf 17 -pix_fmt yuv420p
    output.mp4

    (assuming your images are called frame_001.png, frame_002.png, ....)

    The crf option sets the quality, lower is better. The resulting file
    should play on major platforms / devices. -crf 0 would be lossless but
    that does usually not play everywhere.

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Obermeier@21:1/5 to All on Thu Aug 11 18:50:27 2022
    Am 11.08.2022 um 15:58 schrieb Rich:
    Alexandru <alexandru.dadalau@meshparts.de> wrote:
    I'm very unsure about codecs, and some of them lead to trubbles when
    inserting the video into PowerPoint. Not sure how compatible they
    are also on differend Windows machines.

    If you also need to be able to insert the video into powerpoint, and
    have it "play" as a video, then you'll need to encode the video in a
    format compatible with powerpoint (yes, I've just stated the obvious).

    Unfortunately, our Tcl newsgroup here is unlikely to also have a
    "powerpoint guru" in attendance who would know the details with which
    to advise you as to how to encode it to be "powerpoint compatible".

    PowerPoint itself supports creation of video files, which then of course can be read by PowerPoint.
    You can automate the video creation via CAWT, see test script Ppt-14_CreateVideo.tcl.

    Paul, the PowerPoint Tcl guru.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Paul Obermeier on Thu Aug 11 12:13:43 2022
    Paul Obermeier schrieb am Donnerstag, 11. August 2022 um 19:50:31 UTC+3:
    Am 11.08.2022 um 15:58 schrieb Rich:
    Alexandru <alexandr...@meshparts.de> wrote:
    I'm very unsure about codecs, and some of them lead to trubbles when
    inserting the video into PowerPoint. Not sure how compatible they
    are also on differend Windows machines.

    If you also need to be able to insert the video into powerpoint, and
    have it "play" as a video, then you'll need to encode the video in a
    format compatible with powerpoint (yes, I've just stated the obvious).

    Unfortunately, our Tcl newsgroup here is unlikely to also have a "powerpoint guru" in attendance who would know the details with which
    to advise you as to how to encode it to be "powerpoint compatible".
    PowerPoint itself supports creation of video files, which then of course can be read by PowerPoint.
    You can automate the video creation via CAWT, see test script Ppt-14_CreateVideo.tcl.

    Paul, the PowerPoint Tcl guru.
    :) Thanks Paul. This is very interesting, I would never have thought this is possible.
    One thing I've learned on this forum: It never stops to supprise me. And yes, you are the PowerPoint guru.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 13:07:04 2022
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:
    Am 11.08.22 um 15:12 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 15:56:24 UTC+3:
    I usually encode to H.264 as this is universally supported now, even on
    phones. "-c:v libx264 -pix_fmt yuv420p" (the pix_fmt is necessary for
    Apple hardware)


    I tried a lot, but may it's because there are so many options I didn't get the right ones.
    But I also suppose there could be an issue with the number of PNGs. There are only 10 PNGs. The frame rate is fps=5.
    OK so this means that you don't care about the file size, but instead
    want the highest possibel quality. Try this:

    ffmpeg -r 5 -i frame_%03d.png -c:v libx264 -crf 17 -pix_fmt yuv420p output.mp4

    (assuming your images are called frame_001.png, frame_002.png, ....)

    The crf option sets the quality, lower is better. The resulting file
    should play on major platforms / devices. -crf 0 would be lossless but
    that does usually not play everywhere.

    Christian

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Thu Aug 11 22:42:17 2022
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!

    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different
    size? Are your frames not named in a logical way? I assume you generate
    them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can
    play it in VLC without problems. You can find my file here: https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to
    use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try "-profile:v baseline" which restricts the H.264 features to a smaller set.
    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 14:34:56 2022
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different size? Are your frames not named in a logical way? I assume you generate
    them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can
    play it in VLC without problems. You can find my file here: https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to
    use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try "-profile:v baseline" which restricts the H.264 features to a smaller set. Christian
    FireFox can*t play it either.
    Already tried different formats, including baseline, no change.
    Somehow the name-%d.png trick never worked for me so I somehow diverted to the method with the text file. Besides, I want the vid to play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to create a text file instead of copying the 10 file
    twice with different names.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Alexandru on Thu Aug 11 14:47:20 2022
    Alexandru schrieb am Freitag, 12. August 2022 um 00:34:59 UTC+3:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different size? Are your frames not named in a logical way? I assume you generate them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can play it in VLC without problems. You can find my file here: https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to use a hardware decoder, and perhaps there is still something in the encoder settings that your hardware decoder does not like. You can try "-profile:v baseline" which restricts the H.264 features to a smaller set. Christian
    FireFox can*t play it either.
    Already tried different formats, including baseline, no change.
    Somehow the name-%d.png trick never worked for me so I somehow diverted to the method with the text file. Besides, I want the vid to play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to create a text file instead of copying the 10 file
    twice with different names.

    Wnated to specify:
    When using -i name-%d.png (my files are numberd begnning at 1, 2, 3, ... 10) the vid only contain 2 frames (1st and 5th). Why, don't know...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rolf Ade@21:1/5 to Alexandru on Fri Aug 12 00:55:37 2022
    Alexandru <alexandru.dadalau@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different
    size? Are your frames not named in a logical way? I assume you generate
    them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can
    play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to
    use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try
    "-profile:v baseline" which restricts the H.264 features to a smaller set. >> Christian
    FireFox can*t play it either.

    The URL Christian gave plays for me in firefox (debian "bullseye",
    firefox 103.0.1). Your "FireFox can*t play it either" really meant that
    URL? Platform and browser version would make your answer more helpful to
    us to help you.

    Or did you just repeat what you said earlier in the thread that the
    videos generated by you didn't play in Firefox (which also seems to be a
    must have beside playing in PowerPoint)?

    Already tried different formats, including baseline, no change.
    Somehow the name-%d.png trick never worked for me so I somehow
    diverted to the method with the text file. Besides, I want the vid to
    play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to
    create a text file instead of copying the 10 file twice with different
    names.

    At least on unix like platforms you could easily use links for
    duplicated frames. Not to talk about that 10 video frames are almost no
    storage space by (really almost) any means nowadays.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Fri Aug 12 06:54:05 2022
    Am 11.08.22 um 23:47 schrieb Alexandru:
    Alexandru schrieb am Freitag, 12. August 2022 um 00:34:59 UTC+3:
    Somehow the name-%d.png trick never worked for me so I somehow diverted to the method with the text file. Besides, I want the vid to play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to create a text file instead of copying the 10 file
    twice with different names.

    Wnated to specify:
    When using -i name-%d.png (my files are numberd begnning at 1, 2, 3, ... 10) the vid only contain 2 frames (1st and 5th). Why, don't know...

    I had a similar problem at the first try, and it was because of the
    positioning of the frame rate flag "-r". If you put it after the input
    file, then it will read the images as avideo stream of 25 FPS and then downsample to 5 FPS = keep only every 5th frame. The full line I used
    for the video I upoaded was:

    ffmpeg -r 5 -i frame_%03d.jpg -c:v libx264 -crf 17 -pix_fmt yuv420p out.mp4

    Copy pasted verbatim. I had jpeg input instead of PNG, don't think this
    makes a difference, though.

    A few things to think about:
    * Do you have odd sizes? Some players choke when the width / height are
    not multiples of 8 or 16
    * Do you have 16 bit PNGs? YOu can check at a Linux command line by
    "identify file.png", if ImageMagick is installed.
    * Maybe try another version of ffmpeg

    My phone also plays the file created by me.

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 23:11:25 2022
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 08:44:48 UTC+3:
    Am 12.08.22 um 07:27 schrieb Alexandru:
    Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
    Alexandru <alexandr...@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this >>>> -vf pad concat, textfile etc. is about. Do you have images of different >>>> size? Are your frames not named in a logical way? I assume you generate >>>> them from Tcl, what I would do is make a directory, put the frames in >>>> with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can >>>> play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in >>>> your VLC, then maybe you have a buggy version of it? It may also try to >>>> use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try >>>> "-profile:v baseline" which restricts the H.264 features to a smaller set.
    Christian
    FireFox can*t play it either.
    The URL Christian gave plays for me in firefox (debian "bullseye",
    firefox 103.0.1). Your "FireFox can*t play it either" really meant that
    URL? Platform and browser version would make your answer more helpful to >> us to help you.

    Or did you just repeat what you said earlier in the thread that the
    videos generated by you didn't play in Firefox (which also seems to be a >> must have beside playing in PowerPoint)?
    Yes, my video does not play in FireFox. It's not a must have. But it's weird, which means that ffmpeg does something wrong with that video.
    The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your
    firefox. Because then it boils down to the difference between your
    command line and mine. If it doesn't the difference is in your decoder
    (which might be a hardware accelerated decoder which is more picky)

    Christian
    Your video plays in my FireFox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 22:25:53 2022
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 07:54:10 UTC+3:
    Am 11.08.22 um 23:47 schrieb Alexandru:
    Alexandru schrieb am Freitag, 12. August 2022 um 00:34:59 UTC+3:
    Somehow the name-%d.png trick never worked for me so I somehow diverted to the method with the text file. Besides, I want the vid to play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to create a text file instead of copying the 10
    file twice with different names.

    Wnated to specify:
    When using -i name-%d.png (my files are numberd begnning at 1, 2, 3, ... 10) the vid only contain 2 frames (1st and 5th). Why, don't know...
    I had a similar problem at the first try, and it was because of the positioning of the frame rate flag "-r". If you put it after the input
    file, then it will read the images as avideo stream of 25 FPS and then downsample to 5 FPS = keep only every 5th frame. The full line I used
    for the video I upoaded was:

    ffmpeg -r 5 -i frame_%03d.jpg -c:v libx264 -crf 17 -pix_fmt yuv420p out.mp4

    Copy pasted verbatim. I had jpeg input instead of PNG, don't think this makes a difference, though.

    A few things to think about:
    * Do you have odd sizes? Some players choke when the width / height are
    not multiples of 8 or 16
    * Do you have 16 bit PNGs? YOu can check at a Linux command line by "identify file.png", if ImageMagick is installed.
    * Maybe try another version of ffmpeg

    My phone also plays the file created by me.

    Christian
    I need to add

    -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2"

    to your line so I have

    exec ffmpeg -r 5 -i $3D_animation_rootname-%d.png -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    An yes, the size of the images is pretty anything, since the PNGs are generated from Tcl Widgets. That's why I need the above extra options for the witdth and height.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Fri Aug 12 07:44:43 2022
    Am 12.08.22 um 07:27 schrieb Alexandru:
    Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
    Alexandru <alexandr...@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this >>>> -vf pad concat, textfile etc. is about. Do you have images of different >>>> size? Are your frames not named in a logical way? I assume you generate >>>> them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can >>>> play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to >>>> use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try >>>> "-profile:v baseline" which restricts the H.264 features to a smaller set. >>>> Christian
    FireFox can*t play it either.
    The URL Christian gave plays for me in firefox (debian "bullseye",
    firefox 103.0.1). Your "FireFox can*t play it either" really meant that
    URL? Platform and browser version would make your answer more helpful to
    us to help you.

    Or did you just repeat what you said earlier in the thread that the
    videos generated by you didn't play in Firefox (which also seems to be a
    must have beside playing in PowerPoint)?
    Yes, my video does not play in FireFox. It's not a must have. But it's weird, which means that ffmpeg does something wrong with that video.

    The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your
    firefox. Because then it boils down to the difference between your
    command line and mine. If it doesn't the difference is in your decoder
    (which might be a hardware accelerated decoder which is more picky)

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Rolf Ade on Thu Aug 11 22:27:12 2022
    Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
    Alexandru <alexandr...@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different
    size? Are your frames not named in a logical way? I assume you generate
    them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can
    play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to
    use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try
    "-profile:v baseline" which restricts the H.264 features to a smaller set. >> Christian
    FireFox can*t play it either.
    The URL Christian gave plays for me in firefox (debian "bullseye",
    firefox 103.0.1). Your "FireFox can*t play it either" really meant that
    URL? Platform and browser version would make your answer more helpful to
    us to help you.

    Or did you just repeat what you said earlier in the thread that the
    videos generated by you didn't play in Firefox (which also seems to be a
    must have beside playing in PowerPoint)?
    Yes, my video does not play in FireFox. It's not a must have. But it's weird, which means that ffmpeg does something wrong with that video.
    Already tried different formats, including baseline, no change.
    Somehow the name-%d.png trick never worked for me so I somehow
    diverted to the method with the text file. Besides, I want the vid to
    play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to
    create a text file instead of copying the 10 file twice with different names.
    At least on unix like platforms you could easily use links for
    duplicated frames. Not to talk about that 10 video frames are almost no storage space by (really almost) any means nowadays.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 23:15:53 2022
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 07:54:10 UTC+3:
    Am 11.08.22 um 23:47 schrieb Alexandru:
    Alexandru schrieb am Freitag, 12. August 2022 um 00:34:59 UTC+3:
    Somehow the name-%d.png trick never worked for me so I somehow diverted to the method with the text file. Besides, I want the vid to play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to create a text file instead of copying the 10
    file twice with different names.

    Wnated to specify:
    When using -i name-%d.png (my files are numberd begnning at 1, 2, 3, ... 10) the vid only contain 2 frames (1st and 5th). Why, don't know...
    I had a similar problem at the first try, and it was because of the positioning of the frame rate flag "-r". If you put it after the input
    file, then it will read the images as avideo stream of 25 FPS and then downsample to 5 FPS = keep only every 5th frame. The full line I used
    for the video I upoaded was:

    ffmpeg -r 5 -i frame_%03d.jpg -c:v libx264 -crf 17 -pix_fmt yuv420p out.mp4

    Copy pasted verbatim. I had jpeg input instead of PNG, don't think this makes a difference, though.

    A few things to think about:
    * Do you have odd sizes? Some players choke when the width / height are
    not multiples of 8 or 16
    Yes, see my previous post.
    * Do you have 16 bit PNGs? YOu can check at a Linux command line by "identify file.png", if ImageMagick is installed.
    I checked the image properties in IrfanView, it says:
    Original colors 16,7 Million (32 BitsPerPixel)
    Current colors 16,7 Million (24 BitsPerPixel)
    So I gues, no, it's not 16 bin PNGs
    * Maybe try another version of ffmpeg
    Currently using Build: ffmpeg-20191004-e6625ca-win64-static
    I'll see if there is a newer one.

    My phone also plays the file created by me.

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 23:29:40 2022
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 07:54:10 UTC+3:
    Am 11.08.22 um 23:47 schrieb Alexandru:
    Alexandru schrieb am Freitag, 12. August 2022 um 00:34:59 UTC+3:
    Somehow the name-%d.png trick never worked for me so I somehow diverted to the method with the text file. Besides, I want the vid to play 1 to 10 and then 10 to 1 (reverse order). I't more efficient to create a text file instead of copying the 10
    file twice with different names.

    Wnated to specify:
    When using -i name-%d.png (my files are numberd begnning at 1, 2, 3, ... 10) the vid only contain 2 frames (1st and 5th). Why, don't know...
    I had a similar problem at the first try, and it was because of the positioning of the frame rate flag "-r". If you put it after the input
    file, then it will read the images as avideo stream of 25 FPS and then downsample to 5 FPS = keep only every 5th frame. The full line I used
    for the video I upoaded was:

    ffmpeg -r 5 -i frame_%03d.jpg -c:v libx264 -crf 17 -pix_fmt yuv420p out.mp4

    Copy pasted verbatim. I had jpeg input instead of PNG, don't think this makes a difference, though.

    A few things to think about:
    * Do you have odd sizes? Some players choke when the width / height are
    not multiples of 8 or 16
    * Do you have 16 bit PNGs? YOu can check at a Linux command line by "identify file.png", if ImageMagick is installed.
    * Maybe try another version of ffmpeg

    My phone also plays the file created by me.

    Christian
    I just created another 10 PNGs as screen shots (FullHD size)
    I have the same issues. So the size of PNGs is not the issue.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Christian Gollwitzer on Thu Aug 11 23:31:20 2022
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 08:44:48 UTC+3:
    Am 12.08.22 um 07:27 schrieb Alexandru:
    Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
    Alexandru <alexandr...@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this >>>> -vf pad concat, textfile etc. is about. Do you have images of different >>>> size? Are your frames not named in a logical way? I assume you generate >>>> them from Tcl, what I would do is make a directory, put the frames in >>>> with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can >>>> play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in >>>> your VLC, then maybe you have a buggy version of it? It may also try to >>>> use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try >>>> "-profile:v baseline" which restricts the H.264 features to a smaller set.
    Christian
    FireFox can*t play it either.
    The URL Christian gave plays for me in firefox (debian "bullseye",
    firefox 103.0.1). Your "FireFox can*t play it either" really meant that
    URL? Platform and browser version would make your answer more helpful to >> us to help you.

    Or did you just repeat what you said earlier in the thread that the
    videos generated by you didn't play in Firefox (which also seems to be a >> must have beside playing in PowerPoint)?
    Yes, my video does not play in FireFox. It's not a must have. But it's weird, which means that ffmpeg does something wrong with that video.
    The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your
    firefox. Because then it boils down to the difference between your
    command line and mine. If it doesn't the difference is in your decoder
    (which might be a hardware accelerated decoder which is more picky)

    Christian
    Could you send me your PNGs then I will use exactly your command line with your PNGs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Alexandru on Thu Aug 11 23:51:02 2022
    Alexandru schrieb am Freitag, 12. August 2022 um 09:31:23 UTC+3:
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 08:44:48 UTC+3:
    Am 12.08.22 um 07:27 schrieb Alexandru:
    Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
    Alexandru <alexandr...@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different
    size? Are your frames not named in a logical way? I assume you generate
    them from Tcl, what I would do is make a directory, put the frames in >>>> with ascending numbers and then use the img input using the format >>>> pattern as in my post. I tested it with a sequence of 20 images and can
    play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in >>>> your VLC, then maybe you have a buggy version of it? It may also try to
    use a hardware decoder, and perhaps there is still something in the >>>> encoder settings that your hardware decoder does not like. You can try
    "-profile:v baseline" which restricts the H.264 features to a smaller set.
    Christian
    FireFox can*t play it either.
    The URL Christian gave plays for me in firefox (debian "bullseye",
    firefox 103.0.1). Your "FireFox can*t play it either" really meant that >> URL? Platform and browser version would make your answer more helpful to
    us to help you.

    Or did you just repeat what you said earlier in the thread that the
    videos generated by you didn't play in Firefox (which also seems to be a
    must have beside playing in PowerPoint)?
    Yes, my video does not play in FireFox. It's not a must have. But it's weird, which means that ffmpeg does something wrong with that video.
    The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your firefox. Because then it boils down to the difference between your
    command line and mine. If it doesn't the difference is in your decoder (which might be a hardware accelerated decoder which is more picky)

    Christian
    Could you send me your PNGs then I will use exactly your command line with your PNGs.
    I just realized, that PowerPoint also has it's problems with the my vid. It looks like it's playing the video correctly but there is something wrong with the frames. I cannot pause the video at the first frame, then the next frames are play 2 to 10 and
    then the reversed order is played only 10 to 5. Very weird...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Alexandru on Fri Aug 12 01:56:47 2022
    Alexandru schrieb am Freitag, 12. August 2022 um 09:51:07 UTC+3:
    Alexandru schrieb am Freitag, 12. August 2022 um 09:31:23 UTC+3:
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 08:44:48 UTC+3:
    Am 12.08.22 um 07:27 schrieb Alexandru:
    Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
    Alexandru <alexandr...@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different
    size? Are your frames not named in a logical way? I assume you generate
    them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format >>>> pattern as in my post. I tested it with a sequence of 20 images and can
    play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to
    use a hardware decoder, and perhaps there is still something in the >>>> encoder settings that your hardware decoder does not like. You can try
    "-profile:v baseline" which restricts the H.264 features to a smaller set.
    Christian
    FireFox can*t play it either.
    The URL Christian gave plays for me in firefox (debian "bullseye",
    firefox 103.0.1). Your "FireFox can*t play it either" really meant that
    URL? Platform and browser version would make your answer more helpful to
    us to help you.

    Or did you just repeat what you said earlier in the thread that the >> videos generated by you didn't play in Firefox (which also seems to be a
    must have beside playing in PowerPoint)?
    Yes, my video does not play in FireFox. It's not a must have. But it's weird, which means that ffmpeg does something wrong with that video.
    The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your firefox. Because then it boils down to the difference between your command line and mine. If it doesn't the difference is in your decoder (which might be a hardware accelerated decoder which is more picky)

    Christian
    Could you send me your PNGs then I will use exactly your command line with your PNGs.
    I just realized, that PowerPoint also has it's problems with the my vid. It looks like it's playing the video correctly but there is something wrong with the frames. I cannot pause the video at the first frame, then the next frames are play 2 to 10 and
    then the reversed order is played only 10 to 5. Very weird...
    Looking at the output of ffmpeg I see things that look like warnings/errors (but not marked as such):

    DTS -230584300921369 < 0 out of order
    DTS -230584300921369, next:40000 st:0 invalid dropping

    After searching the internet I found something similar to my problem: https://www.reddit.com/r/ffmpeg/comments/ks8zfs/png_concat_dtspts_invalid/

    The proposed solution is to add "duration" after each "file" in the list of PNGs.

    Now PowerPoint still plays the video with the same issue that it skips the last frames.
    FireFox now finaly plays the video and it does it correctly!
    VLC still perfoms worst with the small addition, that now more than only first frame is played, but only in the video loop, every second loop run.

    After a while: Resolution!
    I removed the -r 5 option (frame rate) kept the "duration 0.2" option in the text file with PNG names and now it works!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Alexandru on Fri Aug 12 02:41:59 2022
    Alexandru schrieb am Freitag, 12. August 2022 um 11:56:50 UTC+3:
    Alexandru schrieb am Freitag, 12. August 2022 um 09:51:07 UTC+3:
    Alexandru schrieb am Freitag, 12. August 2022 um 09:31:23 UTC+3:
    Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 08:44:48 UTC+3:
    Am 12.08.22 um 07:27 schrieb Alexandru:
    Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
    Alexandru <alexandr...@meshparts.de> writes:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
    Am 11.08.22 um 22:07 schrieb Alexandru:
    Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:

    After about 50 tries I got this command
    exec ffmpeg -y -r 5 -hide_banner -f concat -i $txtfile -safe 0 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -crf 17 -pix_fmt yuv420p $3D_animation_rootname.mp4

    which works for PowerPoint (I can insert the video into PowePoint and play it). The quality is now much better.
    But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
    That is strange indeed. But honestly I do not understand what all this
    -vf pad concat, textfile etc. is about. Do you have images of different
    size? Are your frames not named in a logical way? I assume you generate
    them from Tcl, what I would do is make a directory, put the frames in
    with ascending numbers and then use the img input using the format
    pattern as in my post. I tested it with a sequence of 20 images and can
    play it in VLC without problems. You can find my file here:
    https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4

    It also plays in Firefox without problems. If it also doesn't play in
    your VLC, then maybe you have a buggy version of it? It may also try to
    use a hardware decoder, and perhaps there is still something in the
    encoder settings that your hardware decoder does not like. You can try
    "-profile:v baseline" which restricts the H.264 features to a smaller set.
    Christian
    FireFox can*t play it either.
    The URL Christian gave plays for me in firefox (debian "bullseye", >> firefox 103.0.1). Your "FireFox can*t play it either" really meant that
    URL? Platform and browser version would make your answer more helpful to
    us to help you.

    Or did you just repeat what you said earlier in the thread that the >> videos generated by you didn't play in Firefox (which also seems to be a
    must have beside playing in PowerPoint)?
    Yes, my video does not play in FireFox. It's not a must have. But it's weird, which means that ffmpeg does something wrong with that video.
    The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your firefox. Because then it boils down to the difference between your command line and mine. If it doesn't the difference is in your decoder (which might be a hardware accelerated decoder which is more picky)

    Christian
    Could you send me your PNGs then I will use exactly your command line with your PNGs.
    I just realized, that PowerPoint also has it's problems with the my vid. It looks like it's playing the video correctly but there is something wrong with the frames. I cannot pause the video at the first frame, then the next frames are play 2 to 10
    and then the reversed order is played only 10 to 5. Very weird...
    Looking at the output of ffmpeg I see things that look like warnings/errors (but not marked as such):

    DTS -230584300921369 < 0 out of order
    DTS -230584300921369, next:40000 st:0 invalid dropping

    After searching the internet I found something similar to my problem: https://www.reddit.com/r/ffmpeg/comments/ks8zfs/png_concat_dtspts_invalid/

    The proposed solution is to add "duration" after each "file" in the list of PNGs.

    Now PowerPoint still plays the video with the same issue that it skips the last frames.
    FireFox now finaly plays the video and it does it correctly!
    VLC still perfoms worst with the small addition, that now more than only first frame is played, but only in the video loop, every second loop run.

    After a while: Resolution!
    I removed the -r 5 option (frame rate) kept the "duration 0.2" option in the text file with PNG names and now it works!

    I noticed, that "catch" arround the ffmpeg command retuns 1 so ffmpeg actually returns error, though the vid is created and it runs perfectly on PowerPoint, FireFox and VLC.

    The output of ffmpeg also does not show any warnings or errors:

    Input #0, concat, from 'C:/arbeit/MESHPARTS-Offline/Assemblies/Schulung/ProfileScrews/temp.avi.txt':
    Duration: 00:00:04.00, start: 0.000000, bitrate: 1 kb/s
    Stream #0:0: Video: png, rgb24(pc), 1920x1080, 25 tbr, 25 tbn, 25 tbc Stream mapping:
    Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [libx264 @ 0000020e1fcdaa00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0000020e1fcdaa00] profile High, level 4.0, 4:2:0, 8-bit
    [libx264 @ 0000020e1fcdaa00] 264 - core 158 r2984 3759fcb - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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=-2 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=17.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'C:/arbeit/MESHPARTS-Offline/Assemblies/Schulung/ProfileScrews/s.mp4':
    Metadata:
    encoder : Lavf58.33.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
    encoder : Lavc58.59.101 libx264
    Side data:
    cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    frame= 31 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=24 drop=0 speed= 0x
    frame= 51 fps= 47 q=22.0 size= 0kB time=-00:00:00.07 bitrate=N/A dup=40 drop=0 speed=N/A
    frame= 66 fps= 39 q=22.0 size= 1024kB time=00:00:00.52 bitrate=16130.3kbits/s dup=52 drop=0 speed=0.309x
    frame= 86 fps= 38 q=22.0 size= 1536kB time=00:00:01.32 bitrate=9532.2kbits/s dup=68 drop=0 speed=0.586x
    frame= 99 fps= 27 q=-1.0 Lsize= 3460kB time=00:00:03.84 bitrate=7381.6kbits/s dup=79 drop=0 speed=1.04x
    video:3458kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.058427%
    [libx264 @ 0000020e1fcdaa00] frame I:2 Avg QP:11.39 size:155517
    [libx264 @ 0000020e1fcdaa00] frame P:25 Avg QP:18.40 size:126488
    [libx264 @ 0000020e1fcdaa00] frame B:72 Avg QP:17.49 size: 934
    [libx264 @ 0000020e1fcdaa00] consecutive B-frames: 3.0% 0.0% 0.0% 97.0% [libx264 @ 0000020e1fcdaa00] mb I I16..4: 53.3% 21.6% 25.2%
    [libx264 @ 0000020e1fcdaa00] mb P I16..4: 3.7% 1.9% 8.8% P16..4: 3.8% 0.4% 0.5% 0.0% 0.0% skip:80.9%
    [libx264 @ 0000020e1fcdaa00] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 4.5% 0.0% 0.0% direct: 0.1% skip:95.3% L0:42.8% L1:57.1% BI: 0.1%
    [libx264 @ 0000020e1fcdaa00] 8x8 transform intra:16.8% inter:14.7%
    [libx264 @ 0000020e1fcdaa00] coded y,uvDC,uvAC intra: 47.1% 45.4% 44.5% inter: 0.9% 0.6% 0.6%
    [libx264 @ 0000020e1fcdaa00] i16 v,h,dc,p: 69% 22% 9% 0%
    [libx264 @ 0000020e1fcdaa00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 5% 41% 1% 3% 1% 1% 1% 1%
    [libx264 @ 0000020e1fcdaa00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 16% 25% 4% 9% 6% 13% 4% 6%
    [libx264 @ 0000020e1fcdaa00] i8c dc,h,v,p: 81% 8% 6% 5%
    [libx264 @ 0000020e1fcdaa00] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0000020e1fcdaa00] ref P L0: 59.1% 15.9% 21.3% 3.8%
    [libx264 @ 0000020e1fcdaa00] ref B L0: 81.5% 17.4% 1.1%
    [libx264 @ 0000020e1fcdaa00] ref B L1: 96.4% 3.6%
    [libx264 @ 0000020e1fcdaa00] kb/s:7152.47

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Schelte@21:1/5 to Alexandru on Fri Aug 12 13:54:34 2022
    On 12/08/2022 11:41, Alexandru wrote:
    I noticed, that "catch" arround the ffmpeg command retuns 1 so ffmpeg actually returns error, though the vid is created and it runs perfectly on PowerPoint, FireFox and VLC.

    That's probably because ffmpeg generates some output on stderr. You can
    check by looking at $errorCode. If ffmpeg realy fails that will indicate CHILDSTATUS ... To ignore stderr, use exec -ignorestderr ffmpeg ...


    Schelte

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Schelte on Sun Aug 14 00:58:45 2022
    Schelte schrieb am Freitag, 12. August 2022 um 14:54:40 UTC+3:
    On 12/08/2022 11:41, Alexandru wrote:
    I noticed, that "catch" arround the ffmpeg command retuns 1 so ffmpeg actually returns error, though the vid is created and it runs perfectly on PowerPoint, FireFox and VLC.
    That's probably because ffmpeg generates some output on stderr. You can
    check by looking at $errorCode. If ffmpeg realy fails that will indicate CHILDSTATUS ... To ignore stderr, use exec -ignorestderr ffmpeg ...


    Schelte
    Thanks Schelte for the tip. Adding -ignorestderr solved the problem. I wasn't aware of the option.

    Regards
    Alexandru

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Alexandru on Sun Aug 14 15:43:40 2022
    Alexandru <alexandru.dadalau@meshparts.de> wrote:
    Schelte schrieb am Freitag, 12. August 2022 um 14:54:40 UTC+3:
    On 12/08/2022 11:41, Alexandru wrote:
    I noticed, that "catch" arround the ffmpeg command retuns 1 so
    ffmpeg actually returns error, though the vid is created and it
    runs perfectly on PowerPoint, FireFox and VLC.

    That's probably because ffmpeg generates some output on stderr. You
    can check by looking at $errorCode. If ffmpeg realy fails that will
    indicate CHILDSTATUS ... To ignore stderr, use exec -ignorestderr
    ffmpeg ...

    Thanks Schelte for the tip. Adding -ignorestderr solved the problem.
    I wasn't aware of the option.

    It is a 'newer' option to exec (I don't know when it appeared). Prior
    to it showing up one had to have enough non-windows knowledge to
    recognize the "2>" redirect as the way to "ignore stderr".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)