Log in

View Full Version : Calculate SSIM or PSNR of video file with lost packets


mushahidh
11th April 2016, 22:51
Hi experts,
I am encoding my video using JM and with packetization mode RTP. I want to test effect of different videos under different packet loss ratios. But unfortunately only videos with 1% packet loss ratios are decode-able. The decoder fails to decode the video file if packet loss ratio is greater than 1%. But i want to see the effect of packet loss under 5% and 10% packet loss ratios by calculating their PSNR or SSIM after decoding with packet loss.
As ffmpeg not able to decode the video file with RTP header appended i have none other option than to decode using JM only.
IS there a way i can achieve this?

Sulik
11th April 2016, 23:27
Remove the RTP header and convert the file to a raw elementary stream.
You shouldn't use JM for this, it will easily crash when facing bitstream errors. Unless you have no motion PSNR will likely be quite low, as bitstream errors will usually be detected much later than where they actually occur (potentially causing a very different output than the original).

mushahidh
14th April 2016, 09:03
Remove the RTP header and convert the file to a raw elementary stream.
You shouldn't use JM for this, it will easily crash when facing bitstream errors. Unless you have no motion PSNR will likely be quite low, as bitstream errors will usually be detected much later than where they actually occur (potentially causing a very different output than the original).
Which decoder should i use after that? And How to make a complete frames from RtP packets?

foxyshadis
15th April 2016, 14:12
ffmpeg tries the hardest to recover from an error. Just stream it in and compare what it spits out with what you started with. Nearly all other decoders will just skip frames or to the next GOP if they encounter any corruption.