[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. Howe

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

2018-04-15 Thread Timo Teräs
ture and codec extra data. So the simplest way to report DAR is assume SAR 1:1 when undefined. Signed-off-by: Timo Teräs --- 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
vie-with-cover.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 --- v2: - Store the image in MOVTrack-

[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 --- fftools/ffprobe.c | 2 +- 1 file changed, 1 inser

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 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 'mov' demuxer par

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

2018-04-02 Thread Timo Teräs
x27;cprt' as it seems to be supported univerally and is the correct atom to use. Signed-off-by: Timo Teräs --- 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/

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

2018-04-02 Thread Timo Teräs
deprecated 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

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

2018-04-02 Thread Timo Teräs
vie-with-cover.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 --- libavformat/avformat.h | 2 +- liba

[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 --- libavformat/movenc.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/libavformat/movenc.c b

[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 --- 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/ffmpeg.c +++ b/fftools/ffmpeg.c

[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 --- libavformat/mov.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/mov.c b

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

2018-03-28 Thread Timo Teräs
. Seems there'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 Cc: Matthieu Bouron --- fftools/ffmpeg.c | 1 + libavformat/movenc.c | 67 2 files ch

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

2018-03-28 Thread Timo Teräs
ilst' tag and functions correctly with streams produced 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

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

2015-11-28 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 converting first to 64-bit type. Fixes #5044. Signed-off-by: Timo Teräs --- Seems av_rescale() was a bit overkill, and specifying the rounding mode ma

[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 --- libavformat/mpegtsenc.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-)