[FFmpeg-user] ffmpeg splite mkv file and transcode to a new file

Steven Liu lingjiujianke at gmail.com
Sun Oct 28 06:30:06 CET 2012


2012/10/27 Roger Pack <rogerdpack2 at gmail.com>:
>>             Use the command to split the mkv file and transcode it to
>> a new mpegts file,
>>             for example:
>>
>>             input mkv:  00:01:00.00,   i want to split the mkv from
>> 10s to 20s (duration is 10s),
>>             split the move from input mkv 00:00:10.00 duration 10s,
>> and copy the timestamp from input mkv.
>>             but the dest mpegts file's start time always from
>> 00:00:00.00 or error time (e.g. 00:00:01.400000).
>>             Perhaps the ffmpeg comput the pts error?
>>
>>             -copyts perhaps is nouse?
>
> what is your full command line and console output? Also what is your output of
> $ ffmpeg -i <input>
>
> for your output files?
command :
ffmpeg -ss 00:00:10.00 -t 10s -i input.mkv -strict experimental
-acodec aac -vcodec libx264 -map 0:0 -map 0:1  -b:v 2000k -r 15 -b:a
128k -ar 44100 -preset ultrafast -vprofile high  -f mpegts  -bsf:v
h264_mp4toannexb  -v debug -s 1280x720  -async 1 output.ts

I have asked for this problem, and you have anwsered for this question
before, you said try setpts parameter,
But that is not fix it.


ffprobe -show_packets  output.ts , all of the pts is from 0

I read the ffmpeg code, perhaps the pts comput result is wrong near
discontinunity.
I just want copy pts from input stream (input.mkv), perhaps it ffmpeg
have not designed for this feature.


Thanks


More information about the ffmpeg-user mailing list