LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-03-2012, 10:31 AM   #16
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,412

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857

ffmpeg-0.11.x works fine here: as 414N told you, the syntax has changed (also in 1.0), acodec is deprecated in favour of c:a (or codec:a), but there are lot of other changes (that make every maintainer of something that uses it very happy -not ).

be aware that if you upgrade to 1.0, most of the things available on slackbuilds.org depending on it won't build/run.

Last edited by ponce; 12-03-2012 at 10:33 AM.
 
Old 12-03-2012, 04:00 PM   #17
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ponce View Post
ffmpeg-0.11.x works fine here: as 414N told you, the syntax has changed (also in 1.0), acodec is deprecated in favour of c:a (or codec:a), but there are lot of other changes (that make every maintainer of something that uses it very happy -not ).

be aware that if you upgrade to 1.0, most of the things available on slackbuilds.org depending on it won't build/run.
I upgraded to it, and so far there are no problems. Also, on 1.0 the acodec command still works fine, though it didnt work at all in 0.11! I use music-on-console to play mp3s, and it has no problems, so basically I am happy with 1.0. I am just an end-user and am not sure even how to really find or decipher changelogs to know that acodec was deprecated. I mean, I can find the changelog and locate the part where it says acodec is deprecated, but its in version version 0.9 that it was deprecated.

https://raw.github.com/FFmpeg/FFmpeg/master/Changelog


Also, I was thinking of a universal command using wildcards, and wonder if there is a special character to do the following:


# ffmpeg -i *.flv -acodec copy some-regex-character.mp3

So in place of "some-regex-character", is there a character that would retain the name of the flv file that is automatically called from the wildcard character: * ? So I might run this command, it takes any flv file in the directory and turns it into an mp3 with the actual name of the random flv file that the wildcard chose? I dont really imagine so, but just curious!

Last edited by michijo; 12-03-2012 at 04:24 PM.
 
Old 12-03-2012, 05:51 PM   #18
schmatzler
Member
 
Registered: Jan 2011
Location: Germany
Distribution: Slackware64 -current + Multilib
Posts: 168

Rep: Reputation: 49
What also helps:

Code:
ffmpeg -vn -i file.flv output.mp3
Apparently there was a problem with ffmpeg 0.10 which was also mentioned in the dev forums there. Without the vn option it always tried to convert the videostream too which caused a lot of cpu power.

It's fixed in 0.11.
 
Old 12-04-2012, 02:42 PM   #19
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 343

Rep: Reputation: 56
Quote:
Originally Posted by michijo View Post
Also, I was thinking of a universal command using wildcards, and wonder if there is a special character to do the following:


# ffmpeg -i *.flv -acodec copy some-regex-character.mp3

So in place of "some-regex-character", is there a character that would retain the name of the flv file that is automatically called from the wildcard character: * ? So I might run this command, it takes any flv file in the directory and turns it into an mp3 with the actual name of the random flv file that the wildcard chose? I dont really imagine so, but just curious!
that might be something like

Code:
for file in *.flv ; do echo $file ${file%.flv}.mp3 ; done
I do something similar in my m4a2ogg script, which additionally preserves metadata like artist, genre etc.

Last edited by Martinus2u; 12-04-2012 at 03:05 PM. Reason: typo
 
Old 12-04-2012, 02:51 PM   #20
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 608

Rep: Reputation: 179Reputation: 179
Quote:
Originally Posted by Martinus2u View Post
Code:
for file in *.flv ; do echo $file ${file%.txz}.mp3 ; done
Maybe you meant ${file%.flv}
 
Old 12-04-2012, 03:07 PM   #21
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 343

Rep: Reputation: 56
Quote:
Originally Posted by 414N View Post
Maybe you meant ${file%.flv}
thx, you're right. i tested the line briefly with txz and overlooked one occurrence after pasting it. lol.
 
Old 12-05-2012, 12:53 PM   #22
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Martinus2u View Post
that might be something like

Code:
for file in *.flv ; do echo $file ${file%.flv}.mp3 ; done
I do something similar in my m4a2ogg script, which additionally preserves metadata like artist, genre etc.
Based on your idea I wrote this script:

Code:
#!/bin/bash

for file in *.flv ; do mp3=${file%.flv}.mp3 ; done

ffmpeg -i *.flv -c:a copy $mp3
This automatically produces a correctly named mp3, though if there are more than one flv files, then it attempts to overwrite one flv with another.

Last edited by michijo; 12-05-2012 at 12:59 PM.
 
Old 12-05-2012, 01:59 PM   #23
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 343

Rep: Reputation: 56
Quote:
Originally Posted by michijo View Post
Based on your idea I wrote this script:

