Playing an uncompressed raw interlaced RTP video stream

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Playing an uncompressed raw interlaced RTP video stream

villastar@yahoo.com.au
Hi, 

I am unable to get ffplay to play back a raw uncompressed interlaced
video from an RTP stream, coming from a camera feed. The camera
broadcasts the SDP using SAP, which I have been able to extract into
a local file. The contents of the SDP:

  v=0
  o=- 340496 340496 IN IP4 192.168.204.40
  s=Camera 2
  c=IN IP4 239.192.1.40/15
  t=0 0
  m=video 5004 RTP/AVP 97
  a=rtpmap:97 raw/90000
  a=fmtp:97 sampling=YCbCr-4:2:2; width=720; height=576; depth=8; colorimetry=BT601-5; interlace
  a=framerate:25

I am using the following command to play it back with ffplay:

  ffplay -protocol_whitelist file,rtp,udp -strict -2  -f sdp \
    camera2.sdp

This resulting image showed two almost identical images laid out
vertically. In order to show the results I am getting, I have also
recorded a small sample with the following:

  ffmpeg -protocol_whitelist file,rtp,udp -strict -2 -f sdp -i \
    camera2.sdp -t 5 -vf "scale=240x192,idet" camera2_sample.mp4

Note that I applied the scaling only to keep the file size small - the
resulting mp4 file is close to what I was seeing in ffplay. The file 
has been uploaded to my Dropbox at:

  https://www.dropbox.com/s/6kgfsie7rgfnoe7/camera2_sample.mp4?dl=0

