Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] H264 Encoding Error


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
guoqiuping81112 at 163...
Guest





PostPosted: Tue Mar 01, 2016 4:12 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

Hi All:

My box is CentOS6.5, and FS is 1.6.4
When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped

I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);


Is it a bug of mod_av or how can i solve the problem?

Thanks a lot
Back to top
s.safarov at gmail.com
Guest





PostPosted: Tue Mar 01, 2016 5:43 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

Please look FS-8851. Are is related to your case?

On Tue, Mar 1, 2016 at 12:11 PM, 郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:


My box is CentOS6.5, and FS is 1.6.4

When I use H264 as the video codec.
FS report encoding fail as below.
     [ERR] avcodec.c:1117 Encoding Error -1
and x264 report
     lookahead thread is already stopped


I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);



Is it a bug of mod_av or how can i solve the problem?


Thanks a lot


















_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
guoqiuping81112 at 163...
Guest





PostPosted: Tue Mar 01, 2016 8:56 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

I think they are not the same. H263 is fine. but H264 fail

Quote:
201631գ6:42Sergey Safarov <s.safarov@gmail.com (s.safarov@gmail.com)> д
Please look FS-8851. Are is related to your case?
On Tue, Mar 1, 2016 at 12:11 PM, ƽ <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:

My box is CentOS6.5, and FS is 1.6.4
When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped

I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);


Is it a bug of mod_av or how can i solve the problem?

Thanks a lot









_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org) FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org


_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
brian at freeswitch.org
Guest





PostPosted: Tue Mar 01, 2016 11:17 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

You've lost me at "My box is CentOS6.5"

On Tue, Mar 1, 2016 at 3:11 AM, 郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:


My box is CentOS6.5, and FS is 1.6.4

When I use H264 as the video codec.
FS report encoding fail as below.
     [ERR] avcodec.c:1117 Encoding Error -1
and x264 report
     lookahead thread is already stopped


I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);



Is it a bug of mod_av or how can i solve the problem?


Thanks a lot


















_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--

Brian West
brian@freeswitch.org (brian@freeswitch.org)


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest
Back to top
guoqiuping81112 at 163...
Guest





PostPosted: Tue Mar 01, 2016 11:26 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

sorry, my mistake. my operation system is CentOS 7.1.1503
Quote:
201632գ12:13Brian West <brian@freeswitch.org (brian@freeswitch.org)> д
You've lost me at "My box is CentOS6.5"
On Tue, Mar 1, 2016 at 3:11 AM, ƽ <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:

My box is CentOS6.5, and FS is 1.6.4
When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped

I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);


Is it a bug of mod_av or how can i solve the problem?

Thanks a lot









_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org) FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org


--
Brian Westbrian@freeswitch.org (brian@freeswitch.org)

Twitter: @FreeSWITCH , @briankwesthttp://www.freeswitchbook.comhttp://www.freeswitchcookbook.com
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest










_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
guoqiuping81112 at 163...
Guest





PostPosted: Wed Mar 02, 2016 9:07 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

I found the issue is because of the incorrect version of x264.

I use x264-snapshot-20150625-0011-stable , then the issue disappears.
but now libav report another log:
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
no frame!


How can I know the exact version of x264 and libav for FreeSWITH 1.6.4

Quote:
201632գ12:23ƽ <guoqiuping81112@163.com (guoqiuping81112@163.com)> д
sorry, my mistake. my operation system is CentOS 7.1.1503
Quote:
201632գ12:13Brian West <brian@freeswitch.org (brian@freeswitch.org)> д
You've lost me at "My box is CentOS6.5"
On Tue, Mar 1, 2016 at 3:11 AM, ƽ <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:

My box is CentOS6.5, and FS is 1.6.4
When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped

I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);


Is it a bug of mod_av or how can i solve the problem?

Thanks a lot









_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org) FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org


--
Brian Westbrian@freeswitch.org (brian@freeswitch.org)

Twitter: @FreeSWITCH , @briankwesthttp://www.freeswitchbook.comhttp://www.freeswitchcookbook.com
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest










_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org


_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
sunil.d.admin at gmail...
Guest





PostPosted: Wed Mar 02, 2016 9:13 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

I found the issue is because of the incorrect version of x264.

I use x264-snapshot-20150625-0011-stable , then the issue disappears.
but now libav report another log:
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
no frame!


How can I know the exact version of x264 and libav for FreeSWITH 1.6.4

Quote:
在 2016年3月2日,上午12:23,郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> 写道:
sorry, my mistake. my operation system is CentOS 7.1.1503
Quote:
在 2016年3月2日,上午12:13,Brian West <brian@freeswitch.org (brian@freeswitch.org)> 写道:
You've lost me at "My box is CentOS6.5"
On Tue, Mar 1, 2016 at 3:11 AM, 郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:

My box is CentOS6.5, and FS is 1.6.4
When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped

I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);


Is it a bug of mod_av or how can i solve the problem?

Thanks a lot









_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org) FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org


--
Brian Westbrian@freeswitch.org (brian@freeswitch.org)

Twitter: @FreeSWITCH , @briankwesthttp://www.freeswitchbook.comhttp://www.freeswitchcookbook.com
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest










_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org


_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
guoqiuping81112 at 163...
Guest





PostPosted: Wed Mar 02, 2016 9:30 pm    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

This issue is because the client does not send keyframe to FS



