[FFmpeg-user] Burned dialog not appearing on large videos if time interval reduced

Aameer Rafiq Wani aameer.rafiq at gmail.com
Mon Mar 21 07:04:02 CET 2016


hey guys,
I am facing an issue while I try to burn a dialog on a large video when I
try to reduce the time interval for which it should appear it seizes to
show up if the time interval is less than 1 sec while this is not the case
with smaller videos and we can go down to approx 0.15 seconds with videos
of 44 secs or 40 mins.

I am sharing my encoding code snippet from my shell script ,which is like:

#360 version
(time ffmpeg -i test.mp4 -profile:v baseline -level 4.0 -vf
"scale=-2:360,subtitles='subtitle_test.ass':force_style='FontName=Aaargh/Aaargh.ttf,PrimaryColour=&H664c4c4c"
 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls
/mnt/s3_temp/bucketname/project_id/videos/3342/3428_360_.m3u8" && echo "360
version:" >> encoding_logs.log ) 2>> encoding_logs.log &

and the subtitle_test.ass file is like (e.g for 119m 31 s videos which is
3.9 GB)

[Script Info]
; Script generated by FFmpeg/Lavc57.24.103
ScriptType: v4.00+
PlayResX: 384
PlayResY: 288

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour,
OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX,
ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL,
MarginR, MarginV, Encoding
Style:
Default,Arial,16,&H99999999,&H99999999,&H0,&H0,0,0,0,0,100,100,0,0,1,0,0,2,10,10,10,0
Style:
Hidden,Arial,16,&H99999999,&H99999999,&H0,&H0,0,0,0,0,100,100,0,0,1,0,0,6,10,10,10,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect,
Text
Dialogue: 0,0:00:00.00,1:59:31.783,Default,,0,0,0,,dialog1
Dialogue: 0,0:39:50.927,0:39:51.927,Hidden,,0,0,10,,dialog2

Note the timings for dailog2 which is
dialog2 start : 0:39:50.927
dialog2 end : 0:39:51.927

dialog2_time_interval = (dialog2 start time- dialog2 end time) = 1 sec

what I am trying to achieve is to display the first dialog for the entire
length and the second dialog for smallest amount of time possible.For now
what I have achieved is for smaller videos of few seconds or few mins the
dialog2 appears even when the dialog2_time_interval is less than 1 sec. I
got a successful test with dialog2_time_interval=0.15 sec(approximately 150
milliseconds).
But with large videos say in above case the dialog2 appears only when the
dialog2_time_interval is greater than or equal to 1 sec. I want to know is
there a relation between the video length and dialog2_time_interval which i
should keep in mind to minimize dialog2_time_interval for video of any
length.

Moreover I also see a delay of few seconds with the dialog , i.e they
appear few milliseconds or secs after they were supposed to appear, is that
normal.Thanks.

For some reason if the details mentioned here are not enough I have a small
blog post relating the same which could through a little more light on this
subject here(http://aameer.github.io/cloud-computing-101/). Thanks

Regards,
AAMEER RAFIQ WANI
email: aameer.rafiq at gmail.com
websites: aameer.github.io <aameer at github.io>
LinkedIn: http://in.linkedin.com/in/aameerwani


More information about the ffmpeg-user mailing list