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
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.
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,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
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.
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
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
Am 11.08.22 um 13:07 schrieb Alexandru:
Hi,This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg
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.
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.
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,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
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.
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
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,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
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.
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
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:OK. The line you put there does not look like this. There are no options
Am 11.08.22 um 13:07 schrieb Alexandru:
Hi,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
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.
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.
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.
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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 14:30:33 UTC+3:
Am 11.08.22 um 13:07 schrieb Alexandru:
Hi,This is not a Tcl question, but an ffmpeg question. Try to find a ffmpeg
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.
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.
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.
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".
Am 11.08.2022 um 15:58 schrieb Rich::) Thanks Paul. This is very interesting, I would never have thought this is possible.
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 whichPowerPoint itself supports creation of video files, which then of course can be read by PowerPoint.
to advise you as to how to encode it to be "powerpoint compatible".
You can automate the video creation via CAWT, see test script Ppt-14_CreateVideo.tcl.
Paul, the PowerPoint Tcl guru.
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.OK so this means that you don't care about the file size, but instead
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.
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
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!
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
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.That is strange indeed. But honestly I do not understand what all this
But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
-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
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:twice with different names.
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.That is strange indeed. But honestly I do not understand what all this
But: The VLC player does not play it anymore, which is very weird. VLC only shows the first frame and done!
-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 inFireFox can*t play it either.
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
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
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:That is strange indeed. But honestly I do not understand what all this
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!
-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
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.
Alexandru schrieb am Freitag, 12. August 2022 um 00:34:59 UTC+3:twice with different names.
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
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...
Am 12.08.22 um 07:27 schrieb Alexandru:Your video plays in my FireFox.
Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your
Alexandru <alexandr...@meshparts.de> writes: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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:The URL Christian gave plays for me in firefox (debian "bullseye",
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3: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
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!
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 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)?
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
Am 11.08.22 um 23:47 schrieb Alexandru:file twice with different names.
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
I need to addWnated to specify: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
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...
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
Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:
Alexandru <alexandr...@meshparts.de> writes: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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:The URL Christian gave plays for me in firefox (debian "bullseye",
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3: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
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!
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 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)?
Alexandru <alexandr...@meshparts.de> writes: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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:The URL Christian gave plays for me in firefox (debian "bullseye",
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:That is strange indeed. But honestly I do not understand what all this
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!
-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 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.At least on unix like platforms you could easily use links for
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.
duplicated frames. Not to talk about that 10 video frames are almost no storage space by (really almost) any means nowadays.
Am 11.08.22 um 23:47 schrieb Alexandru:file twice with different names.
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
Yes, see my previous post.Wnated to specify: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
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...
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.I checked the image properties in IrfanView, it says:
* Maybe try another version of ffmpegCurrently using Build: ffmpeg-20191004-e6625ca-win64-static
My phone also plays the file created by me.
Christian
Am 11.08.22 um 23:47 schrieb Alexandru:file twice with different names.
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
I just created another 10 PNGs as screen shots (FullHD size)Wnated to specify: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
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...
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
Am 12.08.22 um 07:27 schrieb Alexandru:Could you send me your PNGs then I will use exactly your command line with your PNGs.
Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3:The question was, whether the video from me (https://www.auriocus.de/Grumpf/demo_ffmpeg.mp4) does play in your
Alexandru <alexandr...@meshparts.de> writes: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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:The URL Christian gave plays for me in firefox (debian "bullseye",
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3: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
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!
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 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)?
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
Christian Gollwitzer schrieb am Freitag, 12. August 2022 um 08:44:48 UTC+3: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
Am 12.08.22 um 07:27 schrieb Alexandru:
Rolf Ade schrieb am Freitag, 12. August 2022 um 01:55:42 UTC+3: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
Alexandru <alexandr...@meshparts.de> writes: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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:The URL Christian gave plays for me in firefox (debian "bullseye",
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:That is strange indeed. But honestly I do not understand what all this
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!
-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 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)?
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)
ChristianCould you send me your PNGs then I will use exactly your command line with your PNGs.
Alexandru schrieb am Freitag, 12. August 2022 um 09:31:23 UTC+3:then the reversed order is played only 10 to 5. Very weird...
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: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)
Alexandru <alexandr...@meshparts.de> writes: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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3:The URL Christian gave plays for me in firefox (debian "bullseye",
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:That is strange indeed. But honestly I do not understand what all this
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!
-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 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)?
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 andChristianCould you send me your PNGs then I will use exactly your command line with your PNGs.
Alexandru schrieb am Freitag, 12. August 2022 um 09:51:07 UTC+3:and then the reversed order is played only 10 to 5. Very weird...
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: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)
Alexandru <alexandr...@meshparts.de> writes: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.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 23:42:22 UTC+3: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
Am 11.08.22 um 22:07 schrieb Alexandru:FireFox can*t play it either.
Christian Gollwitzer schrieb am Donnerstag, 11. August 2022 um 18:41:21 UTC+3:That is strange indeed. But honestly I do not understand what all this
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!
-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
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)?
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 10ChristianCould you send me your PNGs then I will use exactly your command line with your PNGs.
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.
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 ...
SchelteThanks Schelte for the tip. Adding -ignorestderr solved the problem. I wasn't aware of the option.
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 58:15:07 |
Calls: | 6,914 |
Calls today: | 4 |
Files: | 12,379 |
Messages: | 5,430,825 |