Skip to content

Commit

Permalink
Merge pull request #347 from bcc-code/fix/4ch-vod
Browse files Browse the repository at this point in the history
Generate stereo files for VOD not 4ch
  • Loading branch information
KillerX authored Nov 15, 2024
2 parents 2c5c95a + 946761a commit f4ea815
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/transcode/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func mergeItemToStereoStream(index int, tag string, item common.MergeInputItem)

if len(streams) == 0 {
s, found := lo.Find(info.Streams, func(s ffmpeg.FFProbeStream) bool {
return s.ChannelLayout == "stereo" && s.Channels == 2
return s.Channels == 2
})
if found {
streams = append(streams, s)
Expand All @@ -149,7 +149,7 @@ func mergeItemToStereoStream(index int, tag string, item common.MergeInputItem)
var streamString string
channels := 0
for _, stream := range streams {
if stream.ChannelLayout == "stereo" && stream.Channels == 2 {
if stream.Channels == 2 {
return fmt.Sprintf("[%d:%d]aselect[%s]", index, stream.Index, tag), nil
} else if stream.Channels == 64 && len(item.Streams) == 2 {
streamString += fmt.Sprintf("[0:a]pan=stereo|c0=c%d|c1=c%d[%s]", item.Streams[0].ChannelID, item.Streams[1].ChannelID, tag)
Expand Down

0 comments on commit f4ea815

Please sign in to comment.