VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 48
Thread
  1. Anonymous543
    Guest
    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..
    Quote Quote  
  2. uncompressed rgb, uncompressed pcm, avi.
    Quote Quote  
  3. Anonymous543
    Guest
    Originally Posted by jagabo View Post
    uncompressed rgb, uncompressed pcm, avi.
    Any tutorial on how can I do that??..
    I mean how can I convert 288png images to uncompressed rgb and audio to uncompressed pcm and then wrap in avi?
    Quote Quote  
  4. 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)
    Quote Quote  
  5. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    "Lossless"
    Quote Quote  
  6. 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.
    Quote Quote  
  7. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    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.
    Quote Quote  
  8. Anonymous543
    Guest
    Originally Posted by poisondeathray View Post
    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)

    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.
    Does .avi wrapper can contain any codec?




    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
    Yes this is what i want..every png should convert into a frame and play at 24frame per second in sync with audio. I don't want any slideshow software
    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.
    Quote Quote  
  9. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    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.
    Quote Quote  
  10. Originally Posted by kirito View Post
    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
    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
    Quote Quote  
  11. Originally Posted by kirito View Post
    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
    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.
    Quote Quote  
  12. MOV container supports PNG. If you use something like VLC for your phone and computer it should play

    Code:
    ffmpeg  -r 24 -i input%03d.png -i audio.ext -c:v png -c:a pcm_s16le output.mov
    Quote Quote  
  13. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    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)
    Image Attached Files
    Quote Quote  
  14. 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...
    Image Attached Files
    Last edited by jagabo; 21st May 2022 at 10:29. Reason: added lagarith.avi
    Quote Quote  
  15. 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
    Quote Quote  
  16. Anonymous543
    Guest
    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
    i got 289 png images
    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 08:00. Reason: correction in code
    Quote Quote  
  17. Originally Posted by kirito View Post
    1st when i converted video to png why its color space changed YUV to RGB?
    Because PNG images are RGB.

    Originally Posted by kirito View Post
    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..)
    There is no best, only choices.

    Originally Posted by kirito View Post
    3rd any one explain is it possible to convert RGB sequences to YUV without lossing quality?
    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.

    Originally Posted by kirito View Post
    4th for videos which color space is best RGB or YUV?
    There is no best, only choices.

    Originally Posted by kirito View Post
    5th RGB or YUV which color space takes low file size?
    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 09:11.
    Quote Quote  
  18. Originally Posted by kirito View Post

    4th for videos which color space is best RGB or YUV?
    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 ?
    Quote Quote  
  19. Anonymous543
    Guest
    Originally Posted by jagabo View Post
    What's the point of converting your AVC source to some lossless codec via PNG images?
    Am trying to understand how a basic animation and video/audio codec works..

    Originally Posted by jagabo View Post
    Why are you obsessed with lossless encoding?
    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.
    Quote Quote  
  20. Originally Posted by kirito View Post
    Originally Posted by jagabo View Post
    Why are you obsessed with lossless encoding?
    because i wanna make a small but high quality 2d animation by my own.
    Small and lossless usually don't go together. There are particular circumstances where they can. See the samples I posted in post #14.

    Originally Posted by kirito View Post
    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.
    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.

    Originally Posted by kirito View Post
    i want a basic simple codec that is easy to understand.
    Then use Lagarith.

    But beware, outside a PC most players will not play lagarith or any of the lossless codecs.
    Quote Quote  
  21. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    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.

    Scott
    Last edited by Cornucopia; 21st May 2022 at 10:57.
    Quote Quote  
  22. 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.
    Quote Quote  
  23. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    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
    Quote Quote  
  24. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by kirito View Post
    Originally Posted by jagabo View Post
    Why are you obsessed with lossless encoding?
    because i wanna make a small but high quality
    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!
    Quote Quote  
  25. best lossless audio codec - flac
    best lossless video codec - ProRes
    Quote Quote  
  26. Originally Posted by s-mp View Post
    best lossless audio codec - flac
    best lossless video codec - ProRes
    Prores is lossy
    Quote Quote  
  27. 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
    Quote Quote  
  28. Originally Posted by 4kblurayguru View Post
    lossless and uncompressed are different.
    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
    Quote Quote  
  29. Originally Posted by poisondeathray View Post
    Originally Posted by s-mp View Post
    best lossless audio codec - flac
    best lossless video codec - ProRes
    Prores is lossy
    also "playback should not face difficulities" is far away from prores as its not part of most OS by default
    Quote Quote  
  30. Anonymous543
    Guest
    How to calculate file size of raw image?
    What data a raw image contains?

    I want a simple file size calculation example..
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!