Answers.Body: <p>After some further investigation, I found that when you use the <code>Apple 240p30</code> preset, Handbrake uses the <code>x264</code> encoder.  I tried various <a href="http://www.chaneru.com/Roku/HLS/X264_Settings.htm" rel="nofollow noreferrer">command-line options</a> for this tool but was not able to affect a change.  If the problem relates to keyframes, there seem to be options to <em>create</em> keyframes at various intervals in the output, but not to detect where they are in the input, nor to affect the demuxer beyond choosing which library to use (and they must be bundled with the compiled x264 software, which I can't know if they are or not with Handbrake).</p>
  <p>Instead, going earlier on the chain, I revisited the m3u8 downloader Chrome plugin, and tried to export as a <code>.ts</code> file instead of <code>.mp4</code>, and when I ran this through Handbrake it worked perfectly.  Presumably this was then a problem with the downloader plugin and not Handbrake.  I am guessing that VLC was simply robust enough to fudge over the issue and continue to play the original file, whereas x264 was not.</p>
  <p>Problem solved.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-27T09:50:40.753Z
Answers.LastActivityDate: 2023-05-27T09:50:40.753Z
Answers.UserDisplayName: Matt Mc
Body: <p>I downloaded an m3u8 stream using a <a href="https://chrome.google.com/webstore/detail/m3u8-downloader/pibnhedpldjakfpnfkabbnifhmokakfb" rel="nofollow noreferrer">Chrome plugin</a>, and it created an mp4 file which I can play fully in VLC.</p>
  <p>Next, I am attempting to use Handbrake to encode this file to be played on an old iPod Nano.  I am using the Apple 240p30 preset.  The resulting mp4 does play on my Mac (Preview, Quicktime) and on my Nano.</p>
  <p>However, the final video has a glitch whereby at the first interstitial (commercial) the video fast-forwards for a second and then freezes permanently, while the audio carries on valiantly for the entire 30 minutes of the video.  This happens when I play it on the Mac and Nano.</p>
  <p>I'm a software engineer, so I tried researching this problem but I came up blank, possibly because I do not know the terminology and am not deeply familiar with the various ways that video encoding works.  The most likely lead was <a href="https://discussion.mcebuddy2x.com/t/video-freezes-for-a-few-seconds-in-the-begining/4322/2" rel="nofollow noreferrer">this thread about MCEBuddy</a> which I believe uses Handbrake under the hood.  The description of <em>&quot;I have noticed similar behavior. The video freezes at the commercial cut point (chapter break) but the audio keeps going&quot;</em> matches what I am experiencing.</p>
  <p>Does anyone familiar with Handbrake know how to configure it to avoid this behavior?</p>
  
Tags: <video><encoding><mp4><conversion><handbrake>
Title: Handbrake Output Visually Freezes on Interstitial
UserDisplayName: Matt Mc
ThreadText: # Handbrake Output Visually Freezes on Interstitial
  
  (Asked by: username_0 on 2023-05-27)
  
  I downloaded an m3u8 stream using a [Chrome plugin](https://chrome.google.com/webstore/detail/m3u8-downloader/pibnhedpldjakfpnfkabbnifhmokakfb), and it created an mp4 file which I can play fully in VLC.
  
  Next, I am attempting to use Handbrake to encode this file to be played on an old iPod Nano. I am using the Apple 240p30 preset. The resulting mp4 does play on my Mac (Preview, Quicktime) and on my Nano.
  
  However, the final video has a glitch whereby at the first interstitial (commercial) the video fast-forwards for a second and then freezes permanently, while the audio carries on valiantly for the entire 30 minutes of the video. This happens when I play it on the Mac and Nano.
  
  I'm a software engineer, so I tried researching this problem but I came up blank, possibly because I do not know the terminology and am not deeply familiar with the various ways that video encoding works. The most likely lead was [this thread about MCEBuddy](https://discussion.mcebuddy2x.com/t/video-freezes-for-a-few-seconds-in-the-begining/4322/2) which I believe uses Handbrake under the hood. The description of *"I have noticed similar behavior. The video freezes at the commercial cut point (chapter break) but the audio keeps going"* matches what I am experiencing.
  
  Does anyone familiar with Handbrake know how to configure it to avoid this behavior?
  
  **Tags:** video, encoding, mp4, conversion, handbrake
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-05-27. Score: 0
  
  After some further investigation, I found that when you use the `Apple 240p30` preset, Handbrake uses the `x264` encoder. I tried various [command-line options](http://www.chaneru.com/Roku/HLS/X264_Settings.htm) for this tool but was not able to affect a change. If the problem relates to keyframes, there seem to be options to *create* keyframes at various intervals in the output, but not to detect where they are in the input, nor to affect the demuxer beyond choosing which library to use (and they must be bundled with the compiled x264 software, which I can't know if they are or not with Handbrake).
  
  Instead, going earlier on the chain, I revisited the m3u8 downloader Chrome plugin, and tried to export as a `.ts` file instead of `.mp4`, and when I ran this through Handbrake it worked perfectly. Presumably this was then a problem with the downloader plugin and not Handbrake. I am guessing that VLC was simply robust enough to fudge over the issue and continue to play the original file, whereas x264 was not.
  
  Problem solved.
  
  
  ---
  
  