Code:
#!/bin/bash

for file in *.flv ; do mp3=${file%.flv}.mp3 ; done

ffmpeg -i *.flv -c:a copy $mp3
This automatically produces a correctly named mp3, though if there are more than one flv files, then it attempts to overwrite one flv with another.
Hardly surprising. I recommend reading about wildcard expansion plus any programming tutorial about loops. or man bash.

this should work (not tested):

Code:
#!/bin/bash

for file in *.flv ; do ffmpeg -i $file -c:a copy ${file%.flv}.mp3 ; done
 
Old 12-05-2012, 03:30 PM   #24
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Martinus2u View Post
Hardly surprising. I recommend reading about wildcard expansion plus any programming tutorial about loops. or man bash.

this should work (not tested):

Code:
#!/bin/bash

for file in *.flv ; do ffmpeg -i $file -c:a copy ${file%.flv}.mp3 ; done
This little line works very good and rapidly on multiple flv files. thanks.

Ive been thinking to learn Haskell more, since I use Xmonad.
 
Old 06-05-2013, 07:31 PM   #25
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Update:

This script ceased to work after working good for some months. I am not sure why it no longer works. It merely stopped one day. I tried updating my system afterwards but it failed to fix it.

I just looked at the changelog for FFmpeg and didnt see anything strange. I thought maybe "-c:a copy" was now deprecated. Before it was "-acodec copy" deprecated.

Last edited by michijo; 06-05-2013 at 07:34 PM.
 
Old 06-06-2013, 02:15 PM   #26
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 608

Rep: Reputation: 179Reputation: 179
Just try the same ffmpeg options on an flv file manually: you should see if there's any issue.
 
Old 06-08-2013, 12:54 PM   #27
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
Just try the same ffmpeg options on an flv file manually: you should see if there's any issue.
That doesnt work either, but I did find something out. It says FFMPEG is deprecated itself now! So I was right about something being deprecated. Supposedly it is being replaced with AVCONF, another program. I dont know why they are calling it Ubuntu Video Converter though. I dont think FFMPEG or AVCONF is Ubuntu specific.

http://linuxheadline.com/lets-know-u...converter.html
 
Old 06-08-2013, 05:12 PM   #28
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 646

Rep: Reputation: 90
Quote:
Originally Posted by michijo View Post
That doesnt work either, but I did find something out. It says FFMPEG is deprecated itself now! So I was right about something being deprecated. Supposedly it is being replaced with AVCONF, another program.
You have seen a rather malicious message put in place by the avconv developers...
 
Old 06-09-2013, 03:40 AM   #29
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 608

Rep: Reputation: 179Reputation: 179
avconv is an ffmpeg fork started because of diverging opinions between ffmpeg developers.
Your distro has probably replaced the "pure" ffmpeg package with the avconv one, which provides an ffmpeg executable too (running avconv under the hood, if I'm not mistaken).
This, however, is not a valid reason for the conversion not happening. What is the error printed out by your ffmpeg/avconv?
 
Old 06-11-2013, 11:05 AM   #30
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
avconv is an ffmpeg fork started because of diverging opinions between ffmpeg developers.
Your distro has probably replaced the "pure" ffmpeg package with the avconv one, which provides an ffmpeg executable too (running avconv under the hood, if I'm not mistaken).
This, however, is not a valid reason for the conversion not happening. What is the error printed out by your ffmpeg/avconv?
"-c:a copy" no longer seems to work as an option. The exact error is:

"Could not write header for output file #0 (incorrect codec parameters ?)"

I have not changed anything in the way I used it, and it worked before. Another error it now shows is:

"Invalid audio stream. Exactly one MP3 audio stream is required".

I have tried this for instance:

"ffmpeg -i the-Wolfgang-Press-A-Question-of-Time.flv -c:a copy the-Wolfgang-Press-A-Question-of-Time.mp3"

It fails. I also tried running this from a terminal:

for file in *.flv ; do ffmpeg -i $file -c:a copy ${file%.flv}.mp3 ; done

This used to work, but now produces errors regarding codecs.

"Stream mapping:
Stream #0:0 -> #0:0 (h264 -> png)
Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?)"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mplayer your system is too slow after updating slackware current matters Slackware 10 07-15-2009 02:04 PM
Error updating Xine and ffmpeg. Ordinary12 Fedora 2 06-03-2007 06:12 PM
USB Drive Transfer Rate Slow After Updating kenninaz Fedora 3 09-01-2005 03:46 AM
Extreme slow boot after updating to Mandrake 10.1 TommyB Mandriva 5 04-07-2005 04:53 PM


All times are GMT -5. The time now is 10:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration