Closed acking-you closed 5 months ago
Actually, fav
download video and audio separately and merge them with ffmpeg
. You may think add fav pull --audio
naturally.
However, current implementation is through SaveLocal
trait, which only supports one kind of resource.
In this case, it only supports videos.
Although it's easy to add a download_audio
method, it seems not graceful, and fav daemon
, which is the command I used most, cannot know whether I only want audio or not, maybe leading fav
to do wrong thing.
Then I think the best way may be following the Unix Philosophy:
for file in *.mp4; do ffmpeg -i "$file" -vn -c:a copy "${file%.mp4}.m4a"; done
Because audios from bilibili are aac-encoded, so just copy as m4a is OK.
Actually,
fav
download video and audio separately and merge them withffmpeg
. You may think addfav pull --audio
naturally.However, current implementation is through
SaveLocal
trait, which only supports one kind of resource.In this case, it only supports videos.
Although it's easy to add a
download_audio
method, it seems not graceful, andfav daemon
, which is the command I used most, cannot know whether I only want audio or not, maybe leadingfav
to do wrong thing.Then I think the best way may be following the Unix Philosophy:
for file in *.mp4; do ffmpeg -i "$file" -vn -c:a copy "${file%.mp4}.m4a"; done
Because audios from bilibili are aac-encoded, so just copy as m4a is OK.
Very well, I will try to use a shell script to replace this process. Meanwhile, your answer has made me very interested in this downloading process.
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like I have a lot of live music videos in my bilibili fav that I would like to be able to convert to audio format to make it easier for me to listen to it in other music programs.
Describe alternatives you've considered I think ffmpeg already provides this capability, so implementing it shouldn't be very difficult. What we might be uncertain about now is which command Fav needs to add to support it
Additional context No