On Friday 01 Jul 2016 15:52:49 Willie M wrote: > On 07/01/2016 03:10 PM, Stroller wrote: > > I've only recently started using my Android device for playing audio. > > > > About once a week I listen to a podcast, which is usually an MP3 I've > > downloaded from NPR.org. > > > > On my laptop I copy these to Google Drive (big shout to net-misc/drive) > > and then I can access then via Drive on my Android phone. > > > > Google Drive on Android seems to play these audio files on a built-in > > player; its only controls are to skip forwards or backwards 30 seconds, > > but this is adequate for podcasts. > > > > I have here a BBC radio show that I downloaded a couple of weeks ago with > > net-misc/youtube-dl. > > > > When downloaded it saves as an .mp4 file. I have also tried renaming it to > > .m4a but, either way, Google Drive complains "unable to process this > > video". > > > > How do I need to process this audio to get it to play, please? > > > > I'd obviously prefer to keep the same audio stream, rather than > > transcoding it. I assume that the player can handle AAC (??), it just > > needs to be in another container. > > > > Thanks in advance for any suggestions, > > > > Stroller. > > > > > > > > Details: > > > > > > $ youtube-dl http://www.bbc.co.uk/programmes/b07fl5bh > > [bbc.co.uk] b07fl5bh: Downloading video page > > [bbc.co.uk] b07fl2qw: Downloading media selection XML > > [bbc.co.uk] b07fl2qw: Downloading m3u8 information > > [bbc.co.uk] b07fl2qw: Downloading m3u8 information > > [bbc.co.uk] b07fl2qw: Downloading m3u8 information > > [hlsnative] Downloading m3u8 manifest > > [hlsnative] Total fragments: 390 > > [download] Destination: The Bronze Age Collapse, In Our Time - BBC Radio > > 4-b07fl2qw.mp4 [download] 100% of 40.56MiB in 01:42 > > [ffmpeg] Fixing malformated aac bitstream in "The Bronze Age Collapse, In > > Our Time - BBC Radio 4-b07fl2qw.mp4" $ file The\ Bronze\ Age\ Collapse\,\ > > In\ Our\ Time\ -\ BBC\ Radio\ 4-b07fl2qw.mp4 The Bronze Age Collapse, In > > Our Time - BBC Radio 4-b07fl2qw.mp4: ISO Media, MP4 Base Media v1 [IS0 > > 14496-12:2003] $ midentify The\ Bronze\ Age\ Collapse\,\ In\ Our\ Time\ > > -\ BBC\ Radio\ 4-b07fl2qw.mp4 ID_AUDIO_ID=0 > > ID_AID_0_LANG=eng > > ID_CLIP_INFO_NAME0=major_brand > > ID_CLIP_INFO_VALUE0=isom > > ID_CLIP_INFO_NAME1=minor_version > > ID_CLIP_INFO_VALUE1=512 > > ID_CLIP_INFO_NAME2=compatible_brands > > ID_CLIP_INFO_VALUE2=isomiso2mp41 > > ID_CLIP_INFO_NAME3=encoder > > ID_CLIP_INFO_VALUE3=Lavf56.25.101 > > ID_CLIP_INFO_N=4 > > ID_FILENAME=The\ Bronze\ Age\ Collapse,\ In\ Our\ Time\ -\ BBC\ Radio\ > > 4-b07fl2qw.mp4 ID_DEMUXER=lavfpref > > ID_AUDIO_FORMAT=MP4A > > ID_AUDIO_BITRATE=128000 > > ID_AUDIO_RATE=48000 > > ID_AUDIO_NCH=2 > > ID_START_TIME=0.00 > > ID_LENGTH=2495.91 > > ID_SEEKABLE=1 > > ID_CHAPTERS=0 > > ID_AUDIO_BITRATE=128000 > > ID_AUDIO_RATE=48000 > > ID_AUDIO_NCH=2 > > ID_AUDIO_CODEC=ffaac > > ID_EXIT=EOF > > $ > > You can just have youtube-dl download just the audio of the youtube video. > > youtube-dl -x --audio-format mp3 http://www.bbc.co.uk/programmes/b07fl5bh > > You can also set other formats for the audio > > "best", "aac", "vorbis", "mp3", "m4a", "opus", or "wav"
Since the youtube-dl can only download the audio stream as suggested above, you don't need to transcode with ffmpeg - although it is not difficult to do so for streams you have already downloaded: ffmpeg -i input.mp4 -q:a 0 -map a output.mp3 or output.m4a if you prefer. As an alternative for BBC you could also use get_iplayer: get_iplayer --get XXXX --radiomode=flashaachigh -- flvstreamer="/usr/bin/flvstreamer" -- Regards, Mick
signature.asc
Description: This is a digitally signed message part.