Transcode to aac on Ubuntu 14.04 using vlc
You may indeed be missing some codecs, because they are separated out to some extra packages in ubuntu.
There are two conflicting variants of the packages, one ith -extra
in the name.
Also, there are reports that installing the packages may mess up the package management; At least I have had to resolve conflicts manually a couple of times.
You need either libavcodec54
and libavutil52
or libavcodec-extra
and libavutil-extra-52
:
(I think I make no use of these packages myself, but I have installed them long ago, and ended up with the version without the -extra
in the name. I do remember is was tricky, so do not expect installing them just works smoothly)
sudo apt-get install libavcodec54 libavutil52
If that does not help, uninstall it and try the other.
sudo apt-get install libavcodec-extra libavutil-extra-52
(Before you ask: I vaguely remember that the reason for the packaging and dependency mess is not only due to license issues, but had a significant component of, say, inter-project politics.)
Related videos on Youtube
foxy82
Updated on September 18, 2022Comments
-
foxy82 over 1 year
I am trying to stream a dvb stream in VLC but transcoding the audio to aac format however it can't find the encoder. How do I install it?
VLC media player 2.1.4 Rincewind (revision 2.1.4-0-g2a072be) [0x2535b58] main interface error: no suitable interface module [0x2470118] main libvlc error: interface "globalhotkeys,none" initialization failed [0x2535b58] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 [0x2535b58] main interface error: no suitable interface module [0x2470118] main libvlc error: interface "dbus,none" initialization failed [0x2470118] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [0x2535b58] qt4 interface error: Could not connect to X server [0x2535b58] skins2 interface error: cannot initialize OSFactory [0x2535b58] [cli] lua interface: Listening on host "*console". VLC media player 2.1.4 Rincewind Command Line Interface initialized. Type `help' for help. > [0x7f00c800bcf8] dtv access error: 514000 Hz carrier frequency is too low. [0x7f00c800bcf8] dtv access: Assuming 514000000 Hz frequency instead. [0x7f00c800bcf8] dtv access error: cannot enumerate frontend systems: Invalid argument [0x7f00cc001138] avcodec encoder error: cannot open encoder [0x7f00cc001138] main encoder error: Streaming / Transcoding failed [0x7f00cc001138] main encoder error: VLC could not open the encoder. [0x7f00c80097c8] stream_out_transcode stream out error: cannot find audio encoder (module:any fourcc:mp4a). Take a look few lines earlier to see possible reason. [0x7f00c80097c8] stream_out_transcode stream out error: cannot create audio chain [0x7f00c80a5438] main decoder error: cannot create packetizer output (mpga) [0x7f00c80105b8] ts demux error: libdvbpsi (misc PSI): Bad CRC_32 table 0x73 !!!
Edit to add the command I'm running
cvlc --ttl 12 --ts-es-id-pid --program=8261 dvb:// --dvb-adapter=3 \ --dvb-frequency=514000 --dvb-bandwidth=8 --sout #transcode{width=720,vcodec=h264, venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1}, acodec=mp4a}:std{access=livehttp{seglen=10,delsegs=true, numsegs=10,index=/web/main/streaming/mystream.m3u8, index-url=http://192.168.1.2/streaming/mystream-########.ts}, mux=ts{use-key-frames},dst=/web/main/streaming/mystream-########.ts}'
The command is to stream a DVB adapter over HLS transcoding it to a format accepted by the client. The command works but will produce ts files that have no audio due to the missing encoder. If I chnage the encoder to "mp3" I get a file with MP3 audio but obviously not what I want.
-
Volker Siegel over 9 yearsWhich command did you run?
-
foxy82 over 9 yearsAdded to the question.
-
-
foxy82 over 9 yearsSo I ran the first line and already have them installed. So went to remove them and as part of the remove it wants to remove tvheadend, handbrake and vlc. You may have guessed this is a media server so I don't really want to remove them. So I tried to just install the extras - that worked and now when I run vlc it doesn't complain about the codec but I get the following error repeatedly and no file: [libvo_aacenc @ 0x7f5b7800f080] Error getting output packet [0x7f5b78001138] avcodec encoder error: Encoding problem.. So still not really working although the encoder is now detected.
-
foxy82 over 9 yearsI'm guessing this is the messed up dependencies that you speak of presumably due to ffmpeg vs avconv
-
Volker Siegel over 9 yearsUhoh... so it's still as messy to install as it was when I did some like four years ago... I do not remember the details - as you just wrote while I'm writing this - part of the mess is that the codecs are somehow closely bound to
ffmpeg
, not really fully independent libraries. In combination with theffmpeg
vsavconv
political issues. -
Volker Siegel over 9 yearsNice, there was someone asking how to clean up the mess from installing
libavcodec54
- in parallel to this question: askubuntu.com/questions/475632/… -
foxy82 over 9 yearsThanks for your help - much appreciated! Unfortunatly that solution doesn't seem to do anything for me. Reading package lists... Done Building dependency tree Reading state information... Done 0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade. At least I know partly where the clash is - perharps I just remove them and then reinstall the other things I'm using.
-
Volker Siegel over 9 yearsHehe, I was fearing that this solution does not help you either ;) Hey, there is still hope that the codec it in only one obscure variant of the files (or maybe it just gets displaced by somepckags?) :)
-
Volker Siegel over 9 yearsOh, I just noticed that I have compiled
ffmpeg
myself long ago. That could be related of course.