Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Workaround] How to filter new AV01 codec with youtube-dl?

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

[Workaround] How to filter new AV01 codec with youtube-dl?

#1 Post by bester69 »

Hi,

I have problems with new youtube codec av1, mpv 0,28 doesnt read it, and mpv0,29 give me some lags.. So I would need a --ytdl-format filter in youtube-dl
to exclude that chain stream.:

Here, for example
youtube-dl -F https://www.youtube.com/watch?v=8EJ-vZyBzOQ
136 mp4 1280x720 720p 659k , avc1.4d401f, 25fps, video only, 8.78MiB
247 webm 1280x720 720p 767k , vp9, 25fps, video only, 10.74MiB
398 mp4 1280x720 720p 1073k , av01.0.05M.08, 25fps, video only, 16.43MiB
here, I can play vid by giving it directly by id number track=136 (AVC1) ==> this codec is supported by mpv28
mpv --ytdl-format=136 https://www.youtube.com/watch?v=8EJ-vZyBzOQ

here, I can't play vid, id number track=398 (AV01) ==> this codec is not supported by mpv28
mpv --ytdl-format=398 https://www.youtube.com/watch?v=8EJ-vZyBzOQ

So, I know How can I filter vp9 codec(vcodec!=?vp9) or open vp9 (vcodec=vp9), but I dont know how to name that AVC1 codec so mpv know it.

This filter work for WEBM container.:
soun_uri="https://www.youtube.com/watch?v=8EJ-vZyBzOQ"
LIBGL_DEBUG=verbose mpv \
--ytdl-format="bestvideo[ext=webm][vcodec=vp9][height<=?720]+bestaudio[ext=webm]" "$soun_uri"

--------
AVC1 is supported, so I would need to exclude AV01

What Codec name do i use for AVC H.264 or MPEG-4 Part 10??? :?: (AVC1)
soun_uri="https://www.youtube.com/watch?v=8EJ-vZyBzOQ"
LIBGL_DEBUG=verbose mpv \
--ytdl-format="bestvideo[ext=mp4][vcodec= :?: XXXXXX :?: ][height<=?720]+bestaudio[ext=m4a]" "$soun_uri"

Ive tried with:
vcodec=h264
vcodec=libx264
vcodec=avc1.. and some more.
Last edited by bester69 on 2020-02-12 21:37, edited 2 times in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: How to filter new av1 codec with youtube-dl?

#2 Post by bester69 »

VLC neither support it :shock:

cvlc $(youtube-dl -f 398 -g https://www.youtube.com/watch?v=8EJ-vZyBzOQ)
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
[00007fabcc0113e0] main decoder error: Codec `av01' (AOMedia's AV1 Video) is not supported.
[00007fabcc0113e0] main decoder error: Códec no soportado
[....
[00007fabcc000b50] main tls client error: connection error: Network is unreachable
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: How to filter new AV01 codec with youtube-dl?

#3 Post by bester69 »

Workaround for resolution <=720p
soun_uri="https://www.youtube.com/watch?v=8EJ-vZyBzOQ"

Workaround for mp4 (<=720p):
svideo=$(youtube-dl -F "$soun_uri"|grep avc1|sort -k 4| tail -n 1 | awk '{ print $1 }')
mpv --save-position-on-quit --ytdl-format="$svideo+140" "$soun_uri"


And Solution for webm.:
mpv --save-position-on-quit \
--ytdl-format="bestvideo[ext=webm][height<=?720]+bestaudio[ext=webm]" "$soun_uri"
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [Workaround] How to filter new AV01 codec with youtube-d

#4 Post by stevepusser »

VLC has to be built against an ffmpeg that also supports the AV01 codec--like the VLC in MX 17/18 on a Stretch base... :D
MX Linux packager and developer

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: [Workaround] How to filter new AV01 codec with youtube-d

#5 Post by bester69 »

stevepusser wrote:VLC has to be built against an ffmpeg that also supports the AV01 codec--like the VLC in MX 17/18 on a Stretch base... :D
I guess It would be the same for mpv28.. everything has to be recompiled against a newer ffmpeg version that contains that codec.. I installed mpv29 and wen back to mpv28, ..mpv29 through smplayer (in my case) doesnt pick the right video chain stream resolution, It goes for a lower resolution...furthermore It eats more CPU than mpv28 and new codec av01 is not able to run properly en my old Acer Extensa5230..It happend something similar to h265 codec. ..I wonder if that new youtube codec is (new generation) same kind of codec that h265.

I guess Its hight time to buy a new laptop.. obsolescence is getting very close for my 2008's laptop... A good thing ive realised is that h264 enconding has improved a lot, now,you can see 720p ripped videos with just less than 1GbB with very hight quality, when in pass years they usually have between 2 or 3 Gby for even lower qualitys... Ive even realised that 1080p h264, seems to run smoother in my lowspec computers than before, still some moments of lag in 1080p. :D
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Post Reply