Can't import video files

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.x.x package for your distribution or compile Audacity from the source code.
Locked
Malrob
Posts: 3
Joined: Wed Feb 08, 2012 5:24 pm
Operating System: Please select

Can't import video files

Post by Malrob » Thu Feb 09, 2012 2:34 am

Hello,

I've got some problems importing video files to extract their soundtrack and I'm hoping you will be able to help me solve them.

At the beginning I had two problems :


The first one : sometimes for some video files Audacity crashed and when it did here's what it told in a terminal :
Segmentation fault.
When I launched it here's what it told, even though it doesn't seem to be a problem :
Cannot connect to server socket err = Aucun fichier ou dossier de ce type
Cannot connect to server socket
jack server is not running or cannot be started
The second one : Audacity failed to import some video files (it probably depends on the audio codec used by the container),
for example with this video that I've downloaded with wget Audacity displayed this message in a window :
Error importing

Audacity recognized the type of the file 'name of the file'.
Importers supposedly supporting such files are:
FFmpeg-compatible files,
but none of them understood this file format.
And when I clicked on help :
wma-proprietary
I had installed Audacity and ffmpeg from Debian official repositories. I suspected that the problem could come from ffmpeg so I decided to add Debian Multimedia repositories to have a newer version of the latter. Since then the first problem seems to be solved but the second is still there and even worse it seems to appear on every video I'm trying to import whereas before it was only some of them.


Here are some other information :

My system is Debian Squeeze stable :

Code: Select all

uname -a Linux debian 2.6.32-5-686 #1 SMP Mon Jan 16 16:04:25 UTC 2012 i686 GNU/Linux
My version of audacity shown by aptitude : 1.3.12-7.4, shown by Help > About Audacity : 1.3.12-beta
My version of ffmpeg shown by aptitude : 5:0.7.11-0.1
Both installed from Debian Multimedia repositories.

When I click on Edit > Preferences > Libraries, I can read under 'MP3 Export Library' : MP3 Library Version: LAME 3.98.4,
and under 'FFmpeg Import/Export Library' : FFmpeg Library Version F(52.111.0),C(52.123.0),U(50.43.0).
If I click on the locate... button besides 'FFmpeg library' a window appears :
Success

Audacity has automatically detected valid FFmpeg libraries. Do you still want to locate them manually ?
I answer no.

I don't have a sound card, simply use audio chipset from my motherboard Asus M4A78LT-M LE : VIA VT1708S.

I don't know much about sound in Linux so I'm not sure which sound server is used on my machine (ALSA, Pulseaudio), but I think it's ALSA because I've seen the latter mentioned several times in Help > Audio Device Info.


Any help and advice would be greatly appreciated. Thank you in advance.

PS : sorry if my English was bad, it's not my native language.

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Can't import video files

Post by bgravato » Thu Feb 09, 2012 5:30 pm

Have you tried to extract the audio using other programs?

Install avidemux (should be in Debian repos). Open the video there. You can save the audio only by selecting "Save..." from the Audio menu.

You can then import the audio file you just saved into audacity.

If you're comfortable using the command line you may also use mplayer/mencoder to extract the audio.

If the video file is DMCA protected you might not be able to extract the audio.

If you want to extract audio from youtube videos have a look at youtube-dl (also available on debian repos).
It's a command line tool to download youtube videos, it has an option to extract audio only.
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

steve
Site Admin
Posts: 81651
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Can't import video files

Post by steve » Thu Feb 09, 2012 5:39 pm

Malrob wrote:Segmentation fault.
That means it's crashed. (Not very specific I know, but basically that is what it means ;) )
Malrob wrote:Cannot connect to server socket err = Aucun fichier ou dossier de ce type
Cannot connect to server socket
jack server is not running or cannot be started
That's normal.
Audacity is looking to see what sound services you have running. It goes through a list of possibilities - any sound services that are not running on your machine will return an "error". It's not really an error, it's just saying that that particular sound service is not running.
Malrob wrote:wma-proprietary
FFMpeg currently has only partial support for WMA.
DRM is not supported, and I don't think that WMA lossless is currently supported. WMA version 2 should be OK, but other versions are likely to fail.
Malrob wrote:for example with this video
I downloaded that as a FLV file using the "Easy YouTube Video Downloader version 5.9" add-on in Firefox 10.0. Audacity opens that fine.
Malrob wrote: I decided to add Debian Multimedia repositories to have a newer version of the latter.
That's what I'm using. It still does not support some WMA files.
Malrob wrote:Linux debian 2.6.32-5-686 #1 SMP Mon Jan 16 16:04:25 UTC 2012 i686 GNU/Linux
Same here. Good isn't it :D

