[FFmpeg-trac] #7334(ffmpeg:new): ffmpeg demux into audio and video resets PTS

FFmpeg trac at avcodec.org
Mon Jul 30 03:37:16 EEST 2018

#7334: ffmpeg demux into audio and video resets PTS
             Reporter:  mukunm       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  git-
             Keywords:  ffmpeg,      |  master
  demux                              |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |

 I am demuxing TS segments into audio and video as follows.

     `ffmpeg -y -i input.ts -vcodec copy -an output_video.ts`
     `ffmpeg -y -i input.ts -acodec copy -vn output_audio.aac`

 **Inspecting Input**

 The `start_pts` and `start_time` on `input.ts` are as shown below. I was
 able to inspect these values using `ffprobe -show_streams -print_format
 json input.ts`

     `"start_pts": 8306558438,`
     `"start_time": "92295.093756",`
 **Inspecting output video**

 The output .ts has some default `start_pts` and `start_time` values as
 shown below. These were also obtained using the same `ffprobe` command as
 indicated above.

     `"start_pts": 126000,`
     `"start_time": "1.400000",`

 **Inspecting output audio**

 The same `ffprobe` command on `output_audio.aac` shows that the output aac
 has invalid `codec_tag` and `codec_tag_string` as shown below. The
 `start_pts` and `start_time` are not present in the `output_audio.aac`.

     `"codec_tag_string": "[0][0][0][0]", (should have been [15][0][0][0])`
     `"codec_tag": "0x0000", (should have been 0xf000)`


 1. Wondering if this difference in the `start_pts`, `start_time`,
 `codec_tag` is expected?
 2. If it is expected, what can I do to ensure that the all of these
 parameters get retained on the output?
 3. If it is not expected, is there some more information I can share to
 track this down?


 ''There were other outputs that I found inconsistent in the `ffprobe`
 command for the `output_audio.aac` like `duration etc.`. I shared what I
 thought are most valuable at this point. If required I can share complete
 outputs from all of the above executions.''

 ffmpeg version used:

Ticket URL: <https://trac.ffmpeg.org/ticket/7334>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list