Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change order of subtitles #13820

Closed
TammysHead opened this issue Aug 4, 2017 · 7 comments
Closed

Change order of subtitles #13820

TammysHead opened this issue Aug 4, 2017 · 7 comments
Labels

Comments

@TammysHead
Copy link

@TammysHead TammysHead commented Aug 4, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.07.30.1. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.07.30.1

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.07.30.1
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Hello,
im downloading videos from crunchyroll with the command "youtube-dl.exe --cookies cookies.txt --write-sub --embed-subs --recode-video mkv --sub-lang deDE,enUS,frFR,itIT -f best[height=720] [LINK]"
But, if it finishes, the English Subtitles are the first of all. How do i get the german one to be the first?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 4, 2017

What order are you talking about?

@TammysHead
Copy link
Author

@TammysHead TammysHead commented Aug 4, 2017

The subtitles are in this order: English, French, Italian, German. I want German to be the 1st subtitle. How do i do that?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 4, 2017

Again: what kind of order are you talking about?

@TammysHead
Copy link
Author

@TammysHead TammysHead commented Aug 4, 2017

The order of the subtitles: #1 is English, 2. is French, 3. is Italian, 4. is German
Mediainfo:

General
Unique ID : 189290567957245667324918830419124336518 (0x8E68098C9DE8FBCD83D15A62E72AB786)
Complete name : Nora, Princess, and Stray Cat Folge 4 – Ohne Titel-742347.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 57.5 MiB
Duration : 3 min 30 s
Overall bit rate mode : Variable
Overall bit rate : 2 292 kb/s
Writing application : Lavf57.68.100
Writing library : Lavf57.68.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 3 min 30 s
Bit rate : 2 135 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.034
Stream size : 53.6 MiB (93%)
Writing library : x264 core 148 r2762 90a61ec
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
DURATION : 00:03:30.113000000
HANDLER_NAME : VideoHandler

Audio
ID : 2
Format : Vorbis
Format settings, Floor : 1
Codec ID : A_VORBIS
Duration : 3 min 30 s
Bit rate mode : Variable
Bit rate : 112 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Compression mode : Lossy
Delay relative to video : -70 ms
Stream size : 2.81 MiB (5%)
Writing application : Lavc57.86.103
Writing library : libVorbis (⛄⛄⛄⛄) (20150105 (⛄⛄⛄⛄))
Default : Yes
Forced : No
DURATION : 00:03:30.136000000
HANDLER_NAME : SoundHandler
TEXT 1 TO 4
Text #1
ID : 3
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : English
Default : No
Forced : No
DURATION : 00:03:29.950000000

Text #2
ID : 4
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : French
Default : No
Forced : No
DURATION : 00:03:29.700000000

Text #3
ID : 5
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : Italian
Default : No
Forced : No
DURATION : 00:03:29.950000000

Text #4
ID : 6
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : German
Default : No
Forced : No
DURATION : 00:03:30.520000000

I want the German subtitles to be "Text #1" and not "Text #4"

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 4, 2017

ffmpeg does not think so:

PS C:\dev\youtube-dl\master> py -3.6 .\youtube_dl\__main__.py  --cookies cookies.txt --write-sub --embed-subs --recode-video mkv --sub-lang deDE,enUS,frFR,itIT http://www.crunchyroll.com/rezero-starting-life-in-another-world-/episode-5-the-morning-of-our-promise-is-still-distant-702409
...
PS C:\dev\youtube-dl\master> ffmpeg.exe -i '.\Re -ZERO -Starting Life in Another World- Episode 5 – The Morning of Our Promise Is Still Distant-702409.mkv'
ffmpeg version N-85653-gb4330a0 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 61.100 / 55. 61.100
  libavcodec     57. 93.100 / 57. 93.100
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 87.100 /  6. 87.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, matroska,webm, from '.\Re -ZERO -Starting Life in Another World- Episode 5 тАУ The Morning of Our Promise Is Still Distant-702409.mkv':
  Metadata:
    MINOR_VERSION   : 512
    COMPATIBLE_BRANDS: isomiso2avc1mp41
    MAJOR_BRAND     : isom
    ENCODER         : Lavf57.72.101
  Duration: 00:24:35.94, start: 0.000000, bitrate: 393 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 848x480 [SAR 160:159 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      HANDLER_NAME    : VideoHandler
      ENCODER         : Lavc57.93.100 libx264
      DURATION        : 00:24:35.893000000
    Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)
    Metadata:
      HANDLER_NAME    : SoundHandler
      ENCODER         : Lavc57.93.100 libvorbis
      DURATION        : 00:24:35.937000000
    Stream #0:2(deu): Subtitle: ass
    Metadata:
      DURATION        : 00:24:35.840000000
    Stream #0:3(eng): Subtitle: ass
    Metadata:
      DURATION        : 00:24:35.780000000
    Stream #0:4(ita): Subtitle: ass
    Metadata:
      DURATION        : 00:24:35.780000000
At least one output file must be specified
@TammysHead
Copy link
Author

@TammysHead TammysHead commented Aug 4, 2017

So, there is no way to get the German subtitle as Text #1 with --embed-subs?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 4, 2017

Ask Mediainfo obviously. I'm not aware how it sorts subtitles and don't want to know either.
As clearly seen from ffmpeg's output, the subtitles' order is: deu, eng, ita.

    Stream #0:2(deu): Subtitle: ass
    Metadata:
      DURATION        : 00:24:35.840000000
    Stream #0:3(eng): Subtitle: ass
    Metadata:
      DURATION        : 00:24:35.780000000
    Stream #0:4(ita): Subtitle: ass
    Metadata:
      DURATION        : 00:24:35.780000000
@ytdl-org ytdl-org locked and limited conversation to collaborators Aug 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.