Skip to content

Commit

Permalink
fix: fix keyframes
Browse files Browse the repository at this point in the history
remove trailing underscore for ffmpeg v5
ffmpeg v6 contains double underscore i.e. K__
  • Loading branch information
trueChazza committed Feb 11, 2024
1 parent 6e4c08b commit d0873e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hls_playlist.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ defmodule HlsPlaylist do
|> Enum.map(fn x ->
String.trim(x)
|> String.split("\n")
|> Enum.filter(fn x -> String.contains?(x, "K__") end)
|> Enum.filter(fn x -> String.contains?(x, "K_") end)
end)
|> Enum.reject(fn x -> Enum.empty?(x) end)
|> Enum.map(fn x ->
String.trim_leading(Enum.at(x, 0), "packet,")
|> String.trim_trailing(",K__")
|> String.trim_trailing(",K_")
|> String.split(",")
|> Kernel.hd()
|> String.to_float
Expand Down

0 comments on commit d0873e9

Please sign in to comment.