1 |
On Friday 01 Jul 2016 15:52:49 Willie M wrote: |
2 |
> On 07/01/2016 03:10 PM, Stroller wrote: |
3 |
> > I've only recently started using my Android device for playing audio. |
4 |
> > |
5 |
> > About once a week I listen to a podcast, which is usually an MP3 I've |
6 |
> > downloaded from NPR.org. |
7 |
> > |
8 |
> > On my laptop I copy these to Google Drive (big shout to net-misc/drive) |
9 |
> > and then I can access then via Drive on my Android phone. |
10 |
> > |
11 |
> > Google Drive on Android seems to play these audio files on a built-in |
12 |
> > player; its only controls are to skip forwards or backwards 30 seconds, |
13 |
> > but this is adequate for podcasts. |
14 |
> > |
15 |
> > I have here a BBC radio show that I downloaded a couple of weeks ago with |
16 |
> > net-misc/youtube-dl. |
17 |
> > |
18 |
> > When downloaded it saves as an .mp4 file. I have also tried renaming it to |
19 |
> > .m4a but, either way, Google Drive complains "unable to process this |
20 |
> > video". |
21 |
> > |
22 |
> > How do I need to process this audio to get it to play, please? |
23 |
> > |
24 |
> > I'd obviously prefer to keep the same audio stream, rather than |
25 |
> > transcoding it. I assume that the player can handle AAC (??), it just |
26 |
> > needs to be in another container. |
27 |
> > |
28 |
> > Thanks in advance for any suggestions, |
29 |
> > |
30 |
> > Stroller. |
31 |
> > |
32 |
> > |
33 |
> > |
34 |
> > Details: |
35 |
> > |
36 |
> > |
37 |
> > $ youtube-dl http://www.bbc.co.uk/programmes/b07fl5bh |
38 |
> > [bbc.co.uk] b07fl5bh: Downloading video page |
39 |
> > [bbc.co.uk] b07fl2qw: Downloading media selection XML |
40 |
> > [bbc.co.uk] b07fl2qw: Downloading m3u8 information |
41 |
> > [bbc.co.uk] b07fl2qw: Downloading m3u8 information |
42 |
> > [bbc.co.uk] b07fl2qw: Downloading m3u8 information |
43 |
> > [hlsnative] Downloading m3u8 manifest |
44 |
> > [hlsnative] Total fragments: 390 |
45 |
> > [download] Destination: The Bronze Age Collapse, In Our Time - BBC Radio |
46 |
> > 4-b07fl2qw.mp4 [download] 100% of 40.56MiB in 01:42 |
47 |
> > [ffmpeg] Fixing malformated aac bitstream in "The Bronze Age Collapse, In |
48 |
> > Our Time - BBC Radio 4-b07fl2qw.mp4" $ file The\ Bronze\ Age\ Collapse\,\ |
49 |
> > In\ Our\ Time\ -\ BBC\ Radio\ 4-b07fl2qw.mp4 The Bronze Age Collapse, In |
50 |
> > Our Time - BBC Radio 4-b07fl2qw.mp4: ISO Media, MP4 Base Media v1 [IS0 |
51 |
> > 14496-12:2003] $ midentify The\ Bronze\ Age\ Collapse\,\ In\ Our\ Time\ |
52 |
> > -\ BBC\ Radio\ 4-b07fl2qw.mp4 ID_AUDIO_ID=0 |
53 |
> > ID_AID_0_LANG=eng |
54 |
> > ID_CLIP_INFO_NAME0=major_brand |
55 |
> > ID_CLIP_INFO_VALUE0=isom |
56 |
> > ID_CLIP_INFO_NAME1=minor_version |
57 |
> > ID_CLIP_INFO_VALUE1=512 |
58 |
> > ID_CLIP_INFO_NAME2=compatible_brands |
59 |
> > ID_CLIP_INFO_VALUE2=isomiso2mp41 |
60 |
> > ID_CLIP_INFO_NAME3=encoder |
61 |
> > ID_CLIP_INFO_VALUE3=Lavf56.25.101 |
62 |
> > ID_CLIP_INFO_N=4 |
63 |
> > ID_FILENAME=The\ Bronze\ Age\ Collapse,\ In\ Our\ Time\ -\ BBC\ Radio\ |
64 |
> > 4-b07fl2qw.mp4 ID_DEMUXER=lavfpref |
65 |
> > ID_AUDIO_FORMAT=MP4A |
66 |
> > ID_AUDIO_BITRATE=128000 |
67 |
> > ID_AUDIO_RATE=48000 |
68 |
> > ID_AUDIO_NCH=2 |
69 |
> > ID_START_TIME=0.00 |
70 |
> > ID_LENGTH=2495.91 |
71 |
> > ID_SEEKABLE=1 |
72 |
> > ID_CHAPTERS=0 |
73 |
> > ID_AUDIO_BITRATE=128000 |
74 |
> > ID_AUDIO_RATE=48000 |
75 |
> > ID_AUDIO_NCH=2 |
76 |
> > ID_AUDIO_CODEC=ffaac |
77 |
> > ID_EXIT=EOF |
78 |
> > $ |
79 |
> |
80 |
> You can just have youtube-dl download just the audio of the youtube video. |
81 |
> |
82 |
> youtube-dl -x --audio-format mp3 http://www.bbc.co.uk/programmes/b07fl5bh |
83 |
> |
84 |
> You can also set other formats for the audio |
85 |
> |
86 |
> "best", "aac", "vorbis", "mp3", "m4a", "opus", or "wav" |
87 |
|
88 |
|
89 |
Since the youtube-dl can only download the audio stream as suggested above, |
90 |
you don't need to transcode with ffmpeg - although it is not difficult to do so |
91 |
for streams you have already downloaded: |
92 |
|
93 |
ffmpeg -i input.mp4 -q:a 0 -map a output.mp3 |
94 |
|
95 |
or output.m4a if you prefer. |
96 |
|
97 |
|
98 |
As an alternative for BBC you could also use get_iplayer: |
99 |
|
100 |
get_iplayer --get XXXX --radiomode=flashaachigh -- |
101 |
flvstreamer="/usr/bin/flvstreamer" |
102 |
|
103 |
-- |
104 |
Regards, |
105 |
Mick |