Audacity: 1.3.12-7.4
I'm using Audacity ® 2.0.0-alpha-Feb 6 2012 (Unicode) built from the svn source code, but I don't expect that will make any difference.
By the way, the Audacity version is shown in "Help menu > About Audacity". (no reason not to use the GUI just because you're on Linux ;))

FFMpeg 5:0.7.11-0.1
Same here.
Malrob wrote:PS : sorry if my English was bad, it's not my native language.
You're English was excellent, and thank you for posting so much detail, it really helps.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Malrob
Posts: 3
Joined: Wed Feb 08, 2012 5:24 pm
Operating System: Please select

Re: Can't import video files

Post by Malrob » Fri Feb 10, 2012 2:02 am

Hello again, thank you both for your answers !
bgravato wrote:Have you tried to extract the audio using other programs?

Install avidemux (should be in Debian repos). Open the video there. You can save the audio only by selecting "Save..." from the Audio menu.

You can then import the audio file you just saved into audacity.
I've just downloaded avidemux and did what you said, importing the video - saving the soundtrack after choosing the audio codec - importing the result in Audacity, and it works flawlessly. So thank you very much I will use this method for the time being. :)
bgravato wrote: If you're comfortable using the command line you may also use mplayer/mencoder to extract the audio.

If the video file is DMCA protected you might not be able to extract the audio.

If you want to extract audio from youtube videos have a look at youtube-dl (also available on debian repos).
It's a command line tool to download youtube videos, it has an option to extract audio only.
Thanks, I didn't know those tools either, I will try them as well. :)
steve wrote:
Malrob wrote:Segmentation fault.
That means it's crashed. (Not very specific I know, but basically that is what it means ;) )
Indeed not very specific but it helped me find this forum by googling "segmentation fault audacity" so it's still helpful. ;)
steve wrote:
Malrob wrote:Cannot connect to server socket err = Aucun fichier ou dossier de ce type
Cannot connect to server socket
jack server is not running or cannot be started
That's normal.
Audacity is looking to see what sound services you have running. It goes through a list of possibilities - any sound services that are not running on your machine will return an "error". It's not really an error, it's just saying that that particular sound service is not running.
Just out of curiosity what do you mean by "sound service" ? I think that on Windows a service is a program that is run automatically when the OS starts without user intervention, which is called a daemon on Linux. Is this what you mean ? And if it's the case why is Audacity looking for such programs ?
steve wrote:
Malrob wrote:wma-proprietary
FFMpeg currently has only partial support for WMA.
DRM is not supported, and I don't think that WMA lossless is currently supported. WMA version 2 should be OK, but other versions are likely to fail.
I just looked on Wikipedia, there seems to be four families of Windows Media Audio codecs : Standard, Professional, Lossless and Voice. So if I understand you correctly, Audacity doesn't support Professional, Lossless and Voice, only Standard (version 1 and 2), and none of them if they are DRM protected.
steve wrote:
Malrob wrote:for example with this video
I downloaded that as a FLV file using the "Easy YouTube Video Downloader version 5.9" add-on in Firefox 10.0. Audacity opens that fine.
I've installed the same addon and I'm also using Firefox 10.0 (well Iceweasel but it's the same thing I think). I've tried with 360p and 240p, none of them could be imported in Audacity.

I don't know if it's important but sometimes Audacity says this when I try to import a video file :
(Audacity:number, probably pid = process ID): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed
I don't understand what it means but I see the terms "text" and "utf8" so I supposed that maybe there was a problem with the name of the file like a too long length or some characters that Audacity didn't like (space for example). I tried renaming the file giving it something much more simple like "SH.flv" and the error message disappeared. But after a reboot of the machine the same message appears with the same file "SH.flv".

By the way how did you import the video file ? I've tried several methods, all failed :
  • Open a terminal > type 'audacity' > File > Open
    Open a terminal > type 'audacity' > File > Import > Audio
    Open a terminal > type 'gksu audacity' > File > Open
    Open a terminal > type 'gksu audacity' > File > Import >Audio
    Alt + F2 > audacity > File > Open
    Alt + F2 > audacity > File > Import > Audio
The only successful way that I've found is : open a terminal > type 'audacity' > File > Import > Raw Data. The problem is that the result is just mere noise, not the soundtrack I want to extract.

Anyway, I was pretty sure you would succeed. Indeed, I've shown my sister how to extract soundtrack from video files with Audacity on the Ubuntu 11.10 I installed on her old laptop and she has no problems whatsoever doing it. I know the problem is not really coming from Audacity but from me, or more precisely from my installation of Debian.

I just don't know what I've done wrong or what I haven't done. Maybe I forgot to install some package ? A conflict between dependencies ? Should I have removed the ffmpeg from official repos before upgrading with the version from Debian Multimedia ?
steve wrote:
Malrob wrote: I decided to add Debian Multimedia repositories to have a newer version of the latter.
That's what I'm using. It still does not support some WMA files.
What I don't understand is why I see "wma-proprietary" every time I click on "Help" after seeing the message "Audacity recognized the type of the file 'name'. Importers supposedly supporting such files are: FFmpeg-compatible files, but none of them understood this file format." ?

Are all the videos on youtube and more generally on the web using WMA audio codec ? I've just checked on Wikipedia and in the chart I only see MP3, AAC and Vorbis as possible audio codecs, no WMA.

And even if all videos on which I stumbled were using WMA, why could I import some of them with the ffmpeg from official repos but none of them with the one from Debian Multimedia ? Even weirder I remember that with the ffmpeg from official repos and with the exact same video sometimes I could import it sometimes Audacity would just crash.

I don't know if it's important but here's my sources.list maybe there's a problem with it :
#

# deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 NETINST Binary-1 20111008-19:55]/ squeeze main

#deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 NETINST Binary-1 20111008-19:55]/ squeeze main

deb http://ftp.fr.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

# squeeze-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ squeeze-updates main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ squeeze-updates main contrib non-free

# backports
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free

# Debian Mozilla
deb http://mozilla.debian.net/ squeeze-backports iceweasel-release

# This file makes sure that Opera Browser is kept up-to-date
# as part of regular system upgrades

deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)

# The line above will make sure you get all final public releases.
# Uncomment the following line if you want to get alpha and beta
# releases, too.

# deb http://deb.opera.com/opera-beta/ stable non-free #Opera Browser (beta releases)

# Debian-Multimedia.org
deb http://www.debian-multimedia.org squeeze main non-free
As you can see the only things worth to mention are the backports and Opera repos.
steve wrote:
Malrob wrote:Linux debian 2.6.32-5-686 #1 SMP Mon Jan 16 16:04:25 UTC 2012 i686 GNU/Linux
Same here. Good isn't it :D
I don't know much about Linux, just a little about Ubuntu and Debian. I switched from Ubuntu to Debian in order to better understand how works an OS and be more confident when using one. Well all I can say is that so far it's kinda difficult but I'm not complaining, I knew perfectly well what I was going into when I installed Debian on my machine, and I cheer myself up by thinking it could be far worse : I could be on Gentoo. :D

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Can't import video files

Post by Gale Andrews » Fri Feb 10, 2012 2:07 am

steve wrote: I don't think that WMA lossless is currently supported. WMA version 2 should be OK, but other versions are likely to fail.
That "WMA-Proprietary" was a misleading message that appeared in 1.3.12 when you clicked Help after an import failure. It did not mean the file was detected as WMA.

According to FFmpeg documentation (http://ffmpeg.org/general.html#Audio-Codecs) WMA lossless is still not supported. WMA Voice and WMA Professional can be decoded, and do import into Audacity on Windows using FFmpeg 0.6.2 (52.64.2, 52.72.2, 50.15,1) but not using FFmpeg 0.5 (52.36.0, 52.32.0, 50.3.0).

Linux distributions are free to choose what FFmpeg codecs they enable when they build the system FFmpeg.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81651
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Can't import video files

Post by steve » Fri Feb 10, 2012 1:37 pm

Malrob wrote: under 'FFmpeg Import/Export Library' : FFmpeg Library Version F(52.111.0),C(52.123.0),U(50.43.0).
That's slightly different to what I have.

Code: Select all

FFmpeg Library Version: F(52.110.0),C(52.122.0),U(50.43.0)
My sources list:

Code: Select all

# 

# deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 CD Binary-1 20111008-13:01]/ squeeze main

# deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 CD Binary-1 20111008-13:01]/ squeeze main

deb http://ftp.uk.debian.org/debian/ squeeze contrib non-free main
deb-src http://ftp.uk.debian.org/debian/ squeeze contrib non-free main

deb http://security.debian.org/ squeeze/updates contrib non-free main
deb-src http://security.debian.org/ squeeze/updates contrib non-free main

# squeeze-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ squeeze-updates main
deb-src http://ftp.uk.debian.org/debian/ squeeze-updates main
deb http://www.debian-multimedia.org squeeze main non-free

# wxWidgets/wxPython repository at apt.wxwidgets.org
deb http://apt.wxwidgets.org/ squeeze-wx main
deb-src http://apt.wxwidgets.org/ squeeze-wx main
deb http://repository.spotify.com stable non-free
The most noticeable difference is that I don't have the backports. Perhaps worth checking exactly which version(s) of FFmpeg you have installed and which repository it has come from.

As I understand it, the backported packages should be really just be used on a single package basis when needed rather that installing all backported packages. Standard Squeeze is thoroughly tested and extremely stable, but the backported packages are less thoroughly tested, but may be useful if a particular package in Squeeze is too old for ones needs.
Malrob wrote:Just out of curiosity what do you mean by "sound service" ?
I was using the term very loosely.
I think PortAudio is looking to see if jackd is running, and returning those "errors" if Jackd isn't running. If Jackd is running, Audacity should be able to use it (select "JACK Audio Connection Kit" as the Host in the Device Toolbar).
If I have Jackd running I get this when starting Audacity:

Code: Select all

ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
The Intel sound chip supports surround sound, but this is a laptop computer and it only actually has stereo output, so I think that explains the first three lines.
dmix is unable to open the "slave device" because I don't have a slave device.
Malrob wrote:I switched from Ubuntu to Debian in order to better understand how works an OS and be more confident when using one. Well all I can say is that so far it's kinda difficult but I'm not complaining, I knew perfectly well what I was going into when I installed Debian on my machine, and I cheer myself up by thinking it could be far worse : I could be on Gentoo. :D
The Gentoo comment made me grin :)
Initially setting up Debian is certainly less easy than Ubuntu or Mint. Those two distros have done a lot of work to make the initial set-up very easy. The first thing that got me when switching from Ubuntu to Debian was that the wi-fi drivers were not included on the installation iso, so I had to use a very long cat5 cable so that I could get on-line to install the driver and do the initial updates.

I had previously tried Debian Lenny, but found that several of the packages were too old for what I needed and the testing/unstable branches were just not stable enough. That was when I started using Ubuntu. With just a few exceptions (notably Firefox and WxWidgets) I find that Debian stable is sufficiently up to date to do everything that I need, and I am very impressed with its stability. As a solid basis for making a Linux OS, customised in the way that I want it, I find Debian to be really good. It's definitely more work initially than Ubuntu or Mint, but I'm enjoying the more "back to basics" approach.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Malrob
Posts: 3
Joined: Wed Feb 08, 2012 5:24 pm
Operating System: Please select

Re: Can't import video files

Post by Malrob » Fri Feb 10, 2012 7:18 pm

steve wrote:
Malrob wrote: under 'FFmpeg Import/Export Library' : FFmpeg Library Version F(52.111.0),C(52.123.0),U(50.43.0).
That's slightly different to what I have.

Code: Select all

FFmpeg Library Version: F(52.110.0),C(52.122.0),U(50.43.0)
...
The most noticeable difference is that I don't have the backports. Perhaps worth checking exactly which version(s) of FFmpeg you have installed and which repository it has come from.

As I understand it, the backported packages should be really just be used on a single package basis when needed rather that installing all backported packages. Standard Squeeze is thoroughly tested and extremely stable, but the backported packages are less thoroughly tested, but may be useful if a particular package in Squeeze is too old for ones needs.
You're probably right, I should check if the backports repos didn't cause any conflicts between dependencies or something else that would explain why I can't import videos. I'm going to try removing these repos, removing ffmpeg and audacity and reinstall those 2 afterwards. Besides I will check why I don't have the same version of ffmpeg as you and where mine comes from.

Anyway the problem seems not to be about Audacity but ffmpeg so I will stop bother you with it. ;)
steve wrote:
Malrob wrote:Just out of curiosity what do you mean by "sound service" ?
I was using the term very loosely.
I think PortAudio is looking to see if jackd is running, and returning those "errors" if Jackd isn't running. If Jackd is running, Audacity should be able to use it (select "JACK Audio Connection Kit" as the Host in the Device Toolbar).
If I have Jackd running I get this when starting Audacity:

