I have some files
Joapira___BERLINA_DEL_HIERRO.mp4
Joapira___EL_BAILE_DEL_VIVO.mp4
Joapira___EL_CONDE_CABRA.mp4
Joapira___FLAIRE.mp4
Joapira___MAZULKA_DEL_HIERRO.mp4
Joapira___MEDA_A_MANOLITO_DIAZ_ARTESANO_TALLISTA.mp4
that I want to convert to some other formats with ffmpeg
and GNU parallel
. For example to convert them to flac I do
parallel --bar ffmpeg -i "{}" -map_metadata 0 "{/.}.flac" ::: *
or to convert them to mp3 I do
parallel --bar ffmpeg -i "{}" -vn -ar 44100 -ab 128k -map_metadata 0 "{/.}.mp3" ::: $@
but the process continues forever and the first file is always missing. Why?
Info
I am on Fedora 22 using
GNU parallel 20160222
and
ffmpeg version N-80953-gd4c8e93-static http://johnvansickle.com/ffmpeg/
Update
Fascinating, I tried it with ffmpeg version 2.6.8 (comes with Fedora) and it works!! And even with the most recent static build from git it does not. :-(
Update 2
When I run ps auxwww
and search for ffmpeg I see all the jobs with the state Rl, except for the command of the file that is missing, which has the state T.
GNU parallel has the state S+, but sometimes during the processing of the working files changes to R+.
The man page of ps
says the following about the states:
D uninterruptible sleep (usually IO)
R running or runnable (on run queue)
S interruptible sleep (waiting for an event to complete)
T stopped by job control signal
t stopped by debugger during the tracing
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z defunct ("zombie") process, terminated but not reaped by its parent
< high-priority (not nice to other users)
N low-priority (nice to other users)
L has pages locked into memory (for real-time and custom IO)
s is a session leader
l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+ is in the foreground process group
Maybe this helps to understand the problem.
-u
doesn’t make a difference. My temporary workaround is to use the ffmpeg version shipped with Fedora, which is ok for these audio codec conversions. But it would be nice to know what is going wrong and if it’s also the case within other distributions.git bisect run
is brilliant for that. By identifying the problematic change it can probably be determined whether this is anffmpeg
issue or a GNUparallel
issue.