2

I want to play 360 degree videos using HLS/DASH protocols. I am currently using ffmpeg and nginx combo. my question is does ffmpeg support 360 video transcoding to hls format. I tried with following command but 360 degree meta data is dropped by ffmpeg. is there any alternative way to do this?

ffmpeg  -i 360Videosample.mp4 \
-preset fast -g 25 -sc_threshold 0 \
-map v:0 -c:v:0 libx264 -b:v:0 2000k \
-map v:0 -c:v:1 libx264 -b:v:1 6000k \
-map a:0 -map a:0 -c:a aac -b:a 128k -ac 2 \
-f hls -hls_time 4 -hls_playlist_type event  \
-master_pl_name master.m3u8 \
-var_stream_map "v:0,a:0 v:1,a:1" stream_%v.m3u8
Ram
  • 121
  • 1
  • 6
  • I'm not sure why you were downvoted - it would help if people added comments when doing that so you know what to update in your question. You may find one way is to add the metadata back in after conversion - see the Exiftool and the discussion here: https://superuser.com/questions/1208273/add-new-and-non-defined-metadata-to-a-mp4-file – Mick Jun 26 '20 at 12:19
  • thanks Mick for response. tools such as Exiftool, spatial metadata injector would not add metadata to .m3u8 files. They can add to traditional file types such as mp4 etc. – Ram Jun 29 '20 at 11:55
  • 1
    HLS actually can use fragmented mp4 files but this may not help you if you are losing the metadata in your encoding steps. Can you share exactly what metadata is being lost? – Mick Jun 29 '20 at 18:59
  • 1
    Following is the spatial metadata missing Side data: spherical: equirectangular (0.000000/0.000000/0.000000) – Ram Jul 01 '20 at 16:06

0 Answers0