question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow a custom ffmpeg path to be specified

See original GitHub issue

youtube-dl: 2014.01.07.5 python: 2.7.3 OS: Ubuntu 12.04

Great work on providing a way to join DASH audio and video!

I know it hasn’t been announced yet, but I thought I’d report a possible issue related to it. The ffmpeg/avconv on Ubuntu 12.04 doesn’t seem to mux the streams correctly:

youtube-dl -f ‘137+140’ gBabKoHSErI

produces an .mp4 file with an audio track but no video track:

> mediainfo gBabKoHSErI.mp4

General
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 2.16 MiB
Duration                                 : 2mn 21s
Overall bit rate mode                    : Variable
Overall bit rate                         : 128 Kbps
Encoded date                             : UTC 2013-12-27 19:27:06
Tagged date                              : UTC 2013-12-27 19:27:06
Writing application                      : Lavf53.21.1

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 2mn 21s
Bit rate mode                            : Variable
Bit rate                                 : 126 Kbps
Channel count                            : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 2.11 MiB (98%)
Encoded date                             : UTC 2013-12-27 19:27:06
Tagged date                              : UTC 2013-12-27 19:27:06

I get an error if I try to merge the streams manually with the stock ffmpeg e.g.:

> ffmpeg -version
ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:12:07 with gcc 4.6.3

> ffmpeg -y -i gBabKoHSErI.f140.m4a -i gBabKoHSErI.f137.mp4 -c copy gBabKoHSErI.mp4
Unrecognized option 'c'
Failed to set value 'copy' for option 'c'

I get the audio-only file (and no error) if I replace -c copy with -acodec copy -vcodec copy.

Both options work fine if I use a more recent version of ffmpeg:

> sffmpeg -version
ffmpeg version 2.0
built on Aug 20 2013 01:54:29 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)

> sffmpeg -y -i gBabKoHSErI.f140.m4a -i gBabKoHSErI.f137.mp4 -c copy gBabKoHSErI.mp4
Stream mapping:
  Stream #1:0 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 3379 fps=0.0 q=-1.0 Lsize=   51389kB time=00:02:21.03 bitrate=2984.9kbits/s    
video:49127kB audio:2162kB subtitle:0 global headers:0kB muxing overhead 0.195621%

An option to set the ffmpeg path would allow me to use the more recent ffmpeg automatically; it would also allow users to make their own choices re: avconv vs ffmpeg.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
phihagcommented, Feb 17, 2015

Since youtube-dl 2015.02.16, you can use the --ffmpeg-location option to specify the path of the executable (or the directory the executable resides in). See our FAQ if you need help updating.

4reactions
darkuraniumcommented, Feb 27, 2020

@HarrySykes7890 'ffmpeg_location': ... in the configuration dictionary.

It’s not documented in YoutubeDL.py for some reason, I’m guessing oversight?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure and Build OpenCV to Custom FFMPEG Install
The only setting related to FFMPEG appears to be WITH_FFMPEG type setting (set to ON). I can build OpenCV but it seems to...
Read more >
How do I set up and use FFmpeg in Windows?
Type cd [path] . It should look something like cd C:\Users\name\Desktop\ . Now type the FFmpeg command with the name of your input...
Read more >
ffmpeg Documentation
ffmpeg reads from an arbitrary number of input "files" (which can be regular files, pipes, network streams, grabbing devices, etc.), specified by the...
Read more >
Custom Encoder: FFmpeg | Recorder | 4.0.0
Specify the FFmpeg Path to allow Unity to use your FFmpeg executable for the encoding. Did you find this page useful? Please give...
Read more >
FFmpeg Installation - VidGear
Assignment: Then, you can easily assign the custom path to the folder containing FFmpeg executables( for e.g 'ffmpeg/bin' ) or path of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found