Ticket #370 (closed task: needs_more_info)

Opened 22 months ago

Last modified 19 months ago

Unable to decode packet capture into .AVI.

Reported by: gogasca Owned by: michael
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I have the following:
Cisco CTS 1.7.4 calling Blue Jeans (BJN) which is a cloud services Video conference solution.
We have pixilation when calling them so we need to perform packet captures and reproduce the video.
We capture the video in CTS itself.
CTS uses 1280x720p H264
In SDP.
Media Attribute (a): fmtp:97 profile-level-id=42001F;packetization-mode=0;max-mbps=108000;max-fs=3600;max-br=4000

Once I have the packet capture, I started capturing when the call starts till the call ends.
Using tcpdump
I used videosnarf to convert to H264.
And I get the following:

[root@maradona video]# ffmpeg -i H264-media-1.264 -v 9 -loglevel 99 video1.avi
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers

built on Jul 27 2011 22:58:44 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration:
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.11. 0 / 0.11. 0

[h264 @ 0xa62f5f0]missing picture in access unit
[h264 @ 0xa62e420]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, h264, from 'H264-media-1.264':

Duration: N/A, bitrate: N/A

Stream #0.0: Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 90k tbr, 1200k tbn, 180k tbc

File 'video1.avi' already exists. Overwrite ? [y/N] y
[mpeg4 @ 0xa6328f0]removing common factors from framerate
[mpeg4 @ 0xa6328f0]timebase not supported by mpeg 4 standard
Output #0, avi, to 'video1.avi':

Stream #0.0, 0, 1/90000: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 1/90000, q=2-31, 200 kb/s, 90k tbn, 90k tbc

Stream mapping:

Stream #0.0 -> #0.0

Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

I tried -r 15,29 or 30 and generates a 16K file which is empty.

Attachments

interop2.pcap Download (1.5 MB) - added by gogasca 22 months ago.
Complete packet capture
bjn1.pcap Download (1.5 MB) - added by gogasca 22 months ago.
bjn1IN.pcap Download (656.5 KB) - added by gogasca 22 months ago.
DOES NOT WORK
bjn1OUT.pcap Download (511.9 KB) - added by gogasca 22 months ago.
WORKS

Change History

Changed 22 months ago by gogasca

Complete packet capture

comment:1 Changed 22 months ago by gogasca

I grabbed another packet capture:
bjn1.pcap
If you filtered in wireshark: udp.srcport == 30088
you will see packets from cts to bjn (cisco CTS to Blue Jeans)
I convert that fine.
When i do the other way: from bjn to cts does not work same error:
udp.srcport == 50782

[root@maradona video]# ffmpeg -i H264-media-1.264 bnj1IN.avi
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers

built on Jul 27 2011 22:58:44 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration:
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.11. 0 / 0.11. 0

[h264 @ 0x8c6d5f0]missing picture in access unit
[h264 @ 0x8c6c420]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, h264, from 'H264-media-1.264':

Duration: N/A, bitrate: N/A

Stream #0.0: Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 90k tbr, 1200k tbn, 180k tbc

[mpeg4 @ 0x8c708f0]removing common factors from framerate
[mpeg4 @ 0x8c708f0]timebase not supported by mpeg 4 standard
Output #0, avi, to 'bnj1IN.avi':

Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 90k tbc

Stream mapping:

Stream #0.0 -> #0.0

Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Changed 22 months ago by gogasca

Changed 22 months ago by gogasca

DOES NOT WORK

Changed 22 months ago by gogasca

WORKS

comment:2 Changed 22 months ago by cehoyos

  • Status changed from new to open
  • Component changed from FFmpeg to undetermined

Could you test latest git head? The version you are using is old.

comment:3 Changed 22 months ago by gogasca

Thanks for the help,
I downloaded latest git:
1001 wget  http://codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz

1002 tar xvf git-latest.tar.gz
1003 cd git-latest.tar.gz
1009 autoconf
1010 ./configure --with-curl=/usr/local
1011 make
1012 make install

Recompile videosnarf and ffmpeg and same results. I attached packet captures for you to try maybe you can find the right combination.
Thanks!

[root@maradona video]# videosnarf -i bjn1IN.pcap -c
Starting videosnarf 0.63
[+]Starting to snarf the media packets
[+] Please wait while decoding pcap file...
added new stream. :10.35.194.14(50782) to 10.35.204.91(30088). codec is 61
[+]Stream saved to file H264-media-1.264
[+]Number of streams found are 1
[+]Snarfing Completed
[root@maradona video]# ll
total 2884
-rw-r--r-- 1 root root 155044 Jul 27 23:29 audioin.pcap
-rw-r--r-- 1 root root 672244 Jul 28 17:35 bjn1IN.pcap
-rw-r--r-- 1 root root 524203 Jul 28 17:38 bjn1OUT.pcap
-rw-r--r-- 1 root root 31975 Jul 27 23:53 ffmpeghelp
-rw-r--r-- 1 root root 215720 Jul 27 23:29 G722-media-1.wav
-rw-r--r-- 1 root root 624339 Jul 29 10:14 H264-media-1.264
-rw-r--r-- 1 root root 692936 Jul 27 23:36 test2INH264.pcap
[root@maradona video]# ffmpeg -i H264-media-1.264 bnj1IN.avi
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers

built on Jul 27 2011 22:58:44 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration:
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.11. 0 / 0.11. 0

[h264 @ 0xa5885f0]missing picture in access unit
[h264 @ 0xa587420]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, h264, from 'H264-media-1.264':

Duration: N/A, bitrate: N/A

Stream #0.0: Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 90k tbr, 1200k tbn, 180k tbc

[mpeg4 @ 0xa58b8f0]removing common factors from framerate
[mpeg4 @ 0xa58b8f0]timebase not supported by mpeg 4 standard
Output #0, avi, to 'bnj1IN.avi':

Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 90k tbc

Stream mapping:

Stream #0.0 -> #0.0

Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
[root@maradona video]# git --version
git version 1.7.6.GIT

comment:4 Changed 22 months ago by cehoyos

Could you test latest FFmpeg git head? You can find it at http://ffmpeg.org/download.html

comment:5 follow-up: ↓ 8 Changed 22 months ago by gogasca

Upgrade ffmpeg to 0.8.1 and same results:

[root@maradona video]# videosnarf -i bjn1IN.pcap -c
Starting videosnarf 0.63
[+]Starting to snarf the media packets
[+] Please wait while decoding pcap file...
added new stream. :10.35.194.14(50782) to 10.35.204.91(30088). codec is 61
[+]Stream saved to file H264-media-1.264
[+]Number of streams found are 1
[+]Snarfing Completed
[root@maradona video]# ffmpeg -i H264-media-1.264 bnj1IN.avi
ffmpeg version 0.8.1, Copyright (c) 2000-2011 the FFmpeg developers

built on Jul 29 2011 16:23:11 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration:
libavutil 51. 9. 1 / 51. 9. 1
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 4. 0 / 53. 4. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 23. 0 / 2. 23. 0
libswscale 2. 0. 0 / 2. 0. 0

[h264 @ 0x9e3f340] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, h264, from 'H264-media-1.264':

Duration: N/A, bitrate: N/A

Stream #0.0: Video: h264 (Constrained Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 90k tbr, 1200k tbn, 180k tbc

[buffer @ 0x9e43bc0] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[mpeg4 @ 0x9e40cc0] removing common factors from framerate
[mpeg4 @ 0x9e40cc0] timebase 1/90000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535
Output #0, avi, to 'bnj1IN.avi':

Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 90k tbc

Stream mapping:

Stream #0.0 -> #0.0

Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
[root@maradona video]#

comment:6 Changed 22 months ago by gogasca

Call flow:
Cisco CTS --> CUCM -- SIP --> VCS -- H323 --> VCS-E --H323 --> BJN

From CTS to Remote end:
Media Attribute (a): fmtp:97 profile-level-id=42001F;packetization-mode=0;max-mbps=108000;max-fs=3600;max-br=4000

From Remote endto CTS:
Media Attribute (a): fmtp:96 profile-level-id=428016;max-mbps=108500;max-fs=3840;max-smbps=108500

From CTS: profile-level-id=42 00 1F
From BJN: profile-level-id=42 80 16

[PROFILE IDC]

CTS: 42 = 66
BJN: 42 = 66

Each substring represents one byte in base16! So, if Profile IDC is 42, that means it is
actually 66 in base10. (66=baseline, 77=main, 100=high)

[PROFILE IOP]
CTS: 0000 0000 = 00
BJN: 1000 0000 = 80

If bit 7 (the most significant bit), bit 6, or bit 5 of profile-iop is equal to 1, all constraints of the Baseline profile,
the Main profile, or the Extended profile, respectively, are obeyed in the NAL unit stream.

[LEVEL IDC]
CTS: 1F = 31 = 3.1 = 720×480@80.0 (13) 720×576@66.7 (11) 1280×720@30.0 (5)
BJN: 16 = 22 = 2.2 = 352×480@30.7(10) 352×576@25.6 (7) 720×480@15.0 (6) 720×576@12.5 (5)

comment:7 Changed 22 months ago by gogasca

Are those valid resolutions???
Im trying to use BJN one with ffmpeg.

comment:8 in reply to: ↑ 5 Changed 22 months ago by cehoyos

Replying to gogasca:

[mpeg4 @ 0x9e40cc0] timebase 1/90000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535

You will have to use another encoder or frame_rate.

If that does not help, please upload H264-media-1.264 to  http://www.datafilehost.com/

Carl Eugen

comment:9 Changed 19 months ago by cehoyos

  • Status changed from open to closed
  • Resolution set to needs_more_info

No updates for several months, please reopen if there is any problem left with this issue.

Note: See TracTickets for help on using tickets.