MP3 (layer 3) auto extract

rodp

Member
Hi All,

I finally bit the bullet and changed the 'Audio extraction type' setting in the webif settings page to MPEG-1 Layer III (MP3) as although I'd managed to get my Android to convert in situ (using BubbleUPnP) and then cast to my Chrome Cast Audio it was rather a drainer on the battery!

The first radio recording after this change occurred last Friday evening and I can see in the 'Auto' log that it's tried to convert it a number of times or it's just moved onto something else. See log below. The mp3 file is no where to be found.

Please can someone help me with this one as although I know it takes a long time to convert to mp3 instead of keeping it mp2, I would have thought it would have done it by now or at least the log would have given me something more to work on.

Thanks in advance

Rodp

--------------------------------

4851 24/07/2016 21:45:39 - Done... 182.95 MiB in 23.655 seconds - 7.73 MiB/s
4850 24/07/2016 21:45:39 - Removing/binning old copy.
4849 24/07/2016 21:45:16 - DLNA: http://127.0.0.1:9000/web/media/16429.TS
4848 24/07/2016 21:45:15 - DECRYPT: /media/My Video/3 Sync/Money Box/Money Box_20160723_1204
4847 24/07/2016 11:45:22 - Converting... MPEG-1 Audio Layer III (MP3)
4846 24/07/2016 11:45:22 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4845 24/07/2016 04:05:19 - Converting... MPEG-1 Audio Layer III (MP3)
4844 24/07/2016 04:05:19 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4843 23/07/2016 20:45:22 - Converting... MPEG-1 Audio Layer III (MP3)
4842 23/07/2016 20:45:22 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4841 23/07/2016 12:41:03 - autotrigger[29176]: failed to get lock
4840 23/07/2016 11:45:21 - Converting... MPEG-1 Audio Layer III (MP3)
4839 23/07/2016 11:45:21 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4838 23/07/2016 09:45:21 - Converting... MPEG-1 Audio Layer III (MP3)
4837 23/07/2016 09:45:21 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4836 23/07/2016 06:05:20 - Converting... MPEG-1 Audio Layer III (MP3)
4835 23/07/2016 06:05:20 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4834 23/07/2016 04:31:27 - Converting... MPEG-1 Audio Layer III (MP3)
4833 23/07/2016 04:31:27 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
 
Hi Black Hole,

That I can do - no problem - I just have to use my PC I suppose but I was just hoping the Humax would do this automatically. Does the extract to MP1 Layer 3 work for anyone else?

Thanks

Rodp
 
Doing a manual conversion you way well see if there was some problem with the original recording that is causing the auto processing to fail.

Also set Auto-processing log level to Debugging information under general settings and see if that generates any more information from the auto processing
 
Conversion on PC is fine - no problems. Have changed to debugging mode. auto.log so far

5000 27/07/2016 10:45:13 - Could not acquire lock.
4999 27/07/2016 10:25:40 - Converting... MPEG-1 Audio Layer III (MP3)
4998 27/07/2016 10:25:40 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4997 27/07/2016 09:09:10 - Converting... MPEG-1 Audio Layer III (MP3)
4996 27/07/2016 09:09:10 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200

is the COuld not acquire lock relating to converting it or not.

Is there a temp path where the mp3 is being created so that I can at least see any progress?

Thanks

Rodp
 
Just checked my auto.log again and getting more 'could not acquire lock' messages. Perhaps this 'is' the issue but don't know what's locking the file.

5000 27/07/2016 12:45:12 - Could not acquire lock.
4999 27/07/2016 12:25:13 - Could not acquire lock.
4998 27/07/2016 12:05:12 - Could not acquire lock.
4997 27/07/2016 11:45:12 - Could not acquire lock.
4996 27/07/2016 11:25:12 - Could not acquire lock.
4995 27/07/2016 11:05:12 - Could not acquire lock.
4994 27/07/2016 10:45:13 - Could not acquire lock.
4993 27/07/2016 10:25:40 - Converting... MPEG-1 Audio Layer III (MP3)
4992 27/07/2016 10:25:40 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4991 27/07/2016 09:09:10 - Converting... MPEG-1 Audio Layer III (MP3)
4990 27/07/2016 09:09:10 - MP3: /media/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200
4989 27/07/2016 09:08:56 - Done... 324.81 MiB in 22.577 seconds - 14.39 MiB/s

Rebooting had no success, nor unflagging the folder and reflagging it to extract the audio.

I have access to another Hummy (same firmware versions etc) and that is already set to MP3 Layer 3 and that works fine so I'm sure it should work on mine but perhaps something has got confused - problem is I don't know what.

So then I looked into seeing what (if anything) was locking the file by using some telnet commands.

I navigated to the folder where the file was and then did fuser

humax# fuser "Pete Tong_20160722_2200.ts"

this gave the process id (?) of 10975

so then I did:

