VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. I always do ffmpeg -i "link" -c copy "name".output

    That is only when I want the whole thing, but how do I do if I for example want a certain part of a video?
    Quote Quote  
  2. ffmpeg -i "link" -ss 00:00:20 -to 00:00:30 -c copy "name".output
    click click2
    If I/my posts ever helped you, and you want to give back, send me a private message!
    Quote Quote  
  3. Originally Posted by [ss]vegeta View Post
    ffmpeg -i "link" -ss 00:00:20 -to 00:00:30 -c copy "name".output
    I don't know, but it just ends after a few seconds without taking down anything at all. Am I typing it wrong in the time stamps?

    https://www.svtplay.se/video/jXAp2GX/carina-bergfeldt/claes-bang-och-mia-parnevik-hos-...217&id=jXAp2GX

    I want it from 36:48 to 53:50. Or is it telling me I have an old version of ffmpeg? I can download pretty much everything expect this?

    Code:
    C:\Windows\system32>ffmpeg -i "https://ed0.cdn.svt.se/d0/world/20240126/bfa32bb0-83d5-4175-87fb-27c394a0400e/dash-full.mpd" -ss 00:36:48 -to 00:53:50 -c copy "Johan Floderus".mkv
    ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
      built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
      configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
      libavutil      58.  2.100 / 58.  2.100
      libavcodec     60.  3.100 / 60.  3.100
      libavformat    60.  3.100 / 60.  3.100
      libavdevice    60.  1.100 / 60.  1.100
      libavfilter     9.  3.100 /  9.  3.100
      libswscale      7.  1.100 /  7.  1.100
      libswresample   4. 10.100 /  4. 10.100
      libpostproc    57.  1.100 / 57.  1.100
    Warning: program compiled against libxml 211 using older 210
    Input #0, dash, from 'https://ed0.cdn.svt.se/d0/world/20240126/bfa32bb0-83d5-4175-87fb-27c394a0400e/dash-full.mpd':
      Duration: 00:58:29.00, start: -0.043000, bitrate: 0 kb/s
      Program 0
      Stream #0:0: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709/unknown/bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1154 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 4494046
          id              : 0
      Stream #0:1: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709/unknown/bt709), 1280x720 [SAR 1:1 DAR 16:9], 647 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 2440115
          id              : 1
      Stream #0:2: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709/unknown/bt709), 960x540 [SAR 1:1 DAR 16:9], 472 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 1587157
          id              : 2
      Stream #0:3: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709/unknown/bt709), 640x360 [SAR 1:1 DAR 16:9], 306 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 859665
          id              : 3
      Stream #0:4: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709/unknown/bt709), 416x234 [SAR 1:1 DAR 16:9], 190 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 454859
          id              : 4
      Stream #0:5: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1408 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 5434728
          id              : 5
      Stream #0:6: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 1280x720 [SAR 1:1 DAR 16:9], 987 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 3725923
          id              : 6
      Stream #0:7: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 960x540 [SAR 1:1 DAR 16:9], 712 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 2371911
          id              : 7
      Stream #0:8: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 640x360 [SAR 1:1 DAR 16:9], 492 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 1498144
          id              : 8
      Stream #0:9: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 416x234 [SAR 1:1 DAR 16:9], 293 kb/s, 25 tbr, 12800 tbn (default)
        Metadata:
          variant_bitrate : 606425
          id              : 9
      Stream #0:10(sv): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
        Metadata:
          variant_bitrate : 196721
          id              : 10
      Stream #0:11(sv-x-tal): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
        Metadata:
          variant_bitrate : 197011
          id              : 11
      Stream #0:12(sv): Subtitle: webvtt
        Metadata:
          id              : 12
      Stream #0:13(sv): Subtitle: webvtt
        Metadata:
          id              : 13
    Output #0, matroska, to 'Johan Floderus.mkv':
      Metadata:
        encoder         : Lavf60.3.100
      Stream #0:0: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709/unknown/bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1154 kb/s, 25 tbr, 1k tbn (default)
        Metadata:
          variant_bitrate : 4494046
          id              : 0
      Stream #0:1(sv): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 192 kb/s (default)
        Metadata:
          variant_bitrate : 196721
          id              : 10
      Stream #0:2(sv): Subtitle: webvtt
        Metadata:
          id              : 12
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:10 -> #0:1 (copy)
      Stream #0:12 -> #0:2 (copy)
    Press [q] to stop, [?] for help
    [dash @ 0000021c88c73400] No longer receiving stream_index 12.77 bitrate=  -0.0kbits/s speed=N/A
    [dash @ 0000021c88c73400] No longer receiving stream_index 2
    [dash @ 0000021c88c73400] No longer receiving stream_index 3
    [dash @ 0000021c88c73400] No longer receiving stream_index 4
    [dash @ 0000021c88c73400] No longer receiving stream_index 5
    [dash @ 0000021c88c73400] No longer receiving stream_index 6
    [dash @ 0000021c88c73400] No longer receiving stream_index 7
    [dash @ 0000021c88c73400] No longer receiving stream_index 8
    [dash @ 0000021c88c73400] No longer receiving stream_index 9
    [dash @ 0000021c88c73400] No longer receiving stream_index 11
    [dash @ 0000021c88c73400] No longer receiving stream_index 13
    frame=    0 fps=0.0 q=-1.0 Lsize=       3kB time=-577014:32:22.77 bitrate=N/A speed=N/A
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: unknown
    
    C:\Windows\system32>
    Quote Quote  
  4. For me you have to download it all first, and then you can cut it.


    If you want streamcopy (no new encoding) then -ss searches for the keyframe before the specified time in seconds and -to until the specified time in seconds or -t for that many seconds from the keyframe.

    For this reason, streamcopy cannot be frame-accurate.

    If you want to be frame accurate then you have to recode, e.g.
    ffmpeg -i "input" -ss 00:00:20 -to 00:00:30 -c libx264 -crf 15 -c:a copy "output"
    See here: https://trac.ffmpeg.org/wiki/Seeking
    Quote Quote  
  5. Originally Posted by Bekkeh View Post
    I don't know, but it just ends after a few seconds without taking down anything at all. Am I typing it wrong in the time stamps?
    You can try this also
    Code:
    yt-dlp "https://www.svtplay.se/video/jXAp2GX/carina-bergfeldt/claes-bang-och-mia-parnevik-hos-carina-bergfeldt?position=3217&id=jXAp2GX" --download-sections *00:36:48-00:53:50
    Worked for me.
    click click2
    If I/my posts ever helped you, and you want to give back, send me a private message!
    Quote Quote  
  6. Originally Posted by ProWo View Post
    For me you have to download it all first, and then you can cut it.


    If you want streamcopy (no new encoding) then -ss searches for the keyframe before the specified time in seconds and -to until the specified time in seconds or -t for that many seconds from the keyframe.

    For this reason, streamcopy cannot be frame-accurate.

    If you want to be frame accurate then you have to recode, e.g.
    ffmpeg -i "input" -ss 00:00:20 -to 00:00:30 -c libx264 -crf 15 -c:a copy "output"
    See here: https://trac.ffmpeg.org/wiki/Seeking
    I read everything, but I'm supposed I should read this part only?

    https://trac.ffmpeg.org/wiki/Seeking#Cuttingsmallsections

    So "input" here is the link right? Why do have "libx264" and "-crf 15" in your code? What is "a" after the c and colon?
    Quote Quote  
  7. Originally Posted by [ss]vegeta View Post
    Originally Posted by Bekkeh View Post
    I don't know, but it just ends after a few seconds without taking down anything at all. Am I typing it wrong in the time stamps?
    You can try this also
    Code:
    yt-dlp "https://www.svtplay.se/video/jXAp2GX/carina-bergfeldt/claes-bang-och-mia-parnevik-hos-carina-bergfeldt?position=3217&id=jXAp2GX" --download-sections *00:36:48-00:53:50
    Worked for me.
    Yes, but the thing is I want to understand what I do so I don't need to rely on people here. I assume that yt-dlp works in ffmpeg ?
    Quote Quote  
  8. Originally Posted by Bekkeh View Post
    I assume that yt-dlp works in ffmpeg ?
    yt-dlp works WITH ffmpeg
    just have them in your PATH
    click click2
    If I/my posts ever helped you, and you want to give back, send me a private message!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!