Re: [FFmpeg-devel] [PATCH]Do not fail mov demuxing if metadata reading fails

2015-05-16 Thread Michael Niedermayer
On Thu, May 14, 2015 at 04:16:31PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes ticket #4557 for me.

Fixed differntly

thanks for pointing at the problem!

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Anybody already working on VDPAU / HEVC support?

2015-05-16 Thread Philip Langdale
On Thu, 30 Apr 2015 21:24:06 +0200
Christian König  wrote:
> 
> I already talked to José Hiram Soltren from NVidia and it
> unfortunately doesn't look like they will do it this time.
> 
> >
> > I'm not aware of anyone else; given the hardware requirements, I
> > wouldn't be surprised if there's no one who's both qualified to do
> > the work and has
> > the hardware to test it.
> 
> Thanks for the info,

I caved and ordered myself a 960, so I'm going to start looking at this
next week.

--phil
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] avformat/mxfenc: Set horizontal chroma subsample value from pixel format if available

2015-05-16 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavformat/mxfenc.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 14449c9..659c34f 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -79,6 +79,7 @@ typedef struct MXFStreamContext {
 int interlaced;  ///< whether picture is interlaced
 int field_dominance; ///< tff=1, bff=2
 int component_depth;
+int h_chroma_sub_sample;
 int temporal_reordering;
 AVRational aspect_ratio; ///< display aspect ratio
 int closed_gop;  ///< gop is closed, used in mpeg-2 frame parsing
@@ -1027,7 +1028,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, 
AVStream *st, const UID ke
 
 // horizontal subsampling
 mxf_write_local_tag(pb, 4, 0x3302);
-avio_wb32(pb, 2);
+avio_wb32(pb, sc->h_chroma_sub_sample);
 
 // frame layout
 mxf_write_local_tag(pb, 1, 0x320C);
@@ -2035,9 +2036,11 @@ static int mxf_write_header(AVFormatContext *s)
 AVRational rate, tbc = st->time_base;
 // Default component depth to 8
 sc->component_depth = 8;
+sc->h_chroma_sub_sample = 2;
 
 if (pix_desc) {
-sc->component_depth = pix_desc->comp[0].depth_minus1 + 1;
+sc->component_depth = pix_desc->comp[0].depth_minus1 + 1;
+sc->h_chroma_sub_sample = 1 << pix_desc->log2_chroma_w;
 }
 
 mxf->timecode_base = (tbc.den + tbc.num/2) / tbc.num;
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] avformat/mxfenc: Set the component depth from the pixel format if available

2015-05-16 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavformat/mxfenc.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 5966792..14449c9 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -39,6 +39,7 @@
 #include "libavutil/random_seed.h"
 #include "libavutil/timecode.h"
 #include "libavutil/avassert.h"
+#include "libavutil/pixdesc.h"
 #include "libavutil/time_internal.h"
 #include "libavcodec/bytestream.h"
 #include "libavcodec/dnxhddata.h"
@@ -2029,10 +2030,16 @@ static int mxf_write_header(AVFormatContext *s)
 }
 
 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+const AVPixFmtDescriptor *pix_desc = 
av_pix_fmt_desc_get(st->codec->pix_fmt);
 // TODO: should be avg_frame_rate
 AVRational rate, tbc = st->time_base;
 // Default component depth to 8
 sc->component_depth = 8;
+
+if (pix_desc) {
+sc->component_depth = pix_desc->comp[0].depth_minus1 + 1;
+}
+
 mxf->timecode_base = (tbc.den + tbc.num/2) / tbc.num;
 spf = ff_mxf_get_samples_per_frame(s, tbc);
 if (!spf) {
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] ffserver jpg patch

2015-05-16 Thread ill


That file is attached

you would have to attach the file generated by git format-patch
also you of course first need to locally commit your changes
and set the commit message and author
see man git commit

[...]



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel








>From 5b681fdaf7971f841b84cfe06412c67ba417fb00 Mon Sep 17 00:00:00 2001
From: Caligula useraccount 
Date: Mon, 11 May 2015 17:42:42 -0600
Subject: [PATCH] ffserver jpg patch

---
 ffserver.c   |  4 
 ffserver_config.c|  6 --
 ffserver_config.h|  1 +
 libavformat/allformats.c |  1 +
 libavformat/rawenc.c | 12 
 5 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index 4803b96..2b99241 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -967,6 +967,10 @@ static int handle_connection(HTTPContext *c)
 /* close connection if trailer sent */
 if (c->state == HTTPSTATE_SEND_DATA_TRAILER)
 return -1;
+/* Check if it is a single jpeg frame 123 */
+if (c->stream->single_frame && c->data_count > c->cur_frame_bytes && c->cur_frame_bytes > 0) {
+close_connection(c);
+}
 break;
 case HTTPSTATE_RECEIVE_DATA:
 /* no need to read if no events */
