Timecodes of segments

Any other question that don't fit into the other support categorizes.
Post Reply
nsdfxela
Posts: 1
Joined: Mon Jun 15, 2015 7:22 pm

Timecodes of segments

Post by nsdfxela »

Hello everyone!
I am trying to use ffmpeg to transcode some source files into limited range of destination formats. One of ffmpeg-features I need to use in my work is "cutting" result files in pieces via segment-muxer. I also need to be able to set timecodes for result videos in to different ways: 1. "continuous" (when each segment has increasing timecode that depends on segment's duration and its order in resulting chain) and 2. "renewable" (when all segments have the same preassigned timecode-value). And I'm actually having problem with the first one: while I'm trying to set "reset_timestamps" value to 0, I see no result e.g. all segments have the same timecodes as in case when I set "reset_timestamps" to 1. Does anyone know if it's possible to work with timecodes and segments in "continuous" way? Here is the example of command I tried:

Code: Select all

ffmpeg -ss 00:00:00 -t 00:00:05.0400000 -i "D:\stest-2\P2-dvcpro25\contents\video\000000.MXF" -ss 00:00:00 -t 00:00:05.0400000 -i "D:\stest-2\P2-dvcpro25\contents\audio\00000000.MXF" -ss 00:00:00 -t 00:00:05.0400000 -i "D:\stest-2\P2-dvcpro25\contents\audio\00000001.MXF" -ss 00:00:00 -t 00:00:05.0400000 -i "D:\stest-2\P2-dvcpro25\contents\audio\00000002.MXF" -ss 00:00:00 -t 00:00:05.0400000 -i "D:\stest-2\P2-dvcpro25\contents\audio\00000003.MXF" -filter_complex "[0:v]scale=720:-1,pad=720:576:0:0:black,setsar=sar=4:3[aa]; [aa]concat=n=1:v=1:a=0 [v]; [1:a]concat=n=1:v=0:a=1 [ao0];[2:a]concat=n=1:v=0:a=1 [ao1];[3:a]concat=n=1:v=0:a=1 [ao2];[4:a]concat=n=1:v=0:a=1 [ao3];[1:a]concat=n=1:v=0:a=1 [ao4];[2:a]concat=n=1:v=0:a=1 [ao5];[3:a]concat=n=1:v=0:a=1 [ao6];[4:a]concat=n=1:v=0:a=1 [ao7]" -threads 2  -r 25 -flags +ildct  -g 1  -timecode 00:00:16:00  -aspect 4:3  -ar 48000  -pix_fmt yuv422p  -vcodec mpeg2video  -b 50000k  -minrate 50000k  -maxrate 50000k  -bufsize 50000k  -acodec pcm_s16le  -map "[v]" -map "[ao0]"  -map "[ao1]"  -map "[ao2]"  -map "[ao3]"  -map "[ao4]"  -map "[ao5]"  -map "[ao6]"  -map "[ao7]"  -f segment -reset_timestamps 1 -segment_time 2  "D:\tmp\test_0001_22_11_17_000012_%03d.mxf"
And I am checking timecode values via MediInfo:

Code: Select all

...
Other #1
ID                                       : 1-Material
Type                                     : Time code
Format                                   : MXF TC
Time code of first frame                 : 00:16:00:00
Time code settings                       : Material Package
Time code, striped                       : Yes

Other #2
ID                                       : 1-Source
Type                                     : Time code
Format                                   : MXF TC
Time code of first frame                 : 00:16:00:00
Time code settings                       : Source Package
Time code, striped                       : Yes

Other #3
Type                                     : Time code
Format                                   : SMPTE TC
Muxing mode                              : SDTI
Time code of first frame                 : 00:16:00:00

Post Reply