[libav-tools] attachment: 0 packets muxed

Jean-Christian de Rivaz jc at eclis.ch
Wed Apr 1 04:28:01 CEST 2015


Hi, I try to attach a JSON file into a Matroska/FLAC file with this command:

avconv -v 255 -y -i data.mka -f matroska -c copy -metadata:s:t:0 
mimetype=application/json -attach text.json test.mka

But the attachment is not written into the output file. Below is the 
debug messages:

avconv version v12_dev0-1130-gff7adea, Copyright (c) 2000-2015 the Libav 
developers
   built on Mar 30 2015 16:42:14 with gcc 4.7 (Debian 4.7.2-5)
   configuration: --enable-shared --disable-everything 
--enable-encoder=flac --enable-decoder=flac --enable-muxer=matroska 
--enable-demuxer=matroska --enable-protocol=file
   libavutil     54. 10. 0 / 54. 10. 0
   libavcodec    56. 22. 0 / 56. 22. 0
   libavformat   56. 18. 0 / 56. 18. 0
   libavdevice   55.  1. 0 / 55.  1. 0
   libavfilter    5.  0. 0 /  5.  0. 0
   libavresample  2.  1. 0 /  2.  1. 0
   libswscale     3.  0. 0 /  3.  0. 0
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging level) 
with argument '255'.
Reading option '-y' ... matched as option 'y' (overwrite output files) 
with argument '1'.
Reading option '-i' ... matched as input file with argument 'data.mka'.
Reading option '-f' ... matched as option 'f' (force format) with 
argument 'matroska'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 
'copy'.
Reading option '-metadata:s:t:0' ... matched as option 'metadata' (add 
metadata) with argument 'mimetype=application/json'.
Reading option '-attach' ... matched as option 'attach' (add an 
attachment to the output file) with argument 'text.json'.
Reading option 'test.mka' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set libav* logging level) with argument 255.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file data.mka.
Successfully parsed a group of options.
Opening an input file: data.mka.
[matroska,webm @ 0xe8f7a0] Probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0xe8f7a0] All info found
[matroska,webm @ 0xe8f7a0] Estimating duration from bitrate, this may be 
inaccurate
Input #0, matroska,webm, from 'data.mka':
   Metadata:
     ENCODER         : Lavf56.1.0
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0, 1, 1/1000: Audio: flac
       400 Hz, 3.0, s32
Successfully opened the file.
Parsing a group of options: output file test.mka.
Applying option f (force format) with argument matroska.
Applying option c (codec name) with argument copy.
Applying option metadata:s:t:0 (add metadata) with argument 
mimetype=application/json.
Applying option attach (add an attachment to the output file) with 
argument text.json.
Successfully parsed a group of options.
Opening an output file: test.mka.
Successfully opened the file.
Output #0, matroska, to 'test.mka':
   Metadata:
     encoder         : Lavf56.18.0
     Stream #0:0, 0, 1/1000: Audio: flac [[172][241][0][0] / 0xF1AC]
       400 Hz, 3.0
     Stream #0:1, 0, 1/1000: Attachment: [0][0][0][0] / 0x0000, 200 kb/s
     Metadata:
       filename        : text.json
       mimetype        : application/json
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   File text.json -> Stream #0:1
Press ctrl-c to stop encoding
[matroska @ 0xe91980] Writing block at offset 720, size 2067, pts 1008, 
dts 1008, duration 0, flags 128
[matroska @ 0xe91980] Writing block at offset 2794, size 2058, pts 2008, 
dts 2008, duration 0, flags 128
[matroska @ 0xe91980] Writing block at offset 4859, size 2062, pts 3008, 
dts 3008, duration 0, flags 128
[matroska @ 0xe91980] Writing block at offset 6928, size 2053, pts 4008, 
dts 4008, duration 0, flags 128
[matroska @ 0xe91980] Writing block at offset 8988, size 2076, pts 5008, 
dts 5008, duration 0, flags 128
[matroska @ 0xe91980] Starting new cluster at offset 11071 bytes, pts 
7008dts 7008
[...]
[matroska @ 0xe91980] Starting new cluster at offset 425844 bytes, pts 
207008dts 207008
[matroska @ 0xe91980] Writing block at offset 425861, size 2062, pts 
206008, dts 206008, duration 0, flags 128
No more output streams to write to, finishing.
Writing block at offset 427930, size 2070, pts 207008, dts 207008, 
duration 0, flags 128
[matroska @ 0xe91980] end duration = 207008
size=     420kB time=207.01 bitrate=  16.6kbits/s
video:0kB audio:417kB other streams:0kB global headers:0kB muxing 
overhead: 0.668145%
Input file #0 (data.mka):
   Input stream #0:0 (audio): 207 packets read (427153 bytes);
   Total: 207 packets (427153 bytes) demuxed
Output file #0 (test.mka):
   Output stream #0:0 (audio): 207 packets muxed (427153 bytes);
   Output stream #0:1 (attachment): 0 packets muxed (0 bytes);
   Total: 207 packets (427153 bytes) muxed

Why there is no packet muxed for the attachment ? The text.json file is 
5022 bytes long.

Regards,
Jean-Christian


More information about the libav-tools mailing list