HLS Stream

Questions and answers on how to get the most out of FFAStrans
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: HLS Stream

Post by admin »

Hi Vijay,

I have created a working example of how to can create the files and corrresonding ,3u8 files. I have very little experience with HLS but I think this will get you in the right direction. Just unpack the attached file to your FFAStrans folder and look at the new workflow called "Example: HLS".

-steipal
Attachments
HLS.7z
(1.65 KiB) Downloaded 523 times
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: HLS Stream

Post by vijm1972 »

Hi Steipal,

Thanks for your help. I am able to create HLS package as per requirement. But I am observing one issue while processing jobs, I am getting all the files in output location but in monitor window I am getting error message No video or audio found in media. Please find attached screen shot for your reference.

I also wanted to auto create folder as per bitrate at output folder with source file name and wanted to create .ts files in that folder. Can you please suggest. As per attached screen shot.
Folders.jpg
Folders.jpg (79.36 KiB) Viewed 13852 times
While changing any settings in custom FFMPEG option I am getting attached message.
Error.jpg
Error.jpg (187.82 KiB) Viewed 13853 times
Thanks
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: HLS Stream

Post by admin »

The job will "fail" because the custom ffmpeg command does not deliver what FFAStrans expects it to. FFAStrans does not know that it should check all the .ts-filer and it never will. But I will take a look at how to avoid this error message, because your workflow obviously dose not fail.

You can add a "Command executor" node, prior to the encoding steps, with the following command:

%ComSpec% /c "md "C:\Test\CA Test\HLS\Outbox\300" "C:\Test\CA Test\HLS\Outbox\600" "C:\Test\CA Test\HLS\Outbox\900""

This will generate all the folders for your custom ffmpeg preset. You must of course remember to change all other paths accordingly.


The "You have badly formated variables" was a good idea at a time but it isn't :roll: It's gone in the next release. You can allways edit the inputfield but you must move around using the arrow keys.

-steipal
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: HLS Stream

Post by vijm1972 »

Hi Steipal,

I am trying to add AES-128 encryption while creating the HLS package, can you please suggest if there is any utility which I can use to generate the keyinfo file? Below is the FFMPEG command I am trying.

ffmpeg -i fighter.mp4 -hls_time 10 -hls_key_info_file file.keyinfo stream.m3u8

Thanks,
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: HLS Stream

Post by admin »

I don't know, Vijay. I have not yet had the need for such a program. Maybe someone else on the forum knows?

-steinar
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: HLS Stream

Post by vijm1972 »

There is a program called OpenSSL, but not sure about how to use that.
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: HLS Stream

Post by vijm1972 »

Hi Steinar,

Once again wanted to start HLS encryption test and need your help.

This time I have .keyinfo file and wanted use in FFAStarns using below command. I wanted to know how can I use that encryption file.

-c:v libx264 -s 1280x720 -aspect 16:9 -b:v 1000k -maxrate 1000k -bufsize 1000k -pix_fmt yuv420p -refs 1 -profile:v baseline -level 3 -g 150 -sc_threshold 0 -flags -global_header -movflags +faststart -c:a aac -strict experimental -ar 48000 -b:a 64000 -ac 2 -f segment -hls_list_size 6 -segment_list "D:\FFAStrans0.7.7_Win32\Media\Outbox\%s_original_name%\1000\%s_original_name%_1000.m3u8" -segment_time 6 -segment_list_flags +live -segment_format mpegts "D:\FFAStrans0.7.7_Win32\Media\Outbox\%s_original_name%\1000\%s_original_name%_1000_%05d.ts"

Using below command in FFMpeg I am able to encrypt the output.

C:\Users\rhozetadmin>D:\FFAStrans0.7.7_Win32\Processors\FFMpeg\ffmpegx64.exe -i D:\FFAStrans0.7.7_Win32\Media\Test_1.mp4 -hls_time 10 -hls_key_info_file D:\FFAStrans0.7.7_Win32\Media\enc.keyinfo "D:\HLS_Test\Outbox\Test.m3u8"

Thanks,
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: HLS Stream

Post by admin »

I'm not 100% sure about your question, but are you wondering how to insert the file "D:\FFAStrans0.7.7_Win32\Media\enc.keyinfo" into your command?

-steinar
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: HLS Stream

Post by vijm1972 »

Yes Steinar.

If I insert the file in command in FFAStrans I am not getting any encryption in output.

Please find below m3u8 file created using FFMPEG in which I am getting encryption.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="http://trented-encodes.**.amazonaws.com/******/text.key"
#EXTINF:12.021333,
Test_HD_52_1000.ts
#EXTINF:12.000000,
Test_HD_52_1001.ts
#EXTINF:6.000000,
Test_HD_52_1002.ts
#EXTINF:12.000000,
Test_HD_52_1003.ts
#EXTINF:2.960000,
Test_HD_52_1004.ts
#EXT-X-ENDLIST


Thanks,
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: HLS Stream

Post by admin »

Are you able to create the complete command line in dos and make it work?

-steinar
Post Reply