VideoHelp Forum

+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member
    Join Date
    Sep 2015
    Location
    United States
    Search PM
    For example, lets say I download a stream with VLC, then with JDownloader, and they complete with different file sizes. How can the files be different sizes if they're not set to convert anything?

    This happens with other downloaders to, such as, youtube-dl, IDM, etc...

    I'm trying to understand if it's me missing a setting, or if there's a logical reason why a supposedly untouched video could be a different size depending on the program.
    Quote Quote  
  2. Multiplexing the audio and video streams often involves padding to better align data for quicker access. Different programs may pad differently. And they may include different metadata. And of course, different containers have different overhead.
    Quote Quote  
  3. Member
    Join Date
    Sep 2015
    Location
    United States
    Search PM
    Originally Posted by jagabo View Post
    Multiplexing the audio and video streams often involves padding to better align data for quicker access. Different programs may pad differently. And they may include different metadata. And of course, different containers have different overhead.
    I see. Thanks for mentioning that. So could the padding process affect the video stream bitrate as well? I've also noticed a larger discrepancy between two downloaders results when an HLS stream is comprised of a lot of parts. I'm not sure if that's correlated or not either.
    Quote Quote  
  4. Some downloaders re-encode the audio or video streams on the fly based on your output preference. Check to see that you are not re-encoding.
    Quote Quote  
  5. Member
    Join Date
    Sep 2015
    Location
    United States
    Search PM
    Originally Posted by blud7 View Post
    Some downloaders re-encode the audio or video streams on the fly based on your output preference. Check to see that you are not re-encoding.
    I tried to make sure as best I could that no re-encoding was occurring throughout my testing.

    With VLC, I can check a box that allows it to "keep original" for the video and audio streams. With youtube-dl I can add strings to the commands to ensure it doesn't re-encode. But nonetheless, they both produce different sized files of the same stream. Doesn't make sense...
    Quote Quote  
  6. You can always verify if the actual video and audio streams are identical with various tools. MSU VQMT, ffmpeg, AviSynth, etc.
    Quote Quote  
  7. Member
    Join Date
    Sep 2015
    Location
    United States
    Search PM
    Originally Posted by jagabo View Post
    You can always verify if the actual video and audio streams are identical with various tools. MSU VQMT, ffmpeg, AviSynth, etc.
    I'm not familiar with any of those, besides ffmpeg. Would you mind elaborating on which tool would be easiest to work with and how I could use it for verifying video/audio streams?
    Quote Quote  
  8. Here's a batch file that uses ffmpeg to calculate a psnr value:
    Code:
    "g:\program files\ffmpeg64\bin\ffmpeg" -i %1 -i %2 -lavfi "[0:v][1:v]psnr" -f null -
    Pause
    Put that text in batch file. Change the path to wherever ffmpeg is on your computer. Then drag/drop a pair of videos onto the batch file. The higher the PSNR value the more similar they are. A perfect match is "inf".
    Quote Quote  
  9. Member
    Join Date
    Sep 2015
    Location
    United States
    Search PM
    Originally Posted by jagabo View Post
    Here's a batch file that uses ffmpeg to calculate a psnr value:
    Code:
    "g:\program files\ffmpeg64\bin\ffmpeg" -i %1 -i %2 -lavfi "[0:v][1:v]psnr" -f null -
    Pause
    Put that text in batch file. Change the path to wherever ffmpeg is on your computer. Then drag/drop a pair of videos onto the batch file. The higher the PSNR value the more similar they are. A perfect match is "inf".
    Thanks for the batch file. I'm not sure if I did something incorrectly or if my ffmpeg build is missing something, but I get the following output when I run the batch file:

    C:\Windows\system32>"c:\program files\ffmpeg64\bin\ffmpeg" -i -i -lavfi "[0:v][1:v]psnr" -f null -
    ffmpeg version 2022-06-22-git-fed07efcde-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
    built with gcc 11.3.0 (Rev1, Built by MSYS2 project)
    configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
    libavutil 57. 27.100 / 57. 27.100
    libavcodec 59. 33.100 / 59. 33.100
    libavformat 59. 25.100 / 59. 25.100
    libavdevice 59. 6.100 / 59. 6.100
    libavfilter 8. 41.100 / 8. 41.100
    libswscale 6. 6.100 / 6. 6.100
    libswresample 4. 6.100 / 4. 6.100
    libpostproc 56. 5.100 / 56. 5.100
    -i: No such file or directory

    C:\Windows\system32>Pause
    Press any key to continue . . .
    Quote Quote  
  10. C:\Windows\system32>"c:\program files\ffmpeg64\bin\ffmpeg" -i -i -lavfi "[0:v][1:v]psnr" -f null -
    That indicates you ran the batch file with no inputs. You have to drag and drop a pair of videos onto the batch file -- so it knows which two files to compare.
    Quote Quote  
  11. Member
    Join Date
    Sep 2015
    Location
    United States
    Search PM
    Originally Posted by jagabo View Post
    C:\Windows\system32>"c:\program files\ffmpeg64\bin\ffmpeg" -i -i -lavfi "[0:v][1:v]psnr" -f null -
    That indicates you ran the batch file with no inputs. You have to drag and drop a pair of videos onto the batch file -- so it knows which two files to compare.
    Thanks for clarifying. I was dragging them into the open window of the batch file instead of dragging them on to the batch file icon.

    I ran a file that was 2897 MB when downloaded though VLC and 2857 MB when downloaded though youtube-dl. The PSNR value was indeed "inf". This would indicate that even though there's a 40 MB difference between the two files, with different audio and video bitrates, they're still exactly the same quality?
    Quote Quote  
  12. Originally Posted by DWreck1995 View Post
    I ran a file that was 2897 MB when downloaded though VLC and 2857 MB when downloaded though youtube-dl. The PSNR value was indeed "inf". This would indicate that even though there's a 40 MB difference between the two files, with different audio and video bitrates, they're still exactly the same quality?
    Yes. A PSNR around 50 is a pretty good (re)encoding. Around 40 is youtube quality. Lower than that is getting pretty bad. Also, the videos must have the same properties: the same frame size, same number of frames, etc.

    The bitrate reported by different programs can vary depending on many factors. Don't count on it being accurate.
    Quote Quote  
  13. Member
    Join Date
    Sep 2015
    Location
    United States
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by DWreck1995 View Post
    I ran a file that was 2897 MB when downloaded though VLC and 2857 MB when downloaded though youtube-dl. The PSNR value was indeed "inf". This would indicate that even though there's a 40 MB difference between the two files, with different audio and video bitrates, they're still exactly the same quality?
    Yes. A PSNR around 50 is a pretty good (re)encoding. Around 40 is youtube quality. Lower than that is getting pretty bad. Also, the videos must have the same properties: the same frame size, same number of frames, etc.

    The bitrate reported by different programs can vary depending on many factors. Don't count on it being accurate.
    So if there was any differences than the higher the number the more alike they are? Does it also specify which of the two would be the higher quality one as well?

    That's interesting. I've been using MediaInfo to compare them to see what differences they may have. I didn't know that the bitrate could be so unreliable.
    Quote Quote  
  14. Originally Posted by DWreck1995 View Post
    So if there was any differences than the higher the number the more alike they are?
    Yes.

    Originally Posted by DWreck1995 View Post
    Does it also specify which of the two would be the higher quality one as well?
    No. Though, in the way it's usually used (comparing an encoded video to the original) you already know which is of higher quality.
    Quote Quote  



Similar Threads