jackun / VLCTube

The Unlicense
15 stars 4 forks source link

Request - make it compatible with "YouTube Video and Audio Downloader" addon #57

Closed LL25255252 closed 9 years ago

LL25255252 commented 9 years ago

https://addons.mozilla.org/en-us/firefox/addon/youtube-video-and-audio-dow/ I'm using this addon to download the audio part of the video. It gives direct links to the m4a (AAC) audio parts. If VLCtube is enabled then it blocks the addon's "download links" panel.

TIA.

jackun commented 9 years ago

I don't know, may need too much to refactor thumbnail "mode". It assume it's a flashplayer and injects its menu right after VLC plugin. But when using thumbnails, VLC is hidden so no menu. Seems to kind of work, though.

ghost commented 9 years ago

This still works with VLCTube, doesn't offer automatic conversion to audio though. https://addons.mozilla.org/En-us/firefox/addon/download-youtube/

But, you can use VLC to convert mp4 to mp3 pretty easily, copy this to a Mp4toMp3.bat and place it in a directory with mp4 files to convert and run it and their audio will be copied to mp3:

@ECHO OFF
REM ########################################################################
REM # A Windows XP cmd.com script to batch convert mp4 files to mp3.       #
REM #                                                                      #
REM # Created by DieselDragon on 10th Nov 2010CE, derived from a copyright #
REM # (C) 2008CE work of Andrew Boden <boden@graduate.uwa.edu.au> found at #
REM # http://wiki.videolan.org/How_to_Batch_Encode                         #
REM # Changed, cited and redistributed under the GNU GPL as detailed below #
REM #                                                                      #
REM # This program is free software: you can redistribute it and/or modify #
REM # it under the terms of the GNU General Public License as published by #
REM # the Free Software Foundation, either version 3 of the License, or    #
REM # (at your option) any later version.                                  #
REM #                                                                      #
REM # This program is distributed in the hope that it will be useful,      #
REM # but WITHOUT ANY WARRANTY; without even the implied warranty of       #
REM # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        #
REM # GNU General Public License for more details.                         #
REM #                                                                      #
REM # You should have received a copy of the GNU General Public License    #
REM # along with this program.  If not, see <http://www.gnu.org/licenses/>.#
REM #                                                                      #
REM # Version 1.10 (Derivative - DieselDragon, November 2010CE)            #
REM # Uses VideoLAN VLC 1.1.4 (www.videolan.org)                           #
REM # Gracefully handles commas and apostrophes in file names.             #
REM # Not aware of any other characters needing graceful handling.         #
REM # 128kbps encoding with 44100 sampling.                                #
REM ########################################################################

FOR /R %%G IN (*.mp4) DO (CALL :SUB_VLC "%%G")
FOR /R %%G IN (*.mp4.mp*) DO (CALL :SUB_RENAME "%%G")
GOTO :eof

:SUB_VLC
SET _firstbit=%1
SET _qt="
CALL SET _newnm=%%_firstbit:%_qt%=%%
SET _commanm=%_newnm:,=_COMMA_%
REM echo %_commanm%

ECHO Transcoding %1
REM Here's where the actual transcoding/conversion happens. The next line
REM fires off a command to VLC.exe with the relevant arguments:
CALL "C:\Program Files (x86)\VideoLAN\VLC\vlc" -I dummy -v %1 :sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:standard{access="file",mux=dummy,dst="%_commanm%.mp3"} vlc://quit

GOTO :eof

:SUB_RENAME
SET _origfnm=%1
SET _endbit=%_origfnm:*.mp4=%
CALL SET _newfilenm=%%_origfnm:.mp4%_endbit%=.mp3%%
SET _newfilenm=%_newfilenm:_COMMA_=,%
COPY %1 %_newfilenm%
DEL %1
GOTO :eof

:eof
LL25255252 commented 9 years ago

@michaelmotes thanks for your suggestion. Here's mine: Creating mp3 from mp4 can be performed with the new https://cloudconvert.com/ You can set there the start-time and end-time before converting.