1

I'm not ffmpeg and encodding expert and am trying to encode a MP4 file to MPEG-4 h264.

When Elecard stream analyzer is analyzing my result .ts file, it shows slice_type = 7 for all of i-frames as you can see in the attached screenshot.

How can I change all these to slice_type = 2?

My ffmpeg command:

-i Source.mp4 \
-filter:v 'setpts=0+PTS-STARTPTS' -metadata:s:v:0 start_time=0 \
-f adts -c:a libfdk_aac  -profile:a aac_he  -strict -2 -ar 48000 -b:a 48k \
-f mpegts -c:v libx264  -vbsf h264_mp4toannexb -strict experimental -    profile:v main -level:v 3.0 -preset:v slow -movflags faststart -pat_period 100 \
-x264opts nal-hrd=cbr:force-cfr=1 -crf 25 -vf scale=w=640:h=360 -aspect 16:9 \
-bf 1  -sc_threshold 0 -keyint_min 2*25 -g 2*25 \
-force_key_frames "expr:gte(t,n_forced*50)" -max_muxing_queue_size 1500k \
-coder 1  -refs 2 \
-b:v 750k -minrate 750k -maxrate 750k -bufsize 1500k \
-vsync 1 -framerate 25000/1001 \
-x264opts "bitrate=750:vbv-maxrate=750:vbv-bufsize=1500"\
-pix_fmt yuv420p  -r 25 -x264opts force-cfr \
-mbs_per_slice 1 -y dest.ts

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.