Code: Select all

ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
The Intel sound chip supports surround sound, but this is a laptop computer and it only actually has stereo output, so I think that explains the first three lines.
dmix is unable to open the "slave device" because I don't have a slave device.
Ok I understand a little better what are those sound services and what they're used for.
steve wrote:
Malrob wrote:I switched from Ubuntu to Debian in order to better understand how works an OS and be more confident when using one. Well all I can say is that so far it's kinda difficult but I'm not complaining, I knew perfectly well what I was going into when I installed Debian on my machine, and I cheer myself up by thinking it could be far worse : I could be on Gentoo. :D
The Gentoo comment made me grin :)
Initially setting up Debian is certainly less easy than Ubuntu or Mint. Those two distros have done a lot of work to make the initial set-up very easy. The first thing that got me when switching from Ubuntu to Debian was that the wi-fi drivers were not included on the installation iso, so I had to use a very long cat5 cable so that I could get on-line to install the driver and do the initial updates.

I had previously tried Debian Lenny, but found that several of the packages were too old for what I needed and the testing/unstable branches were just not stable enough. That was when I started using Ubuntu. With just a few exceptions (notably Firefox and WxWidgets) I find that Debian stable is sufficiently up to date to do everything that I need, and I am very impressed with its stability. As a solid basis for making a Linux OS, customised in the way that I want it, I find Debian to be really good. It's definitely more work initially than Ubuntu or Mint, but I'm enjoying the more "back to basics" approach.
Totally agree with you about the "back to basics" approach and the stability (no need to reinstall or try an upgrade every six months), I even consider installing it on my sister's very old laptop with a lightweight desktop environment like Openbox (or maybe CrunchBang, basically it's Debian + Openbox, well I think).

