[FFmpeg-user] How to encrypt hls output format with dvbsub subtitles

Sergio A S de Aguiar ssaguiar2 at hotmail.com
Mon Feb 11 14:57:54 EET 2019


First of all, I am glad to be here.
Thanks fo your patience.

I am working in a project where I have to encrypt a hls stream with AES-128.
I have made it using ffmpeg, in a test mp4 file, but without the subtitles, wich are in dvbsub format.

As, in the input stream, the subtitles are in dvbsub format, I can't use hls output format and I am using segment output format.

Is any way to make encryption work, with the dvbsub subtitles format (maybe some way to make it work using hls format, not segment)?

Thank you very much for any help.

The capture code is below:

ffmpeg -hide_banner -loglevel warning \
-threads 0 \
-hwaccel_device 0 -hwaccel cuvid -c:v h264_cuvid \
-canvas_size 1920x1080 \
-resize 1280x720 -deint 2 -fix_sub_duration -drop_second_field true -ignore_unknown -rtbufsize 100M -indexmem 100M -re \
-i $VIDEOSOURCE -dn \
-map 0:v:0 -c:v hevc_nvenc -g 60 -b:v 1400k -minrate 1200k -maxrate 1500k -bufsize 3000k -aspect 16:9 -pixel_format cuda -preset medium -r 30000/1001 \
-map 0:a:0 -c:a aac -strict -2 -b:a:0 96k -ar 48000 -ac 2 -preset medium -flush_packets 0  -async 1 \
-map 0:a:1 -c:a aac -strict -2 -b:a:1 96k -ar 48000 -ac 2 -preset medium -flush_packets 0  -async 1 \
-map 0:s:0 -s:s:0 1280x720 -scodec dvbsub \
-f segment -metadata "service_name=OUTPUT" -segment_list_type m3u8 -individual_header_trailer 0 -segment_time 6 -segment_list_size 10 -segment_list_flags live \
-segment_list /etc/nginx/html/live/OUTPUT/playlist.m3u8 /etc/nginx/html/live/OUTPUT/OUTPUT_%6d.ts -abort_on empty_output \
-map 0:v:0 -c:v h264_nvenc -g 60 -b:v 300k -minrate 280k -maxrate 360k -bufsize 1000k -r 30000/1001 \
-map 0:a:0 -c:a aac -strict -2 -b:a:0 96k -ar 48000 -ac 2 -preset medium -flush_packets 0  -async 1 \
-map 0:a:1 -c:a aac -strict -2 -b:a:1 96k -ar 48000 -ac 2 -preset medium -flush_packets 0  -async 1 \
>> /opt/iptv/LOGS/OUTPUT.log 2>&1 &




  __________________________________________________________________
  Sérgio A. S. de Aguiar
  Projetista de Sistemas Eletrônicos Digitais
  Programador C, VB, Assembler, Php, Mysql, Java
  Projetista de sistemas embarcados
  Línguas: Português, Inglês, Francês, Italiano e Espanhol
  ssaguiar at ssaguiar.com.br
  http://www.ssaguiar.com.br
  Telefone:  55 (48) 9660 4650
__________________________________________________________________
Este e-mail e seus anexos são para uso exclusivo do destinatário e podem conter informações confidenciais e/ou legalmente privilegiadas. Não podem ser parcial ou totalmente reproduzidos sem o consentimento do autor. Qualquer divulgação ou uso não autorizado deste e-mail ou seus anexos é proibida. Se você receber esse e-mail por engano, por favor, notifique o remetente e apague-o imediatamente.

This e-mail and its attachments are for the sole use of the addressee and may contain information which is confidential and/or legally privileged. Should not be partly or wholly reproduced without consent of the owner. Any unauthorized use of disclosure of this e-mail or its attachments is prohibited. If you receive this e-mail in error, please immediately delete it and notify the sender.
__________________________________________________________________



More information about the ffmpeg-user mailing list