humax# lsof | grep '10975'
ffmpeg 10975 root cwd DIR 31,0 183 89 /
ffmpeg 10975 root rtd DIR 31,0 183 89 /
ffmpeg 10975 root txt REG 8,2 157176 37831897 /mnt/hd2/mod/bin/ffmpeg
ffmpeg 10975 root mem REG 31,0 35395 165 /lib/ld-uClibc-0.9.29.so
ffmpeg 10975 root mem REG 8,2 43212 37831917 /mnt/hd2/mod/lib/libavdevice.so.53.4.100
ffmpeg 10975 root mem REG 8,2 548884 37831918 /mnt/hd2/mod/lib/libavfilter.so.2.60.100
ffmpeg 10975 root mem REG 8,2 1368176 37831901 /mnt/hd2/mod/lib/libavformat.so.53.31.100
ffmpeg 10975 root mem REG 8,2 6785608 37831907 /mnt/hd2/mod/lib/libavcodec.so.53.60.100
ffmpeg 10975 root mem REG 8,2 47060 37831919 /mnt/hd2/mod/lib/libpostproc.so.52.0.100
ffmpeg 10975 root mem REG 8,2 35064 37831903 /mnt/hd2/mod/lib/libswresample.so.0.6.100
ffmpeg 10975 root mem REG 8,2 211224 37831911 /mnt/hd2/mod/lib/libswscale.so.2.1.100
ffmpeg 10975 root mem REG 8,2 161904 37831913 /mnt/hd2/mod/lib/libavutil.so.51.34.101
ffmpeg 10975 root mem REG 31,0 84568 163 /lib/libm-0.9.29.so
ffmpeg 10975 root mem REG 31,0 109417 192 /lib/libpthread-0.9.29.so
ffmpeg 10975 root mem REG 31,0 837630 160 /lib/libuClibc-0.9.29.so
ffmpeg 10975 root mem REG 31,0 73724 1608 /usr/lib/libz.so.1.2.3
ffmpeg 10975 root mem REG 8,2 475715 37831950 /mnt/hd2/mod/lib/libmp3lame.so.0.0.0
ffmpeg 10975 root mem REG 31,0 11629 177 /lib/libdl-0.9.29.so
ffmpeg 10975 root 0u CHR 1,3 328 /dev/null
ffmpeg 10975 root 1w FIFO 0,5 17149 pipe
ffmpeg 10975 root 2u REG 0,13 0 17150 /tmp/tcl.tmp.0otvaZ (deleted)
ffmpeg 10975 root 3r REG 8,2 336856896 10526766 /mnt/hd2/My Video/3 Sync/Pete Tong/Pete Tong_20160722_2200.ts
ffmpeg 10975 root 4w REG 8,2 2994083 37831861 /mnt/hd2/mod/tmp/webif_auto/mp3.mp3
ffmpeg 10975 root 10u REG 0,13 0 17150 /tmp/tcl.tmp.0otvaZ (deleted)

So from this it looks like it is creating an mp3 'mnt/hd2/mod/tmp/webif_auto/mp3.mp3'. Is that right?

and the mp3 file is growing but what happens at the end of the process is a mystery.

humax# ls -al /mnt/hd2/mod/tmp/webif_auto
drwxr-xr-x 2 root root 4096 Jul 27 13:25 .
drwxrwxrwt 3 root root 4096 Jul 17 16:21 ..
-rw-rw-rw- 1 root root 64 Jul 27 13:25 .op
-rw-rw-rw- 1 root root 4938659 Jul 27 13:46 mp3.mp3
humax# ls -al /mnt/hd2/mod/tmp/webif_auto
drwxr-xr-x 2 root root 4096 Jul 27 13:25 .
drwxrwxrwt 3 root root 4096 Jul 17 16:21 ..
-rw-rw-rw- 1 root root 64 Jul 27 13:25 .op
-rw-rw-rw- 1 root root 4971683 Jul 27 13:46 mp3.mp3
humax# ls -al /mnt/hd2/mod/tmp/webif_auto
drwxr-xr-x 2 root root 4096 Jul 27 13:25 .
drwxrwxrwt 3 root root 4096 Jul 17 16:21 ..
-rw-rw-rw- 1 root root 64 Jul 27 13:25 .op
-rw-rw-rw- 1 root root 5010083 Jul 27 13:46 mp3.mp3
humax# ls -al /mnt/hd2/mod/tmp/webif_auto
drwxr-xr-x 2 root root 4096 Jul 27 13:25 .
drwxrwxrwt 3 root root 4096 Jul 17 16:21 ..
-rw-rw-rw- 1 root root 64 Jul 27 13:25 .op
-rw-rw-rw- 1 root root 5084579 Jul 27 13:47 mp3.mp3
humax# ls -al /mnt/hd2/mod/tmp/webif_auto
drwxr-xr-x 2 root root 4096 Jul 27 13:25 .
drwxrwxrwt 3 root root 4096 Jul 17 16:21 ..
-rw-rw-rw- 1 root root 64 Jul 27 13:25 .op
-rw-rw-rw- 1 root root 5154467 Jul 27 13:47 mp3.mp3

I'll watch to see what happens but am hoping that someone can shine some light on this.

Thanks in advance

Rodp
 
