Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Thanks :) On Tue, Mar 1, 2016 at 2:43 AM, Michael Niedermayerwrote: > On Tue, Mar 01, 2016 at 02:11:28AM +0200, Andrew Shulgin wrote: > > Yep, you're right. > > ok, applied > > thanks > > > > > > On Tue, Mar 1, 2016 at 2:09 AM, Michael Niedermayer > > > wrote: > > > > > On Mon, Feb 29, 2016 at 03:10:41PM +0200, Andrew Shulgin wrote: > > > > Extracting SPS without the missig PPS results in unplayable FLV. > > > > > > > > ffmpeg -thread_queue_size 512 -rtsp_transport tcp -i rtsp:// > > > > admin:12345@192.88.99.1/h264/ch1/main/av_stream -ar 44100 -ac 2 > -acodec > > > > pcm_s16le -f s16le -ac 2 -i /dev/zero -c:v copy -acodec aac -strict > > > > experimental -ab 128k -f flv wrong.flv > > > > > > > > Uploaded to upload.ffmpeg.org with filename > > > > rtsp-invalid-sprop-parameter-sets.flv > > > > > > > > Also you may download the sample from here: > > > > http://home.rmrf.co/storage/rtsp-invalid-sprop-parameter-sets.flv > > > > > > that doesnt play, do i guess correctly that this testcase works > > > and results in a playable file with the original patch ? > > > > > > [...] > > > -- > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > > > During times of universal deceit, telling the truth becomes a > > > revolutionary act. -- George Orwell > > > > > > ___ > > > ffmpeg-devel mailing list > > > ffmpeg-devel@ffmpeg.org > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Democracy is the form of government in which you can choose your dictator > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
On Tue, Mar 01, 2016 at 02:11:28AM +0200, Andrew Shulgin wrote: > Yep, you're right. ok, applied thanks > > On Tue, Mar 1, 2016 at 2:09 AM, Michael Niedermayer> wrote: > > > On Mon, Feb 29, 2016 at 03:10:41PM +0200, Andrew Shulgin wrote: > > > Extracting SPS without the missig PPS results in unplayable FLV. > > > > > > ffmpeg -thread_queue_size 512 -rtsp_transport tcp -i rtsp:// > > > admin:12345@192.88.99.1/h264/ch1/main/av_stream -ar 44100 -ac 2 -acodec > > > pcm_s16le -f s16le -ac 2 -i /dev/zero -c:v copy -acodec aac -strict > > > experimental -ab 128k -f flv wrong.flv > > > > > > Uploaded to upload.ffmpeg.org with filename > > > rtsp-invalid-sprop-parameter-sets.flv > > > > > > Also you may download the sample from here: > > > http://home.rmrf.co/storage/rtsp-invalid-sprop-parameter-sets.flv > > > > that doesnt play, do i guess correctly that this testcase works > > and results in a playable file with the original patch ? > > > > [...] > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > During times of universal deceit, telling the truth becomes a > > revolutionary act. -- George Orwell > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Yep, you're right. On Tue, Mar 1, 2016 at 2:09 AM, Michael Niedermayerwrote: > On Mon, Feb 29, 2016 at 03:10:41PM +0200, Andrew Shulgin wrote: > > Extracting SPS without the missig PPS results in unplayable FLV. > > > > ffmpeg -thread_queue_size 512 -rtsp_transport tcp -i rtsp:// > > admin:12345@192.88.99.1/h264/ch1/main/av_stream -ar 44100 -ac 2 -acodec > > pcm_s16le -f s16le -ac 2 -i /dev/zero -c:v copy -acodec aac -strict > > experimental -ab 128k -f flv wrong.flv > > > > Uploaded to upload.ffmpeg.org with filename > > rtsp-invalid-sprop-parameter-sets.flv > > > > Also you may download the sample from here: > > http://home.rmrf.co/storage/rtsp-invalid-sprop-parameter-sets.flv > > that doesnt play, do i guess correctly that this testcase works > and results in a playable file with the original patch ? > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > During times of universal deceit, telling the truth becomes a > revolutionary act. -- George Orwell > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
On Mon, Feb 29, 2016 at 03:10:41PM +0200, Andrew Shulgin wrote: > Extracting SPS without the missig PPS results in unplayable FLV. > > ffmpeg -thread_queue_size 512 -rtsp_transport tcp -i rtsp:// > admin:12345@192.88.99.1/h264/ch1/main/av_stream -ar 44100 -ac 2 -acodec > pcm_s16le -f s16le -ac 2 -i /dev/zero -c:v copy -acodec aac -strict > experimental -ab 128k -f flv wrong.flv > > Uploaded to upload.ffmpeg.org with filename > rtsp-invalid-sprop-parameter-sets.flv > > Also you may download the sample from here: > http://home.rmrf.co/storage/rtsp-invalid-sprop-parameter-sets.flv that doesnt play, do i guess correctly that this testcase works and results in a playable file with the original patch ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Also i can send you an email with public RTSP URL privately if you ask. On Mon, Feb 29, 2016 at 3:10 PM, Andrew Shulginwrote: > Extracting SPS without the missig PPS results in unplayable FLV. > > ffmpeg -thread_queue_size 512 -rtsp_transport tcp -i rtsp:// > admin:12345@192.88.99.1/h264/ch1/main/av_stream -ar 44100 -ac 2 -acodec > pcm_s16le -f s16le -ac 2 -i /dev/zero -c:v copy -acodec aac -strict > experimental -ab 128k -f flv wrong.flv > > Uploaded to upload.ffmpeg.org with filename > rtsp-invalid-sprop-parameter-sets.flv > > Also you may download the sample from here: > http://home.rmrf.co/storage/rtsp-invalid-sprop-parameter-sets.flv > > On Mon, Feb 29, 2016 at 2:47 PM, Michael Niedermayer < > mich...@niedermayer.cc> wrote: > >> On Mon, Feb 29, 2016 at 01:59:22PM +0200, Andrew Shulgin wrote: >> > Corrected the patch a bit, now setting extradata_size to 0 >> > >> > On Mon, Feb 29, 2016 at 1:13 PM, Andrew Shulgin < >> andrewshulgi...@gmail.com> >> > wrote: >> > >> > > Correct SPS and PPS are in the stream. >> > > Maybe it's reasonale to use existing SPS. But i'm not sure how to >> > > implement that. >> > > Yeah really, setting extradata_size to 0 should not be skipped. >> > > >> > > On Mon, Feb 29, 2016 at 1:01 PM, Michael Niedermayer < >> > > mich...@niedermayer.cc> wrote: >> > > >> > >> On Sat, Feb 27, 2016 at 09:56:01PM +0200, Andrew Shulgin wrote: >> > >> > Some Hikvison RTSP cameras send wrong sprop-parameter-sets in SDP >> - it's >> > >> > missing PPS. >> > >> > >> > >> > Example of correct sprop-parameter-sets: >> > >> > sprop-parameter-sets=Z0IAH5W4PASaEAAAcIAAFfkAQA==,aM48gA== >> > >> > Example of wrong sprop-parameter-sets: >> > >> > sprop-parameter-sets=Z0IAH5WoPASaEAAAcIAAFfkIQA==, >> > >> > >> > >> > My patch adds a workaround that ignores invalid >> sprop-parameter-sets. >> > >> >> > >> from where does it get the correct parameter set ? >> > >> is it in the stream ? or repeated sprop-parameter-sets ? >> > >> >> > >> also shuldnt the sps be used instead of skipped? >> > >> or the skip code be made conditional on codec->extradata_size > 0 ? >> > >> >> > >> [...] >> > >> -- >> > >> Michael GnuPG fingerprint: >> 9FF2128B147EF6730BADF133611EC787040B0FAB >> > >> >> > >> Complexity theory is the science of finding the exact solution to an >> > >> approximation. Benchmarking OTOH is finding an approximation of the >> exact >> > >> >> > >> ___ >> > >> ffmpeg-devel mailing list >> > >> ffmpeg-devel@ffmpeg.org >> > >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > >> >> > >> >> > > >> >> > rtpdec_h264.c |4 >> > 1 file changed, 4 insertions(+) >> > 04777111f044772997bed9c6ac4367b4a4c83952 >> 0001-Ignore-invalid-sprop-parameter-sets-missing-PPS.patch >> > From 5ba47e182a47753ed47344b25fd6ba9d15698fd1 Mon Sep 17 00:00:00 2001 >> > From: Andrew Shulgin >> > Date: Mon, 29 Feb 2016 13:57:42 +0200 >> > Subject: [PATCH] Ignore invalid sprop-parameter-sets missing PPS >> > >> > --- >> > libavformat/rtpdec_h264.c | 4 >> > 1 file changed, 4 insertions(+) >> > >> > diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c >> > index b399be4..4c0003e 100644 >> > --- a/libavformat/rtpdec_h264.c >> > +++ b/libavformat/rtpdec_h264.c >> > @@ -168,6 +168,10 @@ static int >> sdp_parse_fmtp_config_h264(AVFormatContext *s, >> > int ret; >> > codec->extradata_size = 0; >> > av_freep(>extradata); >> > +if (value[strlen(value) - 1] == ',') { >> > +av_log(s, AV_LOG_WARNING, "Missing PPS in >> sprop-parameter-sets, ignoring\n"); >> > +return 0; >> > +} >> >> what i meant was that if there is no extradata set then extracting >> the SPS without the missig PPS into it would make sense >> while if extradata was already set then a SPS only sprop would be >> better skiped as it would remove a already extradted PPS >> >> [...] >> -- >> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB >> >> If you drop bombs on a foreign country and kill hundred thousands of >> innocent people, expect your government to call the consequence >> "unprovoked inhuman terrorist attacks" and use it to justify dropping >> more bombs and killing more people. The technology changed, the idea is >> old. >> >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Extracting SPS without the missig PPS results in unplayable FLV. ffmpeg -thread_queue_size 512 -rtsp_transport tcp -i rtsp:// admin:12345@192.88.99.1/h264/ch1/main/av_stream -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -c:v copy -acodec aac -strict experimental -ab 128k -f flv wrong.flv Uploaded to upload.ffmpeg.org with filename rtsp-invalid-sprop-parameter-sets.flv Also you may download the sample from here: http://home.rmrf.co/storage/rtsp-invalid-sprop-parameter-sets.flv On Mon, Feb 29, 2016 at 2:47 PM, Michael Niedermayerwrote: > On Mon, Feb 29, 2016 at 01:59:22PM +0200, Andrew Shulgin wrote: > > Corrected the patch a bit, now setting extradata_size to 0 > > > > On Mon, Feb 29, 2016 at 1:13 PM, Andrew Shulgin < > andrewshulgi...@gmail.com> > > wrote: > > > > > Correct SPS and PPS are in the stream. > > > Maybe it's reasonale to use existing SPS. But i'm not sure how to > > > implement that. > > > Yeah really, setting extradata_size to 0 should not be skipped. > > > > > > On Mon, Feb 29, 2016 at 1:01 PM, Michael Niedermayer < > > > mich...@niedermayer.cc> wrote: > > > > > >> On Sat, Feb 27, 2016 at 09:56:01PM +0200, Andrew Shulgin wrote: > > >> > Some Hikvison RTSP cameras send wrong sprop-parameter-sets in SDP - > it's > > >> > missing PPS. > > >> > > > >> > Example of correct sprop-parameter-sets: > > >> > sprop-parameter-sets=Z0IAH5W4PASaEAAAcIAAFfkAQA==,aM48gA== > > >> > Example of wrong sprop-parameter-sets: > > >> > sprop-parameter-sets=Z0IAH5WoPASaEAAAcIAAFfkIQA==, > > >> > > > >> > My patch adds a workaround that ignores invalid > sprop-parameter-sets. > > >> > > >> from where does it get the correct parameter set ? > > >> is it in the stream ? or repeated sprop-parameter-sets ? > > >> > > >> also shuldnt the sps be used instead of skipped? > > >> or the skip code be made conditional on codec->extradata_size > 0 ? > > >> > > >> [...] > > >> -- > > >> Michael GnuPG fingerprint: > 9FF2128B147EF6730BADF133611EC787040B0FAB > > >> > > >> Complexity theory is the science of finding the exact solution to an > > >> approximation. Benchmarking OTOH is finding an approximation of the > exact > > >> > > >> ___ > > >> ffmpeg-devel mailing list > > >> ffmpeg-devel@ffmpeg.org > > >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > >> > > >> > > > > > > rtpdec_h264.c |4 > > 1 file changed, 4 insertions(+) > > 04777111f044772997bed9c6ac4367b4a4c83952 > 0001-Ignore-invalid-sprop-parameter-sets-missing-PPS.patch > > From 5ba47e182a47753ed47344b25fd6ba9d15698fd1 Mon Sep 17 00:00:00 2001 > > From: Andrew Shulgin > > Date: Mon, 29 Feb 2016 13:57:42 +0200 > > Subject: [PATCH] Ignore invalid sprop-parameter-sets missing PPS > > > > --- > > libavformat/rtpdec_h264.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c > > index b399be4..4c0003e 100644 > > --- a/libavformat/rtpdec_h264.c > > +++ b/libavformat/rtpdec_h264.c > > @@ -168,6 +168,10 @@ static int > sdp_parse_fmtp_config_h264(AVFormatContext *s, > > int ret; > > codec->extradata_size = 0; > > av_freep(>extradata); > > +if (value[strlen(value) - 1] == ',') { > > +av_log(s, AV_LOG_WARNING, "Missing PPS in > sprop-parameter-sets, ignoring\n"); > > +return 0; > > +} > > what i meant was that if there is no extradata set then extracting > the SPS without the missig PPS into it would make sense > while if extradata was already set then a SPS only sprop would be > better skiped as it would remove a already extradted PPS > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > If you drop bombs on a foreign country and kill hundred thousands of > innocent people, expect your government to call the consequence > "unprovoked inhuman terrorist attacks" and use it to justify dropping > more bombs and killing more people. The technology changed, the idea is > old. > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
On Mon, Feb 29, 2016 at 01:59:22PM +0200, Andrew Shulgin wrote: > Corrected the patch a bit, now setting extradata_size to 0 > > On Mon, Feb 29, 2016 at 1:13 PM, Andrew Shulgin> wrote: > > > Correct SPS and PPS are in the stream. > > Maybe it's reasonale to use existing SPS. But i'm not sure how to > > implement that. > > Yeah really, setting extradata_size to 0 should not be skipped. > > > > On Mon, Feb 29, 2016 at 1:01 PM, Michael Niedermayer < > > mich...@niedermayer.cc> wrote: > > > >> On Sat, Feb 27, 2016 at 09:56:01PM +0200, Andrew Shulgin wrote: > >> > Some Hikvison RTSP cameras send wrong sprop-parameter-sets in SDP - it's > >> > missing PPS. > >> > > >> > Example of correct sprop-parameter-sets: > >> > sprop-parameter-sets=Z0IAH5W4PASaEAAAcIAAFfkAQA==,aM48gA== > >> > Example of wrong sprop-parameter-sets: > >> > sprop-parameter-sets=Z0IAH5WoPASaEAAAcIAAFfkIQA==, > >> > > >> > My patch adds a workaround that ignores invalid sprop-parameter-sets. > >> > >> from where does it get the correct parameter set ? > >> is it in the stream ? or repeated sprop-parameter-sets ? > >> > >> also shuldnt the sps be used instead of skipped? > >> or the skip code be made conditional on codec->extradata_size > 0 ? > >> > >> [...] > >> -- > >> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > >> > >> Complexity theory is the science of finding the exact solution to an > >> approximation. Benchmarking OTOH is finding an approximation of the exact > >> > >> ___ > >> ffmpeg-devel mailing list > >> ffmpeg-devel@ffmpeg.org > >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > >> > >> > > > rtpdec_h264.c |4 > 1 file changed, 4 insertions(+) > 04777111f044772997bed9c6ac4367b4a4c83952 > 0001-Ignore-invalid-sprop-parameter-sets-missing-PPS.patch > From 5ba47e182a47753ed47344b25fd6ba9d15698fd1 Mon Sep 17 00:00:00 2001 > From: Andrew Shulgin > Date: Mon, 29 Feb 2016 13:57:42 +0200 > Subject: [PATCH] Ignore invalid sprop-parameter-sets missing PPS > > --- > libavformat/rtpdec_h264.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c > index b399be4..4c0003e 100644 > --- a/libavformat/rtpdec_h264.c > +++ b/libavformat/rtpdec_h264.c > @@ -168,6 +168,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s, > int ret; > codec->extradata_size = 0; > av_freep(>extradata); > +if (value[strlen(value) - 1] == ',') { > +av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, > ignoring\n"); > +return 0; > +} what i meant was that if there is no extradata set then extracting the SPS without the missig PPS into it would make sense while if extradata was already set then a SPS only sprop would be better skiped as it would remove a already extradted PPS [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you drop bombs on a foreign country and kill hundred thousands of innocent people, expect your government to call the consequence "unprovoked inhuman terrorist attacks" and use it to justify dropping more bombs and killing more people. The technology changed, the idea is old. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Corrected the patch a bit, now setting extradata_size to 0 On Mon, Feb 29, 2016 at 1:13 PM, Andrew Shulginwrote: > Correct SPS and PPS are in the stream. > Maybe it's reasonale to use existing SPS. But i'm not sure how to > implement that. > Yeah really, setting extradata_size to 0 should not be skipped. > > On Mon, Feb 29, 2016 at 1:01 PM, Michael Niedermayer < > mich...@niedermayer.cc> wrote: > >> On Sat, Feb 27, 2016 at 09:56:01PM +0200, Andrew Shulgin wrote: >> > Some Hikvison RTSP cameras send wrong sprop-parameter-sets in SDP - it's >> > missing PPS. >> > >> > Example of correct sprop-parameter-sets: >> > sprop-parameter-sets=Z0IAH5W4PASaEAAAcIAAFfkAQA==,aM48gA== >> > Example of wrong sprop-parameter-sets: >> > sprop-parameter-sets=Z0IAH5WoPASaEAAAcIAAFfkIQA==, >> > >> > My patch adds a workaround that ignores invalid sprop-parameter-sets. >> >> from where does it get the correct parameter set ? >> is it in the stream ? or repeated sprop-parameter-sets ? >> >> also shuldnt the sps be used instead of skipped? >> or the skip code be made conditional on codec->extradata_size > 0 ? >> >> [...] >> -- >> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB >> >> Complexity theory is the science of finding the exact solution to an >> approximation. Benchmarking OTOH is finding an approximation of the exact >> >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> > From 5ba47e182a47753ed47344b25fd6ba9d15698fd1 Mon Sep 17 00:00:00 2001 From: Andrew Shulgin Date: Mon, 29 Feb 2016 13:57:42 +0200 Subject: [PATCH] Ignore invalid sprop-parameter-sets missing PPS --- libavformat/rtpdec_h264.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c index b399be4..4c0003e 100644 --- a/libavformat/rtpdec_h264.c +++ b/libavformat/rtpdec_h264.c @@ -168,6 +168,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s, int ret; codec->extradata_size = 0; av_freep(>extradata); +if (value[strlen(value) - 1] == ',') { +av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, ignoring\n"); +return 0; +} ret = ff_h264_parse_sprop_parameter_sets(s, >extradata, >extradata_size, value); av_log(s, AV_LOG_DEBUG, "Extradata set to %p (size: %d)\n", -- 2.4.10 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Correct SPS and PPS are in the stream. Maybe it's reasonale to use existing SPS. But i'm not sure how to implement that. Yeah really, setting extradata_size to 0 should not be skipped. On Mon, Feb 29, 2016 at 1:01 PM, Michael Niedermayerwrote: > On Sat, Feb 27, 2016 at 09:56:01PM +0200, Andrew Shulgin wrote: > > Some Hikvison RTSP cameras send wrong sprop-parameter-sets in SDP - it's > > missing PPS. > > > > Example of correct sprop-parameter-sets: > > sprop-parameter-sets=Z0IAH5W4PASaEAAAcIAAFfkAQA==,aM48gA== > > Example of wrong sprop-parameter-sets: > > sprop-parameter-sets=Z0IAH5WoPASaEAAAcIAAFfkIQA==, > > > > My patch adds a workaround that ignores invalid sprop-parameter-sets. > > from where does it get the correct parameter set ? > is it in the stream ? or repeated sprop-parameter-sets ? > > also shuldnt the sps be used instead of skipped? > or the skip code be made conditional on codec->extradata_size > 0 ? > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Complexity theory is the science of finding the exact solution to an > approximation. Benchmarking OTOH is finding an approximation of the exact > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
On Sat, Feb 27, 2016 at 09:56:01PM +0200, Andrew Shulgin wrote: > Some Hikvison RTSP cameras send wrong sprop-parameter-sets in SDP - it's > missing PPS. > > Example of correct sprop-parameter-sets: > sprop-parameter-sets=Z0IAH5W4PASaEAAAcIAAFfkAQA==,aM48gA== > Example of wrong sprop-parameter-sets: > sprop-parameter-sets=Z0IAH5WoPASaEAAAcIAAFfkIQA==, > > My patch adds a workaround that ignores invalid sprop-parameter-sets. from where does it get the correct parameter set ? is it in the stream ? or repeated sprop-parameter-sets ? also shuldnt the sps be used instead of skipped? or the skip code be made conditional on codec->extradata_size > 0 ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
--- libavformat/rtpdec_h264.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c index b399be4..e707d03 100644 --- a/libavformat/rtpdec_h264.c +++ b/libavformat/rtpdec_h264.c @@ -166,6 +166,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s, parse_profile_level_id(s, h264_data, value); } else if (!strcmp(attr, "sprop-parameter-sets")) { int ret; +if (value[strlen(value) - 1] == ',') { +av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, ignoring\n"); +return 0; +} codec->extradata_size = 0; av_freep(>extradata); ret = ff_h264_parse_sprop_parameter_sets(s, >extradata, -- 2.4.10 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Some Hikvison RTSP cameras send wrong sprop-parameter-sets in SDP - it's missing PPS. Example of correct sprop-parameter-sets: sprop-parameter-sets=Z0IAH5W4PASaEAAAcIAAFfkAQA==,aM48gA== Example of wrong sprop-parameter-sets: sprop-parameter-sets=Z0IAH5WoPASaEAAAcIAAFfkIQA==, My patch adds a workaround that ignores invalid sprop-parameter-sets. On Sat, Feb 27, 2016 at 9:35 PM, Andrew Shulginwrote: > Sorry, wrong From: header, sended again with correct > > On Sat, Feb 27, 2016 at 9:30 PM, Andrew Shulgin wrote: > >> --- >> libavformat/rtpdec_h264.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c >> index b399be4..e707d03 100644 >> --- a/libavformat/rtpdec_h264.c >> +++ b/libavformat/rtpdec_h264.c >> @@ -166,6 +166,10 @@ static int >> sdp_parse_fmtp_config_h264(AVFormatContext *s, >> parse_profile_level_id(s, h264_data, value); >> } else if (!strcmp(attr, "sprop-parameter-sets")) { >> int ret; >> +if (value[strlen(value) - 1] == ',') { >> +av_log(s, AV_LOG_WARNING, "Missing PPS in >> sprop-parameter-sets, ignoring\n"); >> +return 0; >> +} >> codec->extradata_size = 0; >> av_freep(>extradata); >> ret = ff_h264_parse_sprop_parameter_sets(s, >extradata, >> -- >> 2.4.10 >> > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
Sorry, wrong From: header, sended again with correct On Sat, Feb 27, 2016 at 9:30 PM, Andrew Shulginwrote: > --- > libavformat/rtpdec_h264.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c > index b399be4..e707d03 100644 > --- a/libavformat/rtpdec_h264.c > +++ b/libavformat/rtpdec_h264.c > @@ -166,6 +166,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext > *s, > parse_profile_level_id(s, h264_data, value); > } else if (!strcmp(attr, "sprop-parameter-sets")) { > int ret; > +if (value[strlen(value) - 1] == ',') { > +av_log(s, AV_LOG_WARNING, "Missing PPS in > sprop-parameter-sets, ignoring\n"); > +return 0; > +} > codec->extradata_size = 0; > av_freep(>extradata); > ret = ff_h264_parse_sprop_parameter_sets(s, >extradata, > -- > 2.4.10 > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Ignore invalid sprop-parameter-sets missing PPS
--- libavformat/rtpdec_h264.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c index b399be4..e707d03 100644 --- a/libavformat/rtpdec_h264.c +++ b/libavformat/rtpdec_h264.c @@ -166,6 +166,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s, parse_profile_level_id(s, h264_data, value); } else if (!strcmp(attr, "sprop-parameter-sets")) { int ret; +if (value[strlen(value) - 1] == ',') { +av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, ignoring\n"); +return 0; +} codec->extradata_size = 0; av_freep(>extradata); ret = ff_h264_parse_sprop_parameter_sets(s, >extradata, -- 2.4.10 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel