[FFmpeg-devel] [PATCH] matroskadec: Export the MuxingApp element value as metadata

Michael Niedermayer michaelni at gmx.at
Sun Dec 1 22:52:01 CET 2013


On Sun, Dec 01, 2013 at 02:18:09PM -0300, James Almer wrote:
> On 01/12/13 8:11 AM, Michael Niedermayer wrote:
> > On Sun, Nov 24, 2013 at 05:31:48AM -0300, James Almer wrote:
> >> Signed-off-by: James Almer <jamrial at gmail.com>
> >> ---
> >>  libavformat/matroskadec.c | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > this leaks the muxer app into the output file
> > 
> > for example when transcoding to nut with -flags +bitexact but
> > there are probably other cases too
> 
> I'm not sure i follow. What difference does it make reading the value 
> for the "encoder" dict entry from MATROSKA_ID_MUXINGAPP instead of a 
> Tag as we're currently doing?
> 
> I tried remuxing from a matroska file into nut with and without this 
> patch and every available dict entry in the mkv file was copied even 
> when using -flags +bitexact to mux the nut.
> This patch doesn't really make any difference in that regard. It simply 
> sets a standard dict entry using the proper string present in every 
> matroska file.

./ffmpeg -i ~/videos/gg_moshidora01_sample.mkv -flags +bitexact test.nut

before the patch:
Input #0, nut, from 'test.nut':
  Duration: 00:00:20.93, start: 0.000000, bitrate: 899 kb/s
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 48k tbn, 48k tbc (default)
    Metadata:
      title           : Moshidora - 01
    Stream #0:1(jpn): Audio: vorbis (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Stereo AAC


after the patch:
Input #0, nut, from 'test2.nut':
  Metadata:
    encoder         : libebml v1.0.0 + libmatroska v1.0.0
  Duration: 00:00:27.65, start: 0.000000, bitrate: 894 kb/s
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 48k tbn, 48k tbc (default)
    Metadata:
      title           : Moshidora - 01
    Stream #0:1(jpn): Audio: vorbis (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Stereo AAC


the nut files are not generated with libebml nor with libmatroska
the metadata is wrong

If you wish to export this from the matroska demuxer you must ensure
ffmpeg doesnt copy it blindly. Theres at least code to prevent
copying "duration" already
also not sure "encoder" is the correct name for it

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

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131201/2451a985/attachment.asc>


More information about the ffmpeg-devel mailing list