Quote:
201632գ10:06ƽ <guoqiuping81112@163.com (guoqiuping81112@163.com)> д
I found the issue is because of the incorrect version of x264.

I use x264-snapshot-20150625-0011-stable , then the issue disappears.
but now libav report another log:
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
no frame!


How can I know the exact version of x264 and libav for FreeSWITH 1.6.4

Quote:
201632գ12:23ƽ <guoqiuping81112@163.com (guoqiuping81112@163.com)> д
sorry, my mistake. my operation system is CentOS 7.1.1503
Quote:
201632գ12:13Brian West <brian@freeswitch.org (brian@freeswitch.org)> д
You've lost me at "My box is CentOS6.5"
On Tue, Mar 1, 2016 at 3:11 AM, ƽ <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:

My box is CentOS6.5, and FS is 1.6.4
When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped

I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);


Is it a bug of mod_av or how can i solve the problem?

Thanks a lot









_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org) FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org


--
Brian Westbrian@freeswitch.org (brian@freeswitch.org)

Twitter: @FreeSWITCH , @briankwesthttp://www.freeswitchbook.comhttp://www.freeswitchcookbook.com
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest










_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org


_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org


_________________________________________________________________________Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (consulting@freeswitch.org)http://www.freeswitchsolutions.comOfficial FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.comFreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
dujinfang at gmail.com
Guest





PostPosted: Thu Mar 03, 2016 9:42 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

yes, the encoder err is caused by libx264 API change, old x264 version works but I’m not sure the exact version that breaks it.


we are working on find out what changed and trying to fix that. hints and patches are welcome.


If there’s not yet an open jira on this subject, please make one and assign to me.




and we also working on get ffmpeg 2.6/2.8/3.0 working, there’s a jira assigned to me but I cannot access jira so cannot put the link here atm.


let me know if anyone has any patch I’d like to review.



On Thursday, March 3, 2016 at 10:28 AM, 郭秋平 wrote:
Quote:
This issue is because the client does not send keyframe to FS







Quote:
在 2016年3月2日,下午10:06,郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> 写道:

I found the issue is because of the incorrect version of x264.


I use x264-snapshot-20150625-0011-stable , then the issue disappears.
but now libav report another log:
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
no frame!



How can I know the exact version of x264 and libav for FreeSWITH 1.6.4



Quote:
在 2016年3月2日,上午12:23,郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> 写道:

sorry, my mistake. my operation system is CentOS 7.1.1503

Quote:
在 2016年3月2日,上午12:13,Brian West <brian@freeswitch.org (brian@freeswitch.org)> 写道:

You've lost me at "My box is CentOS6.5"

On Tue, Mar 1, 2016 at 3:11 AM, 郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:


My box is CentOS6.5, and FS is 1.6.4

When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped


I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);



Is it a bug of mod_av or how can i solve the problem?


Thanks a lot


















_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--

Brian West
brian@freeswitch.org (brian@freeswitch.org)


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest










_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com


Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com


FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Back to top
dujinfang at gmail.com
Guest





PostPosted: Wed Mar 09, 2016 9:33 am    Post subject: [Freeswitch-users] H264 Encoding Error Reply with quote

x264 api not changed but be more restrict to our fault. I fixed the “Encoding Error -1 “ in the last master. it should work with any x264 version now.


--
Seven Du
Sent with Sparrow




On Thursday, March 3, 2016 at 10:40 PM, Seven Du wrote:
Quote:
yes, the encoder err is caused by libx264 API change, old x264 version works but I’m not sure the exact version that breaks it.


we are working on find out what changed and trying to fix that. hints and patches are welcome.


If there’s not yet an open jira on this subject, please make one and assign to me.




and we also working on get ffmpeg 2.6/2.8/3.0 working, there’s a jira assigned to me but I cannot access jira so cannot put the link here atm.


let me know if anyone has any patch I’d like to review.



On Thursday, March 3, 2016 at 10:28 AM, 郭秋平 wrote:
Quote:
This issue is because the client does not send keyframe to FS







Quote:
在 2016年3月2日,下午10:06,郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> 写道:

I found the issue is because of the incorrect version of x264.


I use x264-snapshot-20150625-0011-stable , then the issue disappears.
but now libav report another log:
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
non-existing PPS 0 referenced
decode_slice_header error
no frame!



How can I know the exact version of x264 and libav for FreeSWITH 1.6.4



Quote:
在 2016年3月2日,上午12:23,郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> 写道:

sorry, my mistake. my operation system is CentOS 7.1.1503

Quote:
在 2016年3月2日,上午12:13,Brian West <brian@freeswitch.org (brian@freeswitch.org)> 写道:

You've lost me at "My box is CentOS6.5"

On Tue, Mar 1, 2016 at 3:11 AM, 郭秋平 <guoqiuping81112@163.com (guoqiuping81112@163.com)> wrote:
Quote:
Hi All:


My box is CentOS6.5, and FS is 1.6.4

When I use H264 as the video codec.
FS report encoding fail as below.
[ERR] avcodec.c:1117 Encoding Error -1
and x264 report
lookahead thread is already stopped


I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
if (*got_output) { // Could be more delayed frames
ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);



Is it a bug of mod_av or how can i solve the problem?


Thanks a lot


















_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--

Brian West
brian@freeswitch.org (brian@freeswitch.org)


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest










_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org (consulting@freeswitch.org)
http://www.freeswitchsolutions.com


Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com


FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org







Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services