Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Transcoding #21

Open
anarkrypto opened this issue Mar 28, 2022 · 2 comments
Open

Error Transcoding #21

anarkrypto opened this issue Mar 28, 2022 · 2 comments

Comments

@anarkrypto
Copy link

Error Transcoding:

Using livepeer.com API:
import task failed. error: error processing ffprobe output: too many tracks in file: 3

Using livepeer-trascode:
Can't get info about file: 'aacparser: parse MPEG4AudioConfig failed(EOF)',

Video download: http://ftp.vim.org/ftp/ftp/pub/graphics/blender/demo/movies/BBB/bbb_sunflower_1080p_30fps_normal.mp4

MP4 Info:

File:
  major brand:      isom
  minor version:    1
  compatible brand: isom
  compatible brand: avc1
  fast start:       yes

Movie:
  duration:   634533 ms
  time scale: 600
  fragments:  no

Found 3 Tracks
Track 1:
  flags:        1 ENABLED
  id:           1
  type:         Video
  duration: 634533 ms
  language: und
  media:
    sample count: 19036
    timescale:    30000
    duration:     19036000 (media timescale units)
    duration:     634533 (ms)
    bitrate (computed): 2998.717 Kbps
  display width:  1920.000000
  display height: 1080.000000
  frame rate (computed): 30.000
  Sample Description 0
    Coding:      avc1 (H.264)
    Width:       1920
    Height:      1080
    Depth:       24
    AVC Profile:          100 (High)
    AVC Profile Compat:   0
    AVC Level:            41
    AVC NALU Length Size: 4
    AVC SPS: [67640029acca501e0089f970110000030001000003003c8f183196]
    AVC PPS: [68e93b2c8b]
    Codecs String: avc1.640029
Track 2:
  flags:        1 ENABLED
  id:           2
  type:         Audio
  duration: 634200 ms
  language: und
  media:
    sample count: 26425
    timescale:    48000
    duration:     30441600 (media timescale units)
    duration:     634200 (ms)
    bitrate (computed): 160.000 Kbps
  Sample Description 0
    Coding:      mp4a (MPEG-4 Audio)
    Stream Type: Audio
    Object Type: MPEG-1 Audio
    Max Bitrate: 165120
    Avg Bitrate: 160000
    Buffer Size: 480
    Sample Rate: 48000
    Sample Size: 16
    Channels:    2
Track 3:
  flags:        1 ENABLED
  id:           3
  type:         Audio
  duration: 634143 ms
  language: und
  media:
    sample count: 19817
    timescale:    48000
    duration:     30438912 (media timescale units)
    duration:     634144 (ms)
    bitrate (computed): 320.000 Kbps
  Sample Description 0
    Coding:      ac-3 (Dolby Digital (AC-3))
    Sample Rate: 48000
    Sample Size: 16
    Channels:    2
    AC-3 Data Rate: 32
    AC-3 Stream:
        fscod       = 0
        bsid        = 8
        bsmod       = 0
        acmod       = 7
        lfeon       = 1
    AC-3 dac3 payload: [103c00]
@yondonfu yondonfu transferred this issue from livepeer/go-livepeer May 3, 2022
@yondonfu
Copy link
Member

yondonfu commented May 3, 2022

This issue seems to be related to the VOD task runner so I've moved this to the appropriate repo. If this is not the case, feel free to update accordingly.

@victorges
Copy link
Member

victorges commented May 10, 2022

So I actually had this same problem yesterday with a BBB video, first because it had 3 tracks, being 2 of them audio tracks. I've fixed this immediate issue here: #23
That's not currently in production yet, but we should be deploying it sometime this week.

The other issue, which you would encounter next with that file, is that we only support the AAC audio codec. So you would have to transcode your file audio to AAC instead, which can be one with ffmpeg as well. You can use a command like this, keeping all the audio tracks:

ffmpeg -i bbb_sunflower_1080p_30fps_normal.mp4 -map 0 -c:a aac -strict -2 -c:v copy -f mp4 bbb_1080p30fps_aac.mp4

While we don't deploy #23 to production, you can also remove one of the audio tracks from the file (as well as transcoding it to aac). For that, you can simply remove the -map 0 flag to the command above, running instead:

ffmpeg -i bbb_sunflower_1080p_30fps_normal.mp4 -c:a aac -strict -2 -c:v copy -f mp4 bbb_1080p30fps_aac_1.mp4

Transcoding audio is also much cheaper than video, so these commands should be relatively quick (26s for that file on my run) 😄

Let me know if this fixes your issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants