Exemple #1
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                return;
            }

            string fileName = args[0];

            if (!File.Exists(fileName))
            {
                return;
            }

            using var fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
            using var br = new BinaryReader(fs, true);
            var container = Mp4Container.Parse(br);

            DumpBoxTree(container.Boxes);
            //ShowHandlers(container.Boxes);
            //ShowAudioInfo(container.Boxes);
            ExtractAudio(container.Boxes, fs);

            //Console.WriteLine(new BitBuilder(new Bit[]{1,2,3,4,5,6,7,8,9,0}).ToByte().ToString("X")); // TODO: バグで FE になってる
        }
Exemple #2
0
        public static Mp4Container Parse(BinaryReader reader)
        {
            Mp4Container container = new Mp4Container();

            new BoxParser(reader, container).Parse();

            return(container);
        }
Exemple #3
0
 public BoxParser(BinaryReader reader, Mp4Container container)
 {
     _reader    = reader;
     _container = container;
 }