[FFmpeg-user] use ffmpeg to set start_time equal in audio and video elementary streams

Sajad Pourmohseni spurmohseni at gmail.com
Wed Sep 5 09:09:43 EEST 2018


Hi all


I am using ffmpeg tool for offline transcoding of some input files to
MPEG-TS format. I use ffprobe to analyze the output. I need the output
video to have equal values for start_timefor both video and audio
elementary streams. This is necessary for streaming by Perception streamer
server. My desired output is like this:



<streams>

    <stream index="0" /..../ codec_type="video" /.../ start_pts="YYY"
start_time="XXX" /..../

    </stream>

    <stream index="1" /..../ codec_type="audio" /.../ start_pts="YYY"
start_time="XXX" /..../

    </stream>

</streams>



I use this profile for transcoding:

ffmpeg -i input.mp4 -ss 0 -y -vcodec libx264 -vb 3404k -acodec libfdk_aac
-profile:a aac_he -strict experimental -ar 48k -f adts -ab 96k -r 25 -g 50
-force_key_frames 'expr:gte(t,n_forced*2)' -x264-params
keyint=50:min-keyint=50:scenecut=-1:force-cfr=1:nal-hrd=cbr -vsync 1 -async
1 -profile:v main -level 4.0 -s 1920x1080 -aspect 16:9 -avoid_negative_ts
make_zero -strict experimental -muxdelay 0 -muxpreload 0 -output_ts_offset
0 -initial_offset 0 -start_at_zero -bufsize 3500K -minrate 3500K -maxrate
3500K -f mpegts output.ts


How can I set start_time and start_pts like I explained?

--------------------------------------------------

kind regards

Sajad


More information about the ffmpeg-user mailing list