bvrulez wrote: 
> How can I analyse the file to know what exactly was written to it?
> Thanks!

Depends on your background. I'm OK with decoding raw data so i used
hexdump as I knew MP3 headers & IDV3.* are relatively simple, well
documented (https://id3.org/id3v2.3.0#ID3v2_overview) and it was quicker
than trying to find a tool.

You could try ffmpeg/ffplay with loglevel of trace (e.g. ffplay -v trace
filename.mp3) . It can produce output shown below for the original
problem file "New Psycho". The Flags show 0x40 as the "extended header"
(look at id3 linked page) 

Code:
--------------------
    
  [mp3 @ 0x7f57c0000bc0] Format mp3 probed with size=32768 and score=51         
                                                                                
                             
  id3v2 ver:4 flags:40 len:13993                                                
                                                                                
                             
  [mp3 @ 0x7f57c0000bc0] Skipping 0 bytes of junk at 14003.
  [mp3 @ 0x7f57c0000bc0] Before avformat_find_stream_info() pos: 14003 bytes 
read:32768 seeks:0 nb_streams:2
  [mjpeg @ 0x7f57c00084c0] marker=d8 avail_size_in_buf=13799                    
                                                                                
                             
  [mjpeg @ 0x7f57c00084c0] marker parser used 0 bytes (0 bits)                  
                                                                                
                             
  [mjpeg @ 0x7f57c00084c0] marker=e0 avail_size_in_buf=13797                    
                                                                                
                             
  .
  .
  .
  [mjpeg @ 0x7f57c00084c0] decode frame unused 0 bytes                          
                                                                                
                             
  [mp3 @ 0x7f57c0000bc0] All info found                                         
                                                                                
                             
  [mp3 @ 0x7f57c0000bc0] Estimating duration from bitrate, this may be 
inaccurate
  [mp3 @ 0x7f57c0000bc0] stream 0: start_time: 0.000 duration: 306.725
  [mp3 @ 0x7f57c0000bc0] stream 1: start_time: -102481911520608.625 duration: 
306.725                                                                         
                               
  [mp3 @ 0x7f57c0000bc0] format: start_time: 0.000 duration: 306.725 
bitrate=192 kb/s                                                                
                                        
  [mp3 @ 0x7f57c0000bc0] After avformat_find_stream_info() pos: 43699 bytes 
read:65536 seeks:0 frames:51                                                    
                                 
  Input #0, mp3, from '2008+03+22+05+New+Psycho.mp3':
  Metadata:
  encoder         : MP3FS
  title           : 2008 03 22 05 New Psycho
  artist          : phaze
  album_artist    : phaze
  album           : Proberaum
  genre           : Rock
  TLEN            : 306689
  Duration: 00:05:06.73, start: 0.000000, bitrate: 192 kb/s
  Stream #0:0, 50, 1/14112000: Audio: mp3, 48000 Hz, stereo, fltp, 192 kb/s
  Stream #0:1, 1, 1/90000: Video: mjpeg (Baseline), 1 reference frame, 
yuvj420p(pc, bt470bg/unknown/unknown, center), 300x300 [SAR 1:1 DAR 1:1], 0/1, 
90k tbr, 90k tbn, 90k tbc (attached pic)
  Metadata:
  title           : cover.jpg
  comment         : Cover (front)
  .
  .
  .
  
--------------------


For other formats where documentation is hard to find and/or uses more
intricate encoding (e.g. MPEG4) - a existing tool


------------------------------------------------------------------------
bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=115010

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss

Reply via email to