Body: <p>So I download ts files from h264.m3u8. The files look like this &quot;https://.net/data/3/a/e/6d162b532610fdae/h264_00000005.ts &quot;. I merge them into one common ts file. And I'm trying to get an mp4 file using ffmpeg. I execute the following command <code>sudo /opt/ffmpeg/bin/ffmpeg -y -f mpeg ts -i concat:/tmp/yLx1B9X9Mb/lujqnqQrtm.ts -c copy -bsf:a aac_adtstoasc output.mp4.</code> After that, I get</p>
  <pre><code>ffmpeg version n3.1-1-g36fcb8c Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
    configuration: --enable-gpl --enable-version3 --enable-libfdk_aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libgsm --enable-libxvid --disable-static --enable-shared --prefix=/opt/ffmpeg
    libavutil      55. 27.100 / 55. 27.100
    libavcodec     57. 48.101 / 57. 48.101
    libavformat    57. 40.101 / 57. 40.101
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 46.102 /  6. 46.102
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  1.100 /  2.  1.100
    libpostproc    54.  0.100 / 54.  0.100
  [mpegts @ 0x1bc9540] Could not detect TS packet size, defaulting to non-FEC/DVHS
  [mpegts @ 0x1bc9540] PES packet size mismatch
      Last message repeated 1 times
  [mpegts @ 0x1bc9540] probed stream 0 failed
  [mpegts @ 0x1bc9540] nothing to probe for stream 1
  [mpegts @ 0x1bc9540] probed stream 1 failed
  [mpegts @ 0x1bc9540] probed stream 2 failed
  [mpegts @ 0x1bc9540] Could not find codec parameters for stream 0 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [mpegts @ 0x1bc9540] Could not find codec parameters for stream 1 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [mpegts @ 0x1bc9540] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, mpegts, from 'concat:/tmp/yLx1B9X9Mb/lujqnqQrtm.ts':
    Duration: N/A, bitrate: N/A
      Stream #0:0[0xfaf]: Unknown: none
      Stream #0:1[0x15]: Unknown: none
      Stream #0:2[0x15b4]: Unknown: none
  Output #0, mp4, to 'output.mp4':
  Output file #0 does not contain any stream
  </code></pre>
  <p>The main problem is that it works for other ts files, but in this case it doesn't. I suspect that the whole problem is that there is a block with h264_init.mp4 here in m3u8, but to be honest I don't understand what I need to do with it.</p>
  <p>It seems to me that I have already tried everything, but maybe I was doing it wrong</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-07T04:08:58.927Z
Comments.Text: You're using an obsolete version of ffmpeg. Upgrade to 6.1 and try.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-08T12:00:07.447Z
Comments.Text: Thanks, but it works with this version too. I immediately merge it not into a ts file, but into an mp4 and after that ffmpeg -i h264_raw.mp4 -c:v copy -c:a copy h264.mp4
Comments.UserDisplayName: Ryan 
Tags: <ffmpeg><linux>
Title: The problem with converting ts files to mp4
UserDisplayName: Ryan 
ThreadText: # The problem with converting ts files to mp4
  
  (Asked by: username_0 on 2023-12-06)
  
  So I download ts files from h264.m3u8. The files look like this "https://.net/data/3/a/e/6d162b532610fdae/h264\_00000005.ts ". I merge them into one common ts file. And I'm trying to get an mp4 file using ffmpeg. I execute the following command `sudo /opt/ffmpeg/bin/ffmpeg -y -f mpeg ts -i concat:/tmp/yLx1B9X9Mb/lujqnqQrtm.ts -c copy -bsf:a aac_adtstoasc output.mp4.` After that, I get
  
  ```
  ffmpeg version n3.1-1-g36fcb8c Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
    configuration: --enable-gpl --enable-version3 --enable-libfdk_aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libgsm --enable-libxvid --disable-static --enable-shared --prefix=/opt/ffmpeg
    libavutil      55. 27.100 / 55. 27.100
    libavcodec     57. 48.101 / 57. 48.101
    libavformat    57. 40.101 / 57. 40.101
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 46.102 /  6. 46.102
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  1.100 /  2.  1.100
    libpostproc    54.  0.100 / 54.  0.100
  [mpegts @ 0x1bc9540] Could not detect TS packet size, defaulting to non-FEC/DVHS
  [mpegts @ 0x1bc9540] PES packet size mismatch
      Last message repeated 1 times
  [mpegts @ 0x1bc9540] probed stream 0 failed
  [mpegts @ 0x1bc9540] nothing to probe for stream 1
  [mpegts @ 0x1bc9540] probed stream 1 failed
  [mpegts @ 0x1bc9540] probed stream 2 failed
  [mpegts @ 0x1bc9540] Could not find codec parameters for stream 0 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [mpegts @ 0x1bc9540] Could not find codec parameters for stream 1 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [mpegts @ 0x1bc9540] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, mpegts, from 'concat:/tmp/yLx1B9X9Mb/lujqnqQrtm.ts':
    Duration: N/A, bitrate: N/A
      Stream #0:0[0xfaf]: Unknown: none
      Stream #0:1[0x15]: Unknown: none
      Stream #0:2[0x15b4]: Unknown: none
  Output #0, mp4, to 'output.mp4':
  Output file #0 does not contain any stream
  
  ```
  
  The main problem is that it works for other ts files, but in this case it doesn't. I suspect that the whole problem is that there is a block with h264\_init.mp4 here in m3u8, but to be honest I don't understand what I need to do with it.
  
  It seems to me that I have already tried everything, but maybe I was doing it wrong
  
  **Tags:** ffmpeg, linux
  
  > **Comments:**
  > **username_1**: You're using an obsolete version of ffmpeg. Upgrade to 6.1 and try.  
  > **username_0**: Thanks, but it works with this version too. I immediately merge it not into a ts file, but into an mp4 and after that ffmpeg -i h264_raw.mp4 -c:v copy -c:a copy h264.mp4  
  
  ---
  
  ## 0 answers
  
  