I recall when this all came up before it was concluded that the Human box was under powered for the conversion to proper MP3. Grey matter and age etc I recall that the default MP3 file that the custom software was producing was MP4 packaged with an MP3 filename which some players are perfectly happy to play, others aren't (or something close to this, MP2 whatever:)). Hence users preference where they want a real MP3 is to use a PC. There were published comparison figures on the thread in question on the amount of time consumed. I gave it a try and concluded that yes the overheads on the Humax conversion were great.

This thread is the one to read on timing

https://hummy.tv/forum/threads/script-to-extract-audio-ts-to-mpg.4703/#post-59878
 
Last edited:
The Auto process runs every 20 minutes and uses a lock to ensure only one copy is running simultaneously so that would explain the Could not acquire lock. messages every 20 minute.

What is not clear is why the conversion has failed to complete after 2.5 hours, the fact the mp3 file is still growing show that it is still running.

It would be best to do your testing with short recordings - it appears that Pete Tong shows are usually 3hours long!

I don't usually play with radio recording but when DetectAds is extracting audio from an HD TV broadcast it can take about 30 to process an hour of recording, DetectAds uses a separate task so that it doesn't hold up the Auto task.

When suggesting a manual conversion earlier I was suggesting trying it on the Humax using the Webif browse Extract Audio option - not doing it on your PC.
 
PRPR from the link posted says it takes 4 times real time in the box, so 3 hours would take 12 hours etc.... I'm passing through.
 
Hi All,

I've been watching the progress of the mp3 file in the hidden folder and it looks like the rate is about 225Kb/s which on a 3 hour recording (as you say Pete Tong shows are rather long!) I've worked out will take about 18 hours (I htink that works out to be about 6 minutes for every 1 minute of recording) ... so not really practical unless you keep your humax on day and night which I don't tend to do. One additional thing however, I assume that the creating of the MP3 needs to be done in one go, ie it won't resume from where it left off each time the humax is turned on? could it?!?

MymsMan, sorry misunderstood what you were saying so will give that a go. I'll leave the box on for the 18 hours stint first though just to double check it does (in the end) complete(!). Can anyone confirm that the the manual conversion via webif is quicker than the automatic method?

Thanks

Rodp
 
I suppose this all leads me back to wishing for there to be a little ffmpeg dongle server gadget thing with a quad core processor built in that you could plug in into the back of the humax and set it up to convert the files... in a reasonable time. :D

(I'll dream on!)

Rodp
 
I assume that the creating of the MP3 needs to be done in one go, ie it won't resume from where it left off each time the humax is turned on? could it?!?
You assume (presume) correctly. It won't and can't restart.
Can anyone confirm that the the manual conversion via webif is quicker than the automatic method?
It isn't. Conversion runs at the same speed since it is the same CPU processing the same file on the same disk.
 
get iPlayer has it's uses. I don't use the Humax as a source of materiel to take off and play elsewhere except on another Humax. Within those limits it works well.
 
It is not clear to me why ffmpeg extracting from a radio file is so much slower than when extracting from a TV recording.

I thought extracting from TV was slow but from Radio it is glacial and using 90% cpu the whole time
What is it about radio file formats that is so slow to decode!

I suppose this all leads me back to wishing for there to be a little ffmpeg dongle server gadget thing with a quad core processor built in that you could plug in into the back of the humax and set it up to convert the files... in a reasonable time. :D

(I'll dream on!)

Rodp

You would be better writing a little script to pul recordings to your PC and process them, or just pulling them from the BBC with get iPlayer
 
Anyone thought about or know whether ffmpeg encoding can be paused and then resumed when the humax is shut down (by some 6 or 8 year old boys who didn't know that Daddy was needing to keep the humax on!!!)?

Rodp
PS I think my maths was wrong - it's more like 225Kb/min encoding speed, not per second.
 
I suppose this all leads me back to wishing for there to be a little ffmpeg dongle server gadget thing with a quad core processor built in that you could plug in into the back of the humax and set it up to convert the files... in a reasonable time. :D

(I'll dream on!)

Rodp
If you have a PC on your network you could run the ffmpeg conversion using its faster processor. Share the drive of the HDR-FOX with samba and you would not need to copy the source file to the PC; you could save the output directly on the HDR-FOX drive too. If the PC has a Linux OS you can download ffmpeg from one of the repositories. With Windows you can download standalone builds which you can run from the command line, or search for a program which uses ffmpeg with a GUI front end.

It is not clear to me why ffmpeg extracting from a radio file is so much slower than when extracting from a TV recording.

I thought extracting from TV was slow but from Radio it is glacial and using 90% cpu the whole time
What is it about radio file formats that is so slow to decode!



You would be better writing a little script to pul recordings to your PC and process them, or just pulling them from the BBC with get iPlayer
Isn't it transcoding to mp3 that is the processor hog? If you select the MP2 option it just copies the audio track (either MPEG-2 or AAC) to a new file and this seems quite quick to me, though I have not directly compared the speed of audio extraction from a radio recording to that from a video recording. Presumably the audio bitrates would be a factor.
 
MymsMan seems to be saying that full MP3 extraction from a radio recording is slower than ditto from a TV recording. I can't say I've noticed, but I can't say I've looked either.
 
Back
Top