hey all,
i have 288 png images
and an audio file
i wanna convert this png images in to video at 24fps
and sync my audio file with it
after converting this things into video ,
visual quality of video should remain same as my source png images quality and,
audio quality should remain same as my source audio
recomend me any simplest lossless video codec ,lossless audio codec and suitable wrapper format..
after converting to video ,playback should not face difficulities..i have low end system..
+ Reply to Thread
Results 1 to 30 of 48
-
Anonymous543Guest
-
Anonymous543Guest
-
vdub2
1) Make sure image sequence is labelled sequentially, eg.. img000.png, img001.png, img002.png....(or similar; the numbers are the important part) , if you open the 1st, the sequence will be loaded
2) video => framerate => change frame rate to "x"
3) video => compression => uncompressed RGB (the 1st option, it should already be selected)
4) audio => audio from other file, select your audio
5) audio => full processing mode
6) audio => compression => no compression (pcm) (the 1st option, it should already be selected)
7) file => save as avi (enter name and destination) -
For some compression you can use lagarith (rgb mode) instread of uncompressed.
But keep in mind lossless codecs like lagarith, huffyuv, ut video codec, etc. are not widely supported like the lossy codecs like MPEG 2, AVC, HEVC, etc. So the lossless codecs aren't good for something you intend to distribute to others. -
Not previously discussed...
Merely combining a series of .png (or any other picture format) images in to a video could give you a unwanted result since they will be displayed, by your own wishes, at 24 per second. If they are unique images then you will not see them.
If that is so then you need to consider slide-show software which will display each image at a set timing. Check out the software section for suitable tools. 'Lossless' images can be converted to 'lossless' video. Yet I seriously doubt you require that and you have misunderstood the implications of the terminology. -
Anonymous543Guest
This worked, but i didn't understand what processes are happened to my png images and audio..
all 288png images size is 540mb
And audio size is 1mb
But when i used your method and made video out of it..
It's size became 1.6gb..3times more then source files
jagabo
uncompressed rgb, uncompressed pcm, avi.
combining a series of .png (or any other picture format) images in to a video could give you a unwanted result since they will be displayed, by your own wishes, at 24 per second
I wanna make a video which play in my phone or any computer player
Vdub method worked but i think it's doing something else..i guess..it's taking frame data from every png and then it's converting it to uncompressed RGB information
I just wanna make simple animation video from png sequence , frames should not loss any quality while converting into video it's should just play at 24fps✅in sync with my audio file. -
I don't think you are understanding what is being said to you.
1st, png uses (usually) RGB colorspace. So it makes sense to not change the colorspace to anything else, which would have incurred losses in the conversion.
2nd, you want lossless/uncompressed. So you use a codec that is usable to you or others that is lossless or uncompressed (btw, for all intents and purposes, uncompressed still encodes even though it doesn't compress, so could still be called a "codec"). jagabo suggest uncompressed, and I concur. Others suggested a lossless codec, such as HuffYUV, Lagarith, etc. But you must make sure they support keeping it in RGB color space.
3rd, if you have 288 images, as photos they can last onscreen as LONG or as SHORT as you want them to. When you create a video, however, you must set the duration, and it is STRONGLY recommended that you use a constant framerate/duration for each and all of the images. 288 images at 24 frames per second is 288/24 = 12 seconds. Is that how short you intend it to be? As was mentioned, if those are all unique images, they will go by so fast you won't have enough time to digest them all, perhaps not even recognize some. If you want, for example a 2 minute slideshow, you should make each duration no longer 1/24 of a second, but 1/2.4 of a second or 10 times the duration of the original attempt. That means the framerate should be 2.4 frames/second. Since this is not a nice round number, and some player apps may not like such a low FPS playout, I suggest you convert to 2.4fps and then reconvert to 24fps, telling the converter to duplicate the frames (in other words, each image would last for 10 frames in a 24fps final video.
4th, if each png is 2MB, then 288 of them would be 576, so am guessing your pngs are just a little shy of 2MB each. A 1MB audio clip, at 16bit, 48kHz, stereo LPCM, would be about 10+ seconds worth or 11+ sec if 44.1kHz. If you truly are wanting just a 12 sec clip, your audio seems short. Unless you don't have an LPCM clip. What is it?
5th, RGB uncompressed would be Hrez * Vrez * 3bytes (RGB) * FPS * duration. So for example a 1920x1080 image of 288 pngs at 24fps (that original rate, with each image lasting only one frame) would be 1920 * 1080 * 3 * 24 * 12 = 1.79GB. Do the calculations and you will figure out where you aren't taking something into consideration.***
6th, AVI container/wrapper is just the container. NO containers/wrappers ever contain the codec itself (which is a bit of algorithmic code), but they must contain the audio and the video - encoded according to the codecs' parameters, plus metadata/headers, and they must be organized in a certain way, so there is ALWAYS a small amount of overhead.
7th, yes VDub is doing that. That is what you asked for - or at least said you wanted - and it is supposed to do. If you don't want it to do that, you need to describe your intentions more thoroughly.
Scott
***Normally, one cannot calculate the size this way, but uncompressed is an exception. -
I suppose it is capital "M" and capital "B", not lowercase. Just a nitpick.
I understand what you are asking for: a lightweight container around still PNG images and a soundtrack. I just googled, and there are aPNG and MNG. They are not widely supported and I think they cannot include audio. It seems that you will have to re-encode -
Of course. PNG is losslessly compressed. Uncompressed RGB is not. The process decompresses your PNG frames to uncompressed RGB then saves that RGB it in an AVI container with no compression.
If you want smaller files used a lossless codec. For RGB VirtualDub2 supports FFMPEG x265 lossless, FFMPEG FFV1 lossless, FFMPEG huffyuv lossless, Lagarith, and x264 losselss (CRF=0). Make sure you specify RGB, not some YUV color format. -
I had a play. I exported 10 seconds of a video into BMP images, resulting in 300 images. Total image size was 1.76gb (approx 6mb per image).
I imported those BMPs into VDub2 using Poisondeathray's technique in post #4.
I then did a "Save Video..." and got the following file sizes (I didn't worry about the audio):
Set the export codec using Video>Compression.
Uncompressed: 1.23gb
Lagarith Lossless: 83.4mb
X264 CRF 18: 4.3mb (file attached) -
In VirtualDub2 the FFMPEG VP9 codec also supports RGB and may be lossless at quality=0.
If you have a lot of redundancy in your png sequence (for example, unchanging backgrounds) using one of the interframe encoders (x264, x265, vp9) will give much more compression. Samples added...Last edited by jagabo; 21st May 2022 at 09:29. Reason: added lagarith.avi
-
Depending on your source audio type, you might be able to copy it depending on the container compatibility (eg . if it was lossy audio - instead of decompressing to uncompressed, and
resulting in larger filesizes for the audio portion). You never mentioned what type of audio -
Anonymous543Guest
i got permission from super mega moderator to share this file..
https://files.videohelp.com/u/301063/SAO.m2ts
check out this video..i was talking about this video..
video has
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
when i converted video to png sequence with using ffmpeg and this code
Code:ffmpeg -i SAO.m2ts -vf fps=24000/1001 %3d.png
every image has diffrent file size
image has color space RGB
also i have extracted its audio with this code
Code:ffmpeg -i SAO.m2ts -vn -c:a copy presmix.m2ts
1st when i converted video to png why its color space changed YUV to RGB?
2nd what will be the best lossless video / audio codecs to rejoin extracted files at constant 24fps?(i know its already answered by jagobo but still uncompressed rgb, uncompressed pcm, avi has too big file size..)
3rd any one explain is it possible to convert RGB sequences to YUV without lossing quality?
4th for videos which color space is best RGB or YUV?
5th RGB or YUV which color space takes low file size?Last edited by Anonymous543; 21st May 2022 at 07:00. Reason: correction in code
-
Because PNG images are RGB.
There is no best, only choices.
If you use 10 bit YUV. But it will depend on the way you convert RGB to YUV and how your player convertsback to RGB.
There is no best, only choices.
YUV 4:4:4 limited range will usually be smaller. Because the RGB to YUV conversion loses many colors.
What's the point of converting your AVC source to some lossless codec via PNG images? Why are you obsessed with lossless encoding? Especially given such a low quality source. They are all going to drastically increase the file size.Last edited by jagabo; 21st May 2022 at 08:11.
-
In terms of "losslessness", technically the original color space of the source is the "best"
When you begin with an 8bit YUV 4:2:0 source, and convert to 8bit RGB, there is already loss from the colorspace conversion and upsampling (you cannot get back the original 8bit 4:2:0 source, bit for bit identical)
The only way RGB can be completely lossless from a YUV source, is with RGB float (Negative RGB values are retained) . The most common is EXR sequences. There are programs that can handle this 32bit float eg. nuke, AE, resolve, and programs that can handle the proper complete conversion back and forth (e.g. vapoursynth). This is probably overkill - do you really need it ?
But why are you converting to RGB and PNG sequences ? -
Anonymous543Guest
Am trying to understand how a basic animation and video/audio codec works..
because i wanna make a small but high quality 2d animation by my own..and i dont know which codecs will suit to animate frames which i draw
AVC HEVC VP9 and other modern codecs has too many options to understand before starting like..profile ,preset ,crf , bitrate ,2 pass ,1 pass ,pix_format etc.
i want a basic simple codec that is easy to understand. -
Small and lossless usually don't go together. There are particular circumstances where they can. See the samples I posted in post #14.
You don't need to know most of that. Just specify lossless mode and use the defaults. Changing most of those other settings will not make much difference with lossless encoding.
Then use Lagarith.
But beware, outside a PC most players will not play lagarith or any of the lossless codecs. -
Most good animators create and save lossless/uncompressed RGB, with picture sequences, so in that respect, you are on the right track. However, most animators also realize and happily account for the fact that their animations take up a huge amount of space, but you are not on the same page yet. You can't have your cake and eat it too.
Remember though that those pix sequences are appropriate for saving your original creations, which one should always keep, but what you use for standard consumption would be better served by making a copy of it, converting to video, with some small amount of loss. This is expected in this scenario. Others have already said lossless h264/h265 are options, and the RGB->YUV conversion is not going to ruin the experience.
Btw, you could have saved us all a LOT of time by stating up front what you had and what your intentions, goals, and priorities were.
ScottLast edited by Cornucopia; 21st May 2022 at 09:57.
-
And you should upload samples that are representative of what you will be working with because different types of video are amenable to different types of compression.
-
Yes, though computer generated ("CG") 2d cell-type animations often lend well to lossless compression. Interframe forms are particularly helpful/efficient since cg methods have predictable motion.
Scott -
You don't need lossless for that, actually you want opposite of "lossless".
Use x264 or x265 encoder for video and AAC for audio, don't use lossless settings. Use "high quality" settings! -
lossless and uncompressed are different.
prores is lossy, but prores 4444 is considered virtually lossless but still lossy
lossless is considered intermediary, before final encode
so lossless video could be h264 lossless, lossless audio wav or aiff, no wrapper, for archival purpose (.h264, .wav, .aiff)
for general playback, encode to h264 crf 17 --slow, audio AAC 128kbps
wrapper mp4 or mkv -
Uncompressed is lossless (adjective)
You probably meant lossless compression is different than uncompressed (no compression) . They are different because one uses compression, one does not.
When you decompress a video that uses lossless compression - you get uncompressed - which is lossless. The determination of whether or not something is lossless is compared in the uncompressed state anyways -
-
Anonymous543Guest
How to calculate file size of raw image?
What data a raw image contains?
I want a simple file size calculation example..
Similar Threads
-
FFmpeg: Lossless video conversion from AVI to MP4 possible for ALL codecs ?
By pxstein in forum Video ConversionReplies: 1Last Post: 8th Feb 2022, 01:20 -
best lossless codecs for a 30m video made of mostly still pictures
By Sentinel166 in forum Newbie / General discussionsReplies: 6Last Post: 21st Dec 2021, 05:14 -
Does anyone here know how to use these lossless codecs?
By Guernsey in forum Newbie / General discussionsReplies: 16Last Post: 25th Jul 2021, 17:17 -
Corrupted output video from FFMPEG at high quality
By 31feesh in forum Newbie / General discussionsReplies: 6Last Post: 30th Jan 2021, 23:23 -
Incorrect video cut timing on MKV video with lossless quality
By may5224 in forum EditingReplies: 8Last Post: 19th Nov 2019, 15:02