Otherwise apart from the difficulties that I encounter here and there I love this distro. Ironically what made me switch from Ubuntu to Debian was the fact that the latest version of Ubuntu 11.10 was not very friendly with my audio chipset, I'm not sure of the exact word in English but the sound was horrible it "crackled" all the time, whereas on Debian the sound is very good.

Anyway thank you for all the information, it really helped, thanks to bgravato for all the very nice tools that I didn't know before and thanks to Gale Andrews for developing what seems to be a very powerful tool to edit audio.

PS : to Gentoo users sorry for the joke about Gentoo, I was just trying to say, on a humorous tone, that I don't have enough knowledge to even install Gentoo. :)

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Can't import video files

Post by bgravato » Fri Feb 10, 2012 8:53 pm

I've been using Debian for maybe 10 years or more. Once you get into the philosophy of it, then it will be hard to leave :)

I've tried Ubuntu many times, but everytime I gave up and I don't like it. It's not easier for me to set up an ubuntu machine than a debian machine, but that's maybe because I'm already more used to it.

On the command line you can check which version of a package you have installed and which candidates are available with:

Code: Select all

apt-cache policy packaga-name
You can force a specific version to be installed from the ones available. You can do it in synaptic or aptitude and also from the command line with apt-get:

Code: Select all

apt-get install package-name=version
You don't need to uninstall and reinstall again... If you select a different version to be installed the package manager (apt) will do all that is necessary, so you don't have to worry. It also won't let you install packages with broken-dependencies.
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Can't import video files

Post by Gale Andrews » Sat Feb 11, 2012 1:40 am

Malrob wrote:thanks to Gale Andrews for developing what seems to be a very powerful tool to edit audio.
Thanks, though despite my "developer" rank here I am not actually a programmer:
http://audacityteam.org/about/credits

Hopefully we will be having a makeover of "job titles" after 2.0 is released.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked