Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 22/02/2020, à 18:50

canard-gras

(RESOLU) youtube-dl pb audio TV replay

bonjour,
Je renconre depuis quelques temps un problème avec youtube-dl que j'utilise pour enregistrer les emission allo-docteur de TVreplay.
Avant tout marchait correctement. Ubuntu 18.04.4 LTS

youtube-dl -v https://www.france.tv/france-5/allo-doc … teurs.html

Cela me donne un fichier où l'audio ne dure que quelques secondes, l'image est ok avec toute l'émission.

la commande :

mediainfo Allô\,\ docteurs\ \!-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4

General
Complete name                            : Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 368 MiB
Duration                                 : 25 min 52 s
Overall bit rate                         : 1 986 kb/s
Writing application                      : Lavf57.83.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=1, N=50
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 25 min 52 s
Bit rate                                 : 1 985 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.086
Stream size                              : 367 MiB (100%)
Writing library                          : Zencoder Video Encoding System

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 8 s 0 ms
Bit rate mode                            : Constant
Bit rate                                 : 96.0 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 94.3 KiB (0%)
Default                                  : Yes
Alternate group                          : 1


On voit que la partie audio n'est pas correcte.

Bien sûr, j'ai vérifié le logiciel


youtube-dl --version
2020.02.16



Est-ce que cela fait pareil chez vous ?
Connaissez-voous ce pb ?

Dernière modification par canard-gras (Le 22/02/2020, à 21:09)


Bravo à Linux, les logiciels libres et Ubuntu !
PS : Ne pas oublier de poster ses expériences pour aider les autres.

Hors ligne

#2 Le 22/02/2020, à 18:59

abelthorne

Re : (RESOLU) youtube-dl pb audio TV replay

Jette un coup d'œil dans les dernières pages de ce sujet : https://forum.ubuntu-fr.org/viewtopic.php?id=1559861
Je crois me souvenir d'un problème similaire sur des émissions de France TV il y a quelques semaines. C'est possible que dPluzz les gère correctement, je n'ai pas vraiment suivi ce que les gens ont essayé.

Hors ligne

#3 Le 22/02/2020, à 19:13

kamaris

Re : (RESOLU) youtube-dl pb audio TV replay

Avec francetv il faut se méfier, ils changent de temps en temps de formats, et si l'émission est trop récente ça peut poser problème aussi (même si c'est pas le cas ici).
Donc plutôt que de faire

youtube-dl https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html

en lui laissant gérer le format, il faut mieux jeter un coup d'œil à ce qui est dispo, par

youtube-dl -F https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html

puis sélectionner un format par copier-coller : en général le format « best » convient, mais des fois non, il faut vérifier :

youtube-dl -fbest https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html

Là je viens de télécharger l'émission avec cette ligne de commande, et aucun problème :

$ mediainfo Téléchargements/Allô\,\ docteurs\ \!-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4 
General
Complete name                            : Téléchargements/Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 386 MiB
Duration                                 : 25 min 52 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 085 kb/s
Writing application                      : Lavf58.29.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 2 frames
Format settings, GOP                     : M=1, N=50
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 25 min 52 s
Bit rate                                 : 1 985 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.086
Stream size                              : 367 MiB (95%)
Writing library                          : Zencoder Video Encoding System
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 25 min 52 s
Bit rate mode                            : Variable
Bit rate                                 : 96.0 kb/s
Maximum bit rate                         : 110 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 17.8 MiB (5%)
Default                                  : Yes
Alternate group                          : 1


$

Hors ligne

#4 Le 22/02/2020, à 19:35

melixgaro

Re : (RESOLU) youtube-dl pb audio TV replay

Bonjour,
Je pense que c'est la version de ffmpeg (utilisée par youtube-dl) qui peut expliquer la différence entre le résultat de canard-gras et kamaris.


Linux depuis ~2007. Xubuntu seulement.

Hors ligne

#5 Le 22/02/2020, à 19:42

kamaris

Re : (RESOLU) youtube-dl pb audio TV replay

Ces derniers temps, francetv propose en format best un fichier video+audio déjà mixé :

$ youtube-dl https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html -F
[FranceTVSite] 1182975-allo-docteurs: Downloading webpage
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading video JSON
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading signed hls_v5_os manifest URL
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading m3u8 information
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading signed m3u8-download manifest URL
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading m3u8 information
[info] Available formats for 791a5dda-ed24-4ca9-9e27-1a794b47914d:
format code                             extension  resolution note
hls_v5_os-audio-aacl-64-Audio_Français  mp4        audio only [fr] 
hls_v5_os-191                           mp4        384x216     191k , avc1.42C01E, 25.0fps, video only
hls_v5_os-321                           mp4        640x360     321k , avc1.4D401F, 25.0fps, video only
hls_v5_os-609                           mp4        960x540     609k , avc1.4D401F, 25.0fps, video only
hls_v5_os-880                           mp4        1280x720    880k , avc1.64001F, 25.0fps, video only
m3u8-download-518                       mp4        384x216     518k , avc1.66.30, mp4a.40.2
m3u8-download-1081                      mp4        640x360    1081k , avc1.77.30, mp4a.40.2
m3u8-download-1537                      mp4        960x540    1537k , avc1.77.30, mp4a.40.2
m3u8-download-2153                      mp4        1280x720   2153k , avc1.64001f, mp4a.40.2 (best)
$

Du coup, je n'ai qu'une petite intervention de ffmpeg pour correction à la fin du téléchargement, mais pas pour rassembler audio et vidéo :

$ youtube-dl https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html -fbest
[FranceTVSite] 1182975-allo-docteurs: Downloading webpage
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading video JSON
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading signed hls_v5_os manifest URL
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading m3u8 information
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading signed m3u8-download manifest URL
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 156
[download] Destination: /home/user/Téléchargements/Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4
[download] 100% of 402.38MiB in 15:37
[ffmpeg] Fixing malformed AAC bitstream in "/home/user/Téléchargements/Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4"
$

Tu crois que ça peut venir de là quand même ?

Hors ligne

#6 Le 22/02/2020, à 19:51

melixgaro

Re : (RESOLU) youtube-dl pb audio TV replay

Ah merci. Je croyais que c'était la même histoire qu'il y a peu, avec des pistes audio et vidéo à recombiner a posteriori.


Par défaut, youtube-dl choisit le format “best”, non ? Ajout : ah non, si on ne spécifie pas “-f best”, il choisit le bestvideo+bestaudio et on tombe sur le problème de recombinaison.

Dernière modification par melixgaro (Le 22/02/2020, à 19:55)


Linux depuis ~2007. Xubuntu seulement.

Hors ligne

#7 Le 22/02/2020, à 19:58

kamaris

Re : (RESOLU) youtube-dl pb audio TV replay

Eh bien non, le manuel est un peu ambigüe sur ce point, mais en fait, par défaut, il va télécharger le best audio, le best video, et mixer les deux.
Je viens d'ailleurs de trouver cette précision dans le manuel :

man youtube-dl a écrit :

If  you  want  to preserve the old format selection behavior (prior to youtube-dl 2015.04.26), i.e. you want to download the best available quality media served as a single file, you should explicitly specify your choice with -f best.

EDIT : on s'est croisés wink

Dernière modification par kamaris (Le 22/02/2020, à 19:59)

Hors ligne

#8 Le 22/02/2020, à 20:00

melixgaro

Re : (RESOLU) youtube-dl pb audio TV replay

Oui, je viens d'en faire l'expérience et j'ai corrigé mon message entre-temps. Merci


Linux depuis ~2007. Xubuntu seulement.

Hors ligne

#9 Le 22/02/2020, à 21:08

canard-gras

Re : (RESOLU) youtube-dl pb audio TV replay

Bien  trouvé ! merci.

Pour résumer la résolution du pb : utiliser youtube avec l'option -f best

 youtube-dl -vbest https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html
Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: no such option: -b
multimedia@multimedia-ZBOX-ID81:~$ youtube-dl -v -fbest https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-fbest', u'https://www.france.tv/france-5/allo-docteurs/1182975-allo-docteurs.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.02.16
[debug] Python version 2.7.17 (CPython) - Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: avconv 3.4.6, avprobe 3.4.6, ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[FranceTVSite] 1182975-allo-docteurs: Downloading webpage
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading video JSON
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading signed hls_v5_os manifest URL
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading m3u8 information
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading signed m3u8-download manifest URL
[FranceTV] 791a5dda-ed24-4ca9-9e27-1a794b47914d: Downloading m3u8 information
[debug] Invoking downloader on u'http://replayftv-vh.akamaihd.net/i/streaming-adaptatif/2020/S06/J3/222414938-5e3acbda9111f-,standard1,standard2,standard3,standard4,.mp4.csmil/index_3_av.m3u8?null=0'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 156
[download] Destination: Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4
[download] 100% of 402.38MiB in 04:15
[debug] ffmpeg command line: ffprobe -show_streams 'file:Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4'
[ffmpeg] Fixing malformed AAC bitstream in "Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4' -c copy -f mp4 '-bsf:a' aac_adtstoasc 'file:Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.temp.mp4'

le résultat

mediainfo Allô\,\ docteurs\ \!-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4 
General
Complete name                            : Allô, docteurs !-791a5dda-ed24-4ca9-9e27-1a794b47914d.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 386 MiB
Duration                                 : 25 min 52 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 085 kb/s
Writing application                      : Lavf57.83.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=1, N=50
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 25 min 52 s
Bit rate                                 : 1 985 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.086
Stream size                              : 367 MiB (95%)
Writing library                          : Zencoder Video Encoding System

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 25 min 52 s
Bit rate mode                            : Variable
Bit rate                                 : 96.0 kb/s
Maximum bit rate                         : 110 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 17.8 MiB (5%)
Default                                  : Yes
Alternate group                          : 1

On note que le fichier audio est de 25 minutes. donc résultat ok.

note : effectivement, en choisissant l'option -f best  youtube-dl ne passe plus de temps aprés le téléchargement à traiter les fichiers audio et video.

Je mets en résolu. Merci à tou(te)s

Dernière modification par canard-gras (Le 22/02/2020, à 21:12)


Bravo à Linux, les logiciels libres et Ubuntu !
PS : Ne pas oublier de poster ses expériences pour aider les autres.

Hors ligne

#10 Le 22/02/2020, à 22:23

melixgaro

Re : (RESOLU) youtube-dl pb audio TV replay

Super ! (à part ça, il est vrai qu'avec dpluzz, tu n'aurais pas eu ce problème)


Linux depuis ~2007. Xubuntu seulement.

Hors ligne

#11 Le 24/02/2020, à 10:19

canard-gras

Re : (RESOLU) youtube-dl pb audio TV replay

Bonjour,
J'utilisai Dpluzz avant. Puis malgré le dévouement de certains mainteneurs, cela bugguait trop et présentait le pb ci-dessous.
Je préfère utiliser youtube-dl en lançant autant de terminaux que d'émissions à télécharger (environ une vingtaine), ce que ne pouvait plus faire Dpluzz.
Je n'ai pas vérifié depuis.

Par ailleurs, j'utilise Qarte pour Arte qui permet de télécharger plusieurs émissions en même temps..
Bonne journée.

Dernière modification par canard-gras (Le 24/02/2020, à 10:19)


Bravo à Linux, les logiciels libres et Ubuntu !
PS : Ne pas oublier de poster ses expériences pour aider les autres.

Hors ligne

#12 Le 24/02/2020, à 10:37

abelthorne

Re : (RESOLU) youtube-dl pb audio TV replay

Pour télécharger des vidéos en masse, j'utilise JDownloader 2. Il marche plutôt bien, même si j'avais eu le même problème qu'avec youtube-dl (son pendant 10 secondes au débit) quand j'avais testé une vidéo de France TV. Mais sur d'autres sites, aucun souci.

Dernière modification par abelthorne (Le 24/02/2020, à 10:37)

Hors ligne