diff --git a/ffserver_config.c b/ffserver_config.c
index 017af48..06bd8ac 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -862,8 +862,10 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd,
 } else {
 stream->stream_type = STREAM_TYPE_LIVE;
 /* JPEG cannot be used here, so use single frame MJPEG */
-if (!strcmp(arg, "jpeg"))
-strcpy(arg, "mjpeg");
+if (!strcmp(arg, "jpeg")) {
+strcpy(arg, "singlejpeg");
+stream->single_frame=1;
+}
 stream->fmt = ffserver_guess_format(arg, NULL, NULL);
 if (!stream->fmt)
 ERROR("Unknown Format: '%s'\n", arg);
diff --git a/ffserver_config.h b/ffserver_config.h
index bdeb3c9..1b12194 100644
--- a/ffserver_config.h
+++ b/ffserver_config.h
@@ -79,6 +79,7 @@ typedef struct FFServerStream {
 int multicast_port;   /* first port used for multicast */
 int multicast_ttl;
 int loop; /* if true, send the stream in loops (only meaningful if file) */
+char single_frame;/* only single frame */
 
 /* feed specific */
 int feed_opened;  /* true if someone is writing to the feed */
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index e6a9d01..2c78e39 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -273,6 +273,7 @@ void av_register_all(void)
 REGISTER_MUXER   (SEGMENT,  stream_segment);
 REGISTER_DEMUXER (SHORTEN,  shorten);
 REGISTER_DEMUXER (SIFF, siff);
+REGISTER_MUXER   (SINGLEJPEG,   singlejpeg);
 REGISTER_DEMUXER (SLN,  sln);
 REGISTER_DEMUXER (SMACKER,  smacker);
 REGISTER_MUXDEMUX(SMJPEG,   smjpeg);
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 9b77cdc..9f1fab7 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -250,6 +250,18 @@ AVOutputFormat ff_mjpeg_muxer = {
 .write_packet  = ff_raw_write_packet,
 .flags = AVFMT_NOTIMESTAMPS,
 };
+
+AVOutputFormat ff_singlejpeg_muxer = {
+.name  = "singlejpeg",
+.long_name = NULL_IF_CONFIG_SMALL("JPEG single image"),
+.mime_type = "image/jpeg",
+.extensions= "jpg,jpeg",
+.audio_codec   = AV_CODEC_ID_NONE,
+.video_codec   = AV_CODEC_ID_MJPEG,
+.write_packet  = ff_raw_write_packet,
+.flags = AVFMT_NOTIMESTAMPS,
+.write_header  = force_one_stream,
+};
 #endif
 
 #if CONFIG_MLP_MUXER
-- 
2.1.4




___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] ffserver jpg patch

2015-05-16 Thread Michael Niedermayer
On Sat, May 16, 2015 at 07:21:25PM -0600, ill wrote:
> 
> That file is attached
> >you would have to attach the file generated by git format-patch
> >also you of course first need to locally commit your changes
> >and set the commit message and author
> >see man git commit
> >
> >[...]
> >
> >
> >
> >___
> >ffmpeg-devel mailing list
> >ffmpeg-devel@ffmpeg.org
> >http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> 
> 
> 
> 
> 
> 

>  ffserver.c   |4 
>  ffserver_config.c|6 --
>  ffserver_config.h|1 +
>  libavformat/allformats.c |1 +
>  libavformat/rawenc.c |   12 
>  5 files changed, 22 insertions(+), 2 deletions(-)
> 45033f4565049ec4b1893023d52ce1799610a902  0001-ffserver-jpg-patch.patch
> From 5b681fdaf7971f841b84cfe06412c67ba417fb00 Mon Sep 17 00:00:00 2001
> From: Caligula useraccount 
> Date: Mon, 11 May 2015 17:42:42 -0600

> Subject: [PATCH] ffserver jpg patch

the commit message should describe what the commit does
how it does it and why it does


> 
> ---
>  ffserver.c   |  4 
>  ffserver_config.c|  6 --
>  ffserver_config.h|  1 +

>  libavformat/allformats.c |  1 +
>  libavformat/rawenc.c | 12 

changes to libavformat and ffserver should be in seperate patches
ideally

also please see
http://ffmpeg.org/developer.html#New-codecs-or-formats-checklist

Thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] ffserver regression jpg fix for mjpg streaming data sent to browser instead of jpg image

2015-05-16 Thread ill



That file is attached

you would have to attach the file generated by git format-patch
also you of course first need to locally commit your changes
and set the commit message and author
see man git commit

[...]



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel







  ffserver.c   |4 
  ffserver_config.c|6 --
  ffserver_config.h|1 +
  libavformat/allformats.c |1 +
  libavformat/rawenc.c |   12 
  5 files changed, 22 insertions(+), 2 deletions(-)
45033f4565049ec4b1893023d52ce1799610a902  0001-ffserver-jpg-patch.patch
 From 5b681fdaf7971f841b84cfe06412c67ba417fb00 Mon Sep 17 00:00:00 2001
From: Caligula useraccount 
Date: Mon, 11 May 2015 17:42:42 -0600
Subject: [PATCH] ffserver jpg patch

the commit message should describe what the commit does
how it does it and why it does



It fixes a regression that ffserver doesn't use jpg for said format.


---
  ffserver.c   |  4 
  ffserver_config.c|  6 --
  ffserver_config.h|  1 +
  libavformat/allformats.c |  1 +
  libavformat/rawenc.c | 12 

changes to libavformat and ffserver should be in seperate patches
ideally
Do you have experience in that? I tried cutting and pasting the 
libavformat parts to a different patch but that makes it not work. Is 
that a strict requirement? I think the changes don't work separately.



also please see
http://ffmpeg.org/developer.html#New-codecs-or-formats-checklist
It's not a new codec or format. All it does is fix an already existing 
format (jpg)
I also don't know what 90% of the stuff it is talking about on that page 
is, but it does compile and fixes the bug, so 12 is good, and I think 4.



Thanks

[...]


___
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