Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Nov 2015
Posts: 29
|
Is there a way to see video after applying packet loss
I have encoded a video stream using JM using RTP. Then i have applied rtp_loss on it but after that i am unable to decode video. Like in this example a video with different packet loss percentages are depicted. I want to apply packet loss on H.264 RTP stream than want to decode it. But whenever i want to decode using JM it is unable to handle it. I have heard that Netem could be an option but i am not using Linux. So Is there a way to apply packet loss on video and than see how video quality is changed after it like in the example gif link given above?
|
![]() |
![]() |
![]() |
#2 | Link |
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,257
|
What about the FFmpeg decoder? Or just use VLC, MPlayer, MPC-HC, etc. pp.
![]()
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
![]() |
![]() |
![]() |
#3 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
How the video 'looks' with bad data depends on how the decoder has been programmed.
A decoder might try to 'conceal' a bad block by repeating the block from the previous (or next) frame. If there are many bad blocks, it might repeat the whole frame. As a last resort it might return black frame(s) and hope the stream returns to normal soon. A different decoder may do more error concealment, or less. Point is, there is no particular way a video with bad data will look, unless you control the decoding. BTW the transmission medium (eg videotape, blu-ray, satellite) might scramble the blocks in space and time, so a big data dropout is broken into many small chunks which are more easily concealed. This again changes how the video 'looks'. EDIT if you don't like the answers you have gotten so far, perhaps you should explain what you are trying to do exactly. For my part, my answer was intended to give you some search terms to find more detailed information. I supposed that if you were compiling a reference codec and injecting errors into the data stream, you were hardly a newbie. Last edited by raffriff42; 27th January 2016 at 22:38. |
![]() |
![]() |
![]() |
#7 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,060
|
Some players just give up when they come across corrupt/bad streams, others can conceal damage and continue when good stream re-established.
DVD players expect good stream always (as from disk) whereas internet or TV transmission streams have to be fault tolerant and player should be able to re-establish decoding when bad packets have gone by (whether or not they were able to conceal errors).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
#8 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
well yeah, except they are expected to play through dust, scratches, fingerprints...
You're probably right about streaming decoders being the most fault tolerant. Last edited by raffriff42; 28th January 2016 at 14:50. |
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Nov 2015
Posts: 29
|
Quote:
Right now in JM after packet loss When i want to decode video it shows me warning i.e RTP sequence number discontinuity detected and stop decoding the video. |
|
![]() |
![]() |
![]() |
#10 | Link | |
Registered User
Join Date: Nov 2015
Posts: 29
|
Quote:
1) Encode video using any H.264 encoder 2) Add redundant bits with each frame to achieve better visual quality after packet loss. 3) Apply packet loss. 4) Perform error correction 5) Decode video Right now i am encoding a video and applying packet loss on it but unable to decode video after packet loss . I haven't added any redundancy with frames but I want to simulate the difference is visual quality after and before adding Redundant bits in video. I hope you understand my problem and suggest me a way to go. |
|
![]() |
![]() |
![]() |
#11 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
To play a video stream which has errors, you will need error correction and/or error concealment, or decoding will simply fail as you have seen. Error correction first, and if the errors are not correctable, error concealment. The simplest possible way to handle uncorrectable data is to keep showing the last good frame, or show blank frames. Not pretty, but better than crashing.
After that it gets very complicated. I am not an expert in this topic! Perhaps look at existing open source decoders to see what they do. |
![]() |
![]() |
![]() |
#12 | Link | |
Registered User
Join Date: Nov 2015
Posts: 29
|
Quote:
Code:
ConcealMode = 1 # Err Concealment(0:Off,1:Frame Copy,2:Motion Copy) Last edited by mushahidh; 28th January 2016 at 20:06. |
|
![]() |
![]() |
![]() |
#13 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,441
|
Try not simulating packet loss for the first few frames at least. How evenly spaced is your 2%? Losing a tiny bit from everything will cause nothing to work.
__________________
madVR options explained |
![]() |
![]() |
![]() |
#14 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,373
|
FWIW the FFmpeg decoder is considered to have very good error concealment, but depending on what you drop you might still end up with a undecodable stream.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
![]() |
![]() |
![]() |
#15 | Link | |
Registered User
Join Date: Nov 2015
Posts: 29
|
Quote:
Code:
rtp_loss video1.264 video2.264 2 70 But in case of using error correction code like reed solomon code at frame level to recover packet loss should i add redundancy during encoding or after encoding of video? |
|
![]() |
![]() |
![]() |
#17 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,060
|
JFYI, about the best (fault tolerant) decoder that I have found is the PotPlayer media player.
(also seems to be constantly improving fault tolerance) GOM player seems to edit some bad streams where it finds corruption. Current ffmpeg seems to have improved fault tolerance over previous versions.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
#18 | Link | |
Registered User
Join Date: Nov 2015
Posts: 29
|
Quote:
|
|
![]() |
![]() |
![]() |
#19 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,060
|
I did a search and could find little about opening rtp, just this:- https://potplayer.daum.net/forum/sea...p?keywords=rtp
Perhaps post in Daum forum, probably best bet, good luck. EDIT: The poster did not respond to request for links, but due to request for links by user csumi, looks like it may be possible.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
#20 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,060
|
OK, I did google search on "rtp sample url", and found the below link
rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov In PotPlayer, Menu Open/Open Url, and copied link into the url link item, clicked OK, and it played the linked movie (big Buck Bunny). EDIT: The first few links from above google search will probably be of interest.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 30th January 2016 at 18:46. |
![]() |
![]() |
![]() |
Tags |
h.264, packet loss, video codec |
Thread Tools | Search this Thread |
Display Modes | |
|
|