Answers.Body: <p>The player panic you are experiencing might be due to the checksum in the ogg header. If you recalculate the checksum for the whole header with your new value you might get a valid file again.
  <a href="http://en.wikipedia.org/wiki/Ogg#Page_structure" rel="nofollow">http://en.wikipedia.org/wiki/Ogg#Page_structure</a></p>
  
  <p>Though I dont know all too much about the ogg and vorbis specs. For this kind of low level work its always a good idea to read the specs.
  <a href="http://xiph.org/vorbis/doc/Vorbis_I_spec.html" rel="nofollow">http://xiph.org/vorbis/doc/Vorbis_I_spec.html</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-10T20:34:21.783Z
Answers.LastActivityDate: 2014-11-10T20:34:21.783Z
Answers.UserDisplayName: timonsku
Body: <p>I have an Ogg Theora file, but unfortunately the display ratio is incorrect on it. I know that it's possible to edit the metadata without reencoding.</p>
  
  <p>What tool can do the job? Preferably something that can be run on *nix.</p>
  
  <p><code>ogginfo</code> from <code>vorbistools</code> gives the metatada that i would like to edit, but that package doesn't provide anything to change the values, liboggz doesn't seem to do the trick either.</p>
  
  <p>I have attempted to play around with the hexeditor, here's what i've found. Here is my theora packet:</p>
  
  <pre><code> 00000000:  4f 67 67 53 00 02 00 00  00 00 00 00 00 00 00 00  OggS............
   00000010:  00 00 00 00 00 00 70 e4  97 9a 01 2a 80 74 68 65  ......p....*.the
   00000020:  6f 72 61 03 02 01 00 2d  00 24 00 02 d0 00 02 40  ora....-.$.....@
   00000030:  00 00 00 00 00 19 00 00  00 01 00 00 c9 00 00 6a  ...............j
   00000040:  00 03 0d 40 00 80 4f 67  67 53 00 02 00 00 00 00  ...@..OggS......
  </code></pre>
  
  <p>The <code>00 00 c9 00 00 6a</code> block is where pixel aspect ratio is being stored, as i understand it the first 3 words are the numerator, and the second 3 denominator.</p>
  
  <p>If i change the values only in the first packet, then <code>avprobe</code> does return the changed values, but then all video players i've tried panic. Any hints on how to change the other packets so that they conform?</p>
  
Tags: <aspect>
Title: How to change the display ratio of a Theora track inside Ogg?
UserDisplayName: v010dya
ThreadText: # How to change the display ratio of a Theora track inside Ogg?
  
  (Asked by: username_0 on 2014-11-06)
  
  I have an Ogg Theora file, but unfortunately the display ratio is incorrect on it. I know that it's possible to edit the metadata without reencoding.
  
  What tool can do the job? Preferably something that can be run on \*nix.
  
  `ogginfo` from `vorbistools` gives the metatada that i would like to edit, but that package doesn't provide anything to change the values, liboggz doesn't seem to do the trick either.
  
  I have attempted to play around with the hexeditor, here's what i've found. Here is my theora packet:
  
  ```
   00000000:  4f 67 67 53 00 02 00 00  00 00 00 00 00 00 00 00  OggS............
   00000010:  00 00 00 00 00 00 70 e4  97 9a 01 2a 80 74 68 65  ......p....*.the
   00000020:  6f 72 61 03 02 01 00 2d  00 24 00 02 d0 00 02 40  ora....-.$.....@
   00000030:  00 00 00 00 00 19 00 00  00 01 00 00 c9 00 00 6a  ...............j
   00000040:  00 03 0d 40 00 80 4f 67  67 53 00 02 00 00 00 00  ...@..OggS......
  
  ```
  
  The `00 00 c9 00 00 6a` block is where pixel aspect ratio is being stored, as i understand it the first 3 words are the numerator, and the second 3 denominator.
  
  If i change the values only in the first packet, then `avprobe` does return the changed values, but then all video players i've tried panic. Any hints on how to change the other packets so that they conform?
  
  **Tags:** aspect
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-11-10. Score: 2 | Accepted answer
  
  The player panic you are experiencing might be due to the checksum in the ogg header. If you recalculate the checksum for the whole header with your new value you might get a valid file again.
  <http://en.wikipedia.org/wiki/Ogg#Page_structure>
  
  Though I dont know all too much about the ogg and vorbis specs. For this kind of low level work its always a good idea to read the specs.
  <http://xiph.org/vorbis/doc/Vorbis_I_spec.html>
  
  
  ---
  
  