[FFmpeg-devel] [PATCH] avformat/movenc: fix recognization of cover image streams

2018-06-04 Thread Timo Teräs
For chapter images, the mov demux produces streams with disposition set to attached_pic+timed_thumbnails. This patch fixes to properly recognize streams that should be encoded as cover image (ones with only and only attached_pic disposition set). Signed-off-by: Timo Teräs --- > ffmpeg should

[FFmpeg-devel] [PATCH v2] avformat/movenc: properly handle cover image codecs

2018-05-31 Thread Timo Teräs
Find codec tag for attached images using appropriate list of supported image formats. This fixes writing the cover image to m4v/m4a and other container formats that do not allow these codecs as a track. Signed-off-by: Timo Teräs --- This replaces the previous patch: PATCH] [RFC] avformat

[FFmpeg-devel] [PATCH] avformat/movenc: properly handle cover image codecs

2018-05-31 Thread Timo Teräs
Find codec tag for attached images using appropriate list of supported image formats. This fixes writing the cover image to m4v/m4a and other container formats that do not allow these codecs as a track. Signed-off-by: Timo Teräs --- This replaces the previous patch: PATCH] [RFC] avformat

[FFmpeg-devel] [PATCH] [RFC] avformat/movenc: support covert images for ipod muxer

2018-05-31 Thread Timo Teräs
Add avformat_query_codec() to special handle 'APIC' tag in output format .codec_tag list in addition to .query_codec. Advertise codecs for cover image with 'APIC' tag in ipod muxer. Signed-off-by: Timo Teräs --- This makes writing cover images to m4a files to work. However, I was trying

[FFmpeg-devel] [PATCH 1/1] [RFC] ffprobe: report DAR even if SAR is undefined

2018-04-15 Thread Timo Teräs
data. So the simplest way to report DAR is assume SAR 1:1 when undefined. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- This applies on top of the previous DAR/SAR reporting fix: https://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228141.html For more details behind this patch, see:

[FFmpeg-devel] [PATCH v2] avformat/movenc: support writing iTunes cover image

2018-04-14 Thread Timo Teräs
mp4 The cover image is also copied correctly with: ffmpeg -i movie-with-cover.mp4 -map 0 -c copy out.mp4 AtomicParseley says that the attached_pic stream is properly not visible in the main tracks of the file. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- v2: - Store the image in

[FFmpeg-devel] [PATCH] ffprobe: report unavailable SAR correctly in stream info

2018-04-12 Thread Timo Teräs
av_guess_sample_aspect_ratio() will return undefined or missing value as {0,1}. This fixes show_stream() to check numerator to display 'N/A' when appropriate. show_frame() does this already correctly. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- fftools/ffprobe.c | 2 +- 1 file chan

Re: [FFmpeg-devel] [PATCH 3/3] avformat/movenc: support writing iTunes cover image

2018-04-10 Thread Timo Teräs
. Thanks Timo On Mon, Apr 2, 2018 at 11:36 AM, Timo Teräs <timo.te...@iki.fi> wrote: > Fixes https://trac.ffmpeg.org/ticket/2798 > > This makes movenc handle AV_DISPOSITION_ATTACHED_PIC and write > the associated pictures in iTunes cover atom. This corresponds > to how

[FFmpeg-devel] [PATCH] avformat/movenc: use correct iTunes copyright atom

2018-04-03 Thread Timo Teräs
to use. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- libavformat/movenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 97327f739d..54f19c3a73 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3484,7 +

[FFmpeg-devel] [PATCH v2 0/3] avformat/movenc: support writing iTunes cover image

2018-04-02 Thread Timo Teräs
av_copy_packet() Timo Teräs (3): ffmpeg: allow setting attached_pic disposition avformat/movenc: add rtp_hinting_needed() helper function avformat/movenc: support writing iTunes cover image fftools/ffmpeg.c | 1 + libavformat/avformat.h | 2 +- libavformat/movenc.c | 105

[FFmpeg-devel] [PATCH 3/3] avformat/movenc: support writing iTunes cover image

2018-04-02 Thread Timo Teräs
mp4 The cover image is also copied correctly with: ffmpeg -i movie-with-cover.mp4 -map 0 -c copy out.mp4 AtomicParseley says that the attached_pic stream is properly not visible in the main tracks of the file. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- libavformat/avformat.h | 2 +- li

[FFmpeg-devel] [PATCH 2/3] avformat/movenc: add rtp_hinting_needed() helper function

2018-04-02 Thread Timo Teräs
This is shared test and this simplifies code a bit. Follow up commit will have additional tests for this function. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- libavformat/movenc.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff

[FFmpeg-devel] [PATCH 1/3] ffmpeg: allow setting attached_pic disposition

2018-04-02 Thread Timo Teräs
This is used to signal that image should be stored in metadata as cover image. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- fftools/ffmpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 2f8a5ace56..4dbe72186d 100644 --- a/fftools/ff

[FFmpeg-devel] [PATCH] avformat/mov: parse multiple iTunes cover images

2018-03-29 Thread Timo Teräs
Multiple cover images are supported by having multiple data atoms inside the covr atom. AtomicParsley and mutagen amongst others support and document this construct. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- libavformat/mov.c | 4 1 file changed, 4 insertions(+) diff

[FFmpeg-devel] [PATCH] [RFC] avformat/movenc: support writing iTunes cover image

2018-03-29 Thread Timo Teräs
currently no other muxer supporting cover images than mp3 and it seems to use special code to handle them. Signed-off-by: Timo Teräs <timo.te...@iki.fi> Cc: Matthieu Bouron <matthieu.bou...@gmail.com> --- fftools/ffmpeg.c | 1 + libavformat/m

[FFmpeg-devel] [PATCH 1/1] avformat/movenc: use modern iTunes copyright atom

2018-03-28 Thread Timo Teräs
with this commit. Since 'cprt' seems to be the current correct atom, it is used by default. "-movflags legacy_copyright" option is added to revert back to the old atom type in case that is needed. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- If the legacy option is not needed, I'm happy

[FFmpeg-devel] [PATCH] mpegencts: Fix overflow in cbr mode period calculations

2015-11-27 Thread Timo Teräs
ts->mux_rate is int (signed 32-bit) type. The period calculations will start to overflow when mux_rate > 5mbps. This fixes overflows by using av_rescale(). Fixes #5044. Signed-off-by: Timo Teräs <timo.te...@iki.fi> --- libavformat/mpegtsenc.c | 9 +++-- 1 file changed, 3 inse