The tail end of the output from FFmpeg at the end of the recording, 
including the output from idet:

  video:171kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.121141%
  [Parsed_idet_1 @ 000001d6ff69f4c0] Repeated Fields: Neither:  217 Top:    0 Bottom:    0
  [Parsed_idet_1 @ 000001d6ff69f4c0] Single frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0
  [Parsed_idet_1 @ 000001d6ff69f4c0] Multi frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0
  [libx264 @ 000001d680000500] frame I:2    Avg QP:18.69  size:  1068
  [libx264 @ 000001d680000500] frame P:127  Avg QP:28.83  size:  750
  [libx264 @ 000001d680000500] frame B:121  Avg QP:30.57  size:  638
  [libx264 @ 000001d680000500] consecutive B-frames: 10.0% 76.0%  1.2% 12.8%
  [libx264 @ 000001d680000500] mb I  I16..4: 77.2%  1.7% 21.1%
  [libx264 @ 000001d680000500] mb P  I16..4:  2.6%  6.1%  2.8%  P16..4: 13.2%  6.0%  2.8%  0.0%  0.0%    skip:66.5%
  [libx264 @ 000001d680000500] mb B  I16..4: 28.9%  2.5%  4.3%  B16..8:  7.2%  2.6%  0.6%  direct: 1.6%  skip:52.3%  L0:22.3% L1:76.0% BI: 1.7%
  [libx264 @ 000001d680000500] 8x8 transform intra:18.1% inter:34.7%
  [libx264 @ 000001d680000500] coded y,uvDC,uvAC intra: 18.1% 21.9% 11.9% inter: 8.7% 10.7% 2.7%
  [libx264 @ 000001d680000500] i16 v,h,dc,p: 69% 29%  1%  0%
  [libx264 @ 000001d680000500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  1% 29% 67%  0%  1%  1%  1%  0%  1%
  [libx264 @ 000001d680000500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 46% 21%  4%  4%  3%  5%  3%  5%
  [libx264 @ 000001d680000500] i8c dc,h,v,p: 66% 31%  1%  1%
  [libx264 @ 000001d680000500] Weighted P-Frames: Y:0.0% UV:0.0%
  [libx264 @ 000001d680000500] ref P L0: 45.1% 14.7% 31.6%  8.6%
  [libx264 @ 000001d680000500] ref B L0: 57.7% 42.3%
  [libx264 @ 000001d680000500] kb/s:279.35

I was suspecting that FFmpeg was not treating the interlacing 
correctly. Is there an option that I should be specifying? I have 
tried playing back with the yadif and tinterlace with similar 
results. The commands I used were:

  ffplay -protocol_whitelist file,rtp,udp -strict -2  -vf yadif=mode=1 \
    -f sdp camera2.sdp

and

  ffplay -protocol_whitelist file,rtp,udp -strict -2 -vf tinterlace=6 \
    -f sdp camera.sdp
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

PaulYurt
Are you certain the. camera output is interlaced? HD720 is typically progressive.

If you decode progressive as interlaced you would get two very similar images.

Paul Yurt

On Sep 26, 2018, at 8:15 AM, [hidden email] <[hidden email]> wrote:

Hi,

I am unable to get ffplay to play back a raw uncompressed interlaced
video from an RTP stream, coming from a camera feed. The camera
broadcasts the SDP using SAP, which I have been able to extract into
a local file. The contents of the SDP:

  v=0
  o=- 340496 340496 IN IP4 192.168.204.40
  s=Camera 2
  c=IN IP4 239.192.1.40/15
  t=0 0
  m=video 5004 RTP/AVP 97
  a=rtpmap:97 raw/90000
  a=fmtp:97 sampling=YCbCr-4:2:2; width=720; height=576; depth=8; colorimetry=BT601-5; interlace
  a=framerate:25

I am using the following command to play it back with ffplay:

  ffplay -protocol_whitelist file,rtp,udp -strict -2  -f sdp \
    camera2.sdp

This resulting image showed two almost identical images laid out
vertically. In order to show the results I am getting, I have also
recorded a small sample with the following:

  ffmpeg -protocol_whitelist file,rtp,udp -strict -2 -f sdp -i \
    camera2.sdp -t 5 -vf "scale=240x192,idet" camera2_sample.mp4

Note that I applied the scaling only to keep the file size small - the
resulting mp4 file is close to what I was seeing in ffplay. The file
has been uploaded to my Dropbox at:

  https://www.dropbox.com/s/6kgfsie7rgfnoe7/camera2_sample.mp4?dl=0

The tail end of the output from FFmpeg at the end of the recording,
including the output from idet:

  video:171kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.121141%
  [Parsed_idet_1 @ 000001d6ff69f4c0] Repeated Fields: Neither:  217 Top:    0 Bottom:    0
  [Parsed_idet_1 @ 000001d6ff69f4c0] Single frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0
  [Parsed_idet_1 @ 000001d6ff69f4c0] Multi frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0
  [libx264 @ 000001d680000500] frame I:2    Avg QP:18.69  size:  1068
  [libx264 @ 000001d680000500] frame P:127  Avg QP:28.83  size:  750
  [libx264 @ 000001d680000500] frame B:121  Avg QP:30.57  size:  638
  [libx264 @ 000001d680000500] consecutive B-frames: 10.0% 76.0%  1.2% 12.8%
  [libx264 @ 000001d680000500] mb I  I16..4: 77.2%  1.7% 21.1%
  [libx264 @ 000001d680000500] mb P  I16..4:  2.6%  6.1%  2.8%  P16..4: 13.2%  6.0%  2.8%  0.0%  0.0%    skip:66.5%
  [libx264 @ 000001d680000500] mb B  I16..4: 28.9%  2.5%  4.3%  B16..8:  7.2%  2.6%  0.6%  direct: 1.6%  skip:52.3%  L0:22.3% L1:76.0% BI: 1.7%
  [libx264 @ 000001d680000500] 8x8 transform intra:18.1% inter:34.7%
  [libx264 @ 000001d680000500] coded y,uvDC,uvAC intra: 18.1% 21.9% 11.9% inter: 8.7% 10.7% 2.7%
  [libx264 @ 000001d680000500] i16 v,h,dc,p: 69% 29%  1%  0%
  [libx264 @ 000001d680000500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  1% 29% 67%  0%  1%  1%  1%  0%  1%
  [libx264 @ 000001d680000500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 46% 21%  4%  4%  3%  5%  3%  5%
  [libx264 @ 000001d680000500] i8c dc,h,v,p: 66% 31%  1%  1%
  [libx264 @ 000001d680000500] Weighted P-Frames: Y:0.0% UV:0.0%
  [libx264 @ 000001d680000500] ref P L0: 45.1% 14.7% 31.6%  8.6%
  [libx264 @ 000001d680000500] ref B L0: 57.7% 42.3%
  [libx264 @ 000001d680000500] kb/s:279.35

I was suspecting that FFmpeg was not treating the interlacing
correctly. Is there an option that I should be specifying? I have
tried playing back with the yadif and tinterlace with similar
results. The commands I used were:

  ffplay -protocol_whitelist file,rtp,udp -strict -2  -vf yadif=mode=1 \
    -f sdp camera2.sdp

and

  ffplay -protocol_whitelist file,rtp,udp -strict -2 -vf tinterlace=6 \
    -f sdp camera.sdp
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

Carl Eugen Hoyos-2
In reply to this post by villastar@yahoo.com.au
2018-09-26 14:15 GMT+02:00, [hidden email]
<[hidden email]>:

> Hi,
>
> I am unable to get ffplay to play back a raw uncompressed interlaced
> video from an RTP stream, coming from a camera feed. The camera
> broadcasts the SDP using SAP, which I have been able to extract into
> a local file. The contents of the SDP:
>
>   v=0
>   o=- 340496 340496 IN IP4 192.168.204.40
>   s=Camera 2
>   c=IN IP4 239.192.1.40/15
>   t=0 0
>   m=video 5004 RTP/AVP 97
>   a=rtpmap:97 raw/90000
>   a=fmtp:97 sampling=YCbCr-4:2:2; width=720; height=576; depth=8;
> colorimetry=BT601-5; interlace
>   a=framerate:25
>
> I am using the following command to play it back with ffplay:
>
>   ffplay -protocol_whitelist file,rtp,udp -strict -2  -f sdp \
>     camera2.sdp

Complete, uncut console output missing.

> This resulting image showed two almost identical images laid out
> vertically.

This sounds like an issue that can be fixed with "-vf il=i" (or very
similar)...

> In order to show the results I am getting, I have also
> recorded a small sample with the following:
>
>   ffmpeg -protocol_whitelist file,rtp,udp -strict -2 -f sdp -i \
>     camera2.sdp -t 5 -vf "scale=240x192,idet" camera2_sample.mp4

But the file you provided looks completely broken / unfixable.

Is the only issue the missing interleaving?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

villastar@yahoo.com.au
In reply to this post by PaulYurt
> On Wednesday, 26 September 2018, 8:38:09 pm AWST, PaulYurt <[hidden email]> wrote:> > Are you certain the. camera output is interlaced? HD720 is typically progressive. > > If you decode progressive as interlaced you would get two very similar images. 
I believe it is. The documentation for camera states it sends PAL interlaced encoded using ITU-R BT.601 and ITU-R BT.656, using RFC 4175 RTP packets.
I tried capturing the RTP traffic over the network using Wireshark and examing it.The headers in the RTP look like they do conform to RFC 4175. A sample of the capture is at https://www.dropbox.com/s/l65o879qf2er3qi/camera_5.pcapng?dl=0. > Paul Yurt> > On Sep 26, 2018, at 8:15 AM, [hidden email] <[hidden email]> wrote:>> >> Hi, >> >> I am unable to get ffplay to play back a raw uncompressed interlaced>> video from an RTP stream, coming from a camera feed. The camera>> broadcasts the SDP using SAP, which I have been able to extract into>> a local file. The contents of the SDP:>> >>   v=0>>   o=- 340496 340496 IN IP4 192.168.204.40>>   s=Camera 2>>   c=IN IP4 239.192.1.40/15>>   t=0 0>>   m=video 5004 RTP/AVP 97>>   a=rtpmap:97 raw/90000>>   a=fmtp:97 sampling=YCbCr-4:2:2; width=720; height=576; depth=8; colorimetry=BT601-5; interlace>>   a=framerate:25>> >> I am using the following command to play it back with ffplay:>> >>   ffplay -protocol_whitelist file,rtp,udp -strict -2  -f sdp \>>     camera2.sdp>> >> This resulting image showed two almost identical images laid out>> vertically. In order to show the results I am getting, I have also>> recorded a small sample with the following:>> >>   ffmpeg -protocol_whitelist file,rtp,udp -strict -2 -f sdp -i \>>     camera2.sdp -t 5 -vf "scale=240x192,idet" camera2_sample.mp4>> >> Note that I applied the scaling only to keep the file size small - the>> resulting mp4 file is close to what I was seeing in ffplay. The file >> has been uploaded to my Dropbox at:>> >>   https://www.dropbox.com/s/6kgfsie7rgfnoe7/camera2_sample.mp4?dl=0>> >> The tail end of the output from FFmpeg at the end of the recording, >> including the output from idet:>> >>   video:171kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.121141%>>   [Parsed_idet_1 @ 000001d6ff69f4c0] Repeated Fields: Neither:  217 Top:    0 Bottom:    0>>   [Parsed_idet_1 @ 000001d6ff69f4c0] Single frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0>>   [Parsed_idet_1 @ 000001d6ff69f4c0] Multi frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0>>   [libx264 @ 000001d680000500] frame I:2    Avg QP:18.69  size:  1068>>   [libx264 @ 000001d680000500] frame P:127  Avg QP:28.83  size:  750>>   [libx264 @ 000001d680000500] frame B:121  Avg QP:30.57  size:  638>>   [libx264 @ 000001d680000500] consecutive B-frames: 10.0% 76.0%  1.2% 12.8%>>   [libx264 @ 000001d680000500] mb I  I16..4: 77.2%  1.7% 21.1%>>   [libx264 @ 000001d680000500] mb P  I16..4:  2.6%  6.1%  2.8%  P16..4: 13.2%  6.0%  2.8%  0.0%  0.0%    skip:66.5%>>   [libx264 @ 000001d680000500] mb B  I16..4: 28.9%  2.5%  4.3%  B16..8:  7.2%  2.6%  0.6%  direct: 1.6%  skip:52.3%  L0:22.3% L1:76.0% BI: 1.7%>>   [libx264 @ 000001d680000500] 8x8 transform intra:18.1% inter:34.7%>>   [libx264 @ 000001d680000500] coded y,uvDC,uvAC intra: 18.1% 21.9% 11.9% inter: 8.7% 10.7% 2.7%>>   [libx264 @ 000001d680000500] i16 v,h,dc,p: 69% 29%  1%  0%>>   [libx264 @ 000001d680000500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  1% 29% 67%  0%  1%  1%  1%  0%  1%>>   [libx264 @ 000001d680000500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 46% 21%  4%  4%  3%  5%  3%  5%>>   [libx264 @ 000001d680000500] i8c dc,h,v,p: 66% 31%  1%  1%>>   [libx264 @ 000001d680000500] Weighted P-Frames: Y:0.0% UV:0.0%>>   [libx264 @ 000001d680000500] ref P L0: 45.1% 14.7% 31.6%  8.6%>>   [libx264 @ 000001d680000500] ref B L0: 57.7% 42.3%>>   [libx264 @ 000001d680000500] kb/s:279.35>> >> I was suspecting that FFmpeg was not treating the interlacing >> correctly. Is there an option that I should be specifying? I have >> tried playing back with the yadif and tinterlace with similar >> results. The commands I used were:>> >>   ffplay -protocol_whitelist file,rtp,udp -strict -2  -vf yadif=mode=1 \>>     -f sdp camera2.sdp>> >> and>> >>   ffplay -protocol_whitelist file,rtp,udp -strict -2 -vf tinterlace=6 \>>     -f sdp camera.sdp>> _______________________________________________>> ffmpeg-user mailing list>> [hidden email]>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user>> >> To unsubscribe, visit link above, or email>> [hidden email] with subject "unsubscribe".>> _______________________________________________>> ffmpeg-user mailing list>> [hidden email]>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user>> >> To unsubscribe, visit link above, or email>> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

villastar@yahoo.com.au
In reply to this post by PaulYurt
My apologies to everyone on the mailing list - it seemed the formatting in my last
email was broken.

> On Wednesday, 26 September 2018, 8:38:09 pm AWST, PaulYurt <[hidden email]> wrote:

> Are you certain the. camera output is interlaced? HD720 is typically progressive. 

> If you decode progressive as interlaced you would get two very similar images. 

I believe it is. The documentation for camera states it sends PAL interlaced 
encoded using ITU-R BT.601 and ITU-R BT.656, using RFC 4175 RTP packets.

I tried capturing the RTP traffic over the network using Wireshark and examing it.
The headers in the RTP look like they do conform to RFC 4175. A sample of the 
capture is at https://www.dropbox.com/s/l65o879qf2er3qi/camera_5.pcapng?dl=0.
 

> Paul Yurt

> On Sep 26, 2018, at 8:15 AM, [hidden email] <[hidden email]> wrote:
>> 
>> Hi, 
>> 
>> I am unable to get ffplay to play back a raw uncompressed interlaced
>> video from an RTP stream, coming from a camera feed. The camera
>> broadcasts the SDP using SAP, which I have been able to extract into
>> a local file. The contents of the SDP:
>> 
>>   v=0
>>   o=- 340496 340496 IN IP4 192.168.204.40
>>   s=Camera 2
>>   c=IN IP4 239.192.1.40/15
>>   t=0 0
>>   m=video 5004 RTP/AVP 97
>>   a=rtpmap:97 raw/90000
>>   a=fmtp:97 sampling=YCbCr-4:2:2; width=720; height=576; depth=8; colorimetry=BT601-5; interlace
>>   a=framerate:25
>> 
>> I am using the following command to play it back with ffplay:
>> 
>>   ffplay -protocol_whitelist file,rtp,udp -strict -2  -f sdp \
>>     camera2.sdp
>> 
>> This resulting image showed two almost identical images laid out
>> vertically. In order to show the results I am getting, I have also
>> recorded a small sample with the following:
>> 
>>   ffmpeg -protocol_whitelist file,rtp,udp -strict -2 -f sdp -i \
>>     camera2.sdp -t 5 -vf "scale=240x192,idet" camera2_sample.mp4
>> 
>> Note that I applied the scaling only to keep the file size small - the
>> resulting mp4 file is close to what I was seeing in ffplay. The file 
>> has been uploaded to my Dropbox at:
>> 
>>   https://www.dropbox.com/s/6kgfsie7rgfnoe7/camera2_sample.mp4?dl=0
>> 
>> The tail end of the output from FFmpeg at the end of the recording, 
>> including the output from idet:
>> 
>>   video:171kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.121141%
>>   [Parsed_idet_1 @ 000001d6ff69f4c0] Repeated Fields: Neither:  217 Top:    0 Bottom:    0
>>   [Parsed_idet_1 @ 000001d6ff69f4c0] Single frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0
>>   [Parsed_idet_1 @ 000001d6ff69f4c0] Multi frame detection: TFF:    0 BFF:    0 Progressive:  217 Undetermined:    0
>>   [libx264 @ 000001d680000500] frame I:2    Avg QP:18.69  size:  1068
>>   [libx264 @ 000001d680000500] frame P:127  Avg QP:28.83  size:  750
>>   [libx264 @ 000001d680000500] frame B:121  Avg QP:30.57  size:  638
>>   [libx264 @ 000001d680000500] consecutive B-frames: 10.0% 76.0%  1.2% 12.8%
>>   [libx264 @ 000001d680000500] mb I  I16..4: 77.2%  1.7% 21.1%
>>   [libx264 @ 000001d680000500] mb P  I16..4:  2.6%  6.1%  2.8%  P16..4: 13.2%  6.0%  2.8%  0.0%  0.0%    skip:66.5%
>>   [libx264 @ 000001d680000500] mb B  I16..4: 28.9%  2.5%  4.3%  B16..8:  7.2%  2.6%  0.6%  direct: 1.6%  skip:52.3%  L0:22.3% L1:76.0% BI: 1.7%
>>   [libx264 @ 000001d680000500] 8x8 transform intra:18.1% inter:34.7%
>>   [libx264 @ 000001d680000500] coded y,uvDC,uvAC intra: 18.1% 21.9% 11.9% inter: 8.7% 10.7% 2.7%
>>   [libx264 @ 000001d680000500] i16 v,h,dc,p: 69% 29%  1%  0%
>>   [libx264 @ 000001d680000500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  1% 29% 67%  0%  1%  1%  1%  0%  1%
>>   [libx264 @ 000001d680000500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 46% 21%  4%  4%  3%  5%  3%  5%
>>   [libx264 @ 000001d680000500] i8c dc,h,v,p: 66% 31%  1%  1%
>>   [libx264 @ 000001d680000500] Weighted P-Frames: Y:0.0% UV:0.0%
>>   [libx264 @ 000001d680000500] ref P L0: 45.1% 14.7% 31.6%  8.6%
>>   [libx264 @ 000001d680000500] ref B L0: 57.7% 42.3%
>>   [libx264 @ 000001d680000500] kb/s:279.35
>> 
>> I was suspecting that FFmpeg was not treating the interlacing 
>> correctly. Is there an option that I should be specifying? I have 
>> tried playing back with the yadif and tinterlace with similar 
>> results. The commands I used were:
>> 
>>   ffplay -protocol_whitelist file,rtp,udp -strict -2  -vf yadif=mode=1 \
>>     -f sdp camera2.sdp
>> 
>> and
>> 
>>   ffplay -protocol_whitelist file,rtp,udp -strict -2 -vf tinterlace=6 \
>>     -f sdp camera.sdp
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>> 
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>> 
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

villastar@yahoo.com.au
In reply to this post by Carl Eugen Hoyos-2
 On Wednesday, 26 September 2018, 11:31:00 pm AWST, Carl Eugen Hoyos <[hidden email]> wrote: 

> 2018-09-26 14:15 GMT+02:00, [hidden email]
> <[hidden email]>:
>> Hi,
>>
>> I am unable to get ffplay to play back a raw uncompressed interlaced
>> video from an RTP stream, coming from a camera feed. The camera
>> broadcasts the SDP using SAP, which I have been able to extract into
>> a local file. The contents of the SDP:
>>
>>  v=0
>>  o=- 340496 340496 IN IP4 192.168.204.40
>>  s=Camera 2
>>  c=IN IP4 239.192.1.40/15
>>  t=0 0
>>  m=video 5004 RTP/AVP 97
>>  a=rtpmap:97 raw/90000
>>  a=fmtp:97 sampling=YCbCr-4:2:2; width=720; height=576; depth=8;
>> colorimetry=BT601-5; interlace
>>  a=framerate:25
>>
>> I am using the following command to play it back with ffplay:
>>
>>  ffplay -protocol_whitelist file,rtp,udp -strict -2  -f sdp \
>>    camera2.sdp

> Complete, uncut console output missing.

This is the console ouptut when I set it to play for 3 seconds:

$ ffplay -protocol_whitelist file,rtp,udp -strict -2 -t 3 -f sdp camera.sdp
ffplay version 4.0.2 Copyright (c) 2003-2018 the FFmpeg developers
  built with gcc 7.3.1 (GCC) 20180722
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
[udp @ 000001ef28178800] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001ef28188ac0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[sdp @ 000001ef28167840] jitter buffer full   0KB sq=    0B f=0/0
[sdp @ 000001ef28167840] RTP: missed 6 packets
[sdp @ 000001ef28167840] Missed previous RTP Marker
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
Input #0, sdp, from 'camera.sdp':
  Metadata:
    title           : Camera 1
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: bitpacked (UYVY / 0x59565955), uyvy422, 720x576, 50 fps, 50 tbr, 90k tbn, 90k tbc
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=1/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] jitter buffer full   0KB sq=    0B f=0/0
[sdp @ 000001ef28167840] RTP: missed 152 packets
[sdp @ 000001ef28167840] Missed previous RTP Marker
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] jitter buffer full   0KB sq=    0B f=0/0
[sdp @ 000001ef28167840] RTP: missed 153 packets
[sdp @ 000001ef28167840] Missed previous RTP Marker
    Last message repeated 1 times
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0

[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 000001ef28167840] Missed previous RTP Markerq=    0B f=0/0
   4.75 M-V:  1.271 fd=   3 aq=    0KB vq=    0KB sq=    0B f=0/0

The only thing I noticed in the log was that it was picking up the
frames at 50fps, but the frame rate is listed as 25fps in the SDP. I
did another run with the log level set to trace, but didn't see
anything about it detecting it as being interlaced. The trace log is
at https://www.dropbox.com/s/6hr6pdflslnvn82/ffplay-trace.log

>> This resulting image showed two almost identical images laid out
>> vertically.

> This sounds like an issue that can be fixed with "-vf il=i" (or very
> similar)...

I'll try playing around with with "il" when I get a chance.

> Is the only issue the missing interleaving?

Yes, I believe this is the only problem I am having. According to the
camera's documentation, it is a PAL video encoded using ITU-R BT.601
and ITU-R BT.656 with interleaving. The RTP packets should be using
RFC 4175. I captured the RTP network traffic with Wireshark, which I
have uploaded to 
https://www.dropbox.com/s/l65o879qf2er3qi/camera_5.pcapng?dl=0.

From reading the RFC 4175, I was starting to think that FFmpeg may be
reading the frames / fields incorrectly. Under 3. Payload Design, it
says for interlaced or BT. 656 field, it uses one range of lines for
field 1 and another range of lines for field 2. For example, BT.656
uses lines 24 to 310 for field 1 and lines 337 to 623 for field 2.
From what I have been observing, I was guessing that FFmpeg may be
interpreting these fields as separate frames instead, with the images
displayed in corresponding ranges (giving me the two almost identical
images laid out vertically I mentioned earlier).
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

Carl Eugen Hoyos-2
2018-09-27 16:36 GMT+02:00, [hidden email]
<[hidden email]>:

> I'll try playing around with with "il" when I get a chance.

Please do, if it works your problem should be solved,
I fear though that the "bitpacked" codec (the name alone
makes me shiver) is broken and needs major changes.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

villastar@yahoo.com.au
 On Friday, 28 September 2018, 6:01:08 am AWST, Carl Eugen Hoyos <[hidden email]> wrote:

> Please do, if it works your problem should be solved,
> I fear though that the "bitpacked" codec (the name alone
> makes me shiver) is broken and needs major changes.

In the past, we have used the same command to playback a raw 
uncompressed, non-interlaced RTP stream before with success. It is 
only when we tried it with an interlaced version that we encountered
this problem.

I also got around to trying the filter today - the playback still isn't 
quite right. From the console:

$ ffplay -protocol_whitelist file,rtp,udp -strict -2 -vf "il=i" -f sdp camera.sdp

ffplay version 4.0.2 Copyright (c) 2003-2018 the FFmpeg developers
  built with gcc 7.3.1 (GCC) 20180722
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
[udp @ 0000017923e68740] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0000017923e78a00] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[sdp @ 0000017923e57840] jitter buffer full   0KB sq=    0B f=0/0
[sdp @ 0000017923e57840] RTP: missed 4 packets
[sdp @ 0000017923e57840] Missed previous RTP Marker
    Last message repeated 1 times
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
Input #0, sdp, from 'camera.sdp':
  Metadata:
    title           : Camera 1
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: bitpacked (UYVY / 0x59565955), uyvy422, 720x576, 50 fps, 50 tbr, 90k tbn, 90k tbc
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0
[sdp @ 0000017923e57840] Missed previous RTP Markerq=    0B f=0/0

This time I used my phone camera to record the playback on my computer
screen. It can be viewed at:

  https://www.dropbox.com/s/phx9iagb6k3qdtr/playback_with_filter_resized.mp4?dl=0

For comparison, I went back and also recorded one without using the 
filter. The footage is at:

  https://www.dropbox.com/s/ixr33gsi2q5h0w9/playback_no_filter_resized.mp4?dl=0

> Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Playing an uncompressed raw interlaced RTP video stream

Carl Eugen Hoyos-2
2018-09-28 16:38 GMT+02:00, [hidden email]
<[hidden email]>:

>  On Friday, 28 September 2018, 6:01:08 am AWST, Carl Eugen Hoyos
> <[hidden email]> wrote:
>
>> Please do, if it works your problem should be solved,
>> I fear though that the "bitpacked" codec (the name alone
>> makes me shiver) is broken and needs major changes.
>
> In the past, we have used the same command to playback a raw
> uncompressed, non-interlaced RTP stream before with success. It is
> only when we tried it with an interlaced version that we encountered
> this problem.
>
> I also got around to trying the filter today - the playback still isn't
> quite right.

This is what I feared.
The way the progressive decoding was implemented is broken so
much that it may not be trivial to fix.

Feel free to open a ticket on trac.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".