Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: ffmpeg BD mkv to pal-dvd jumpy

  1. #1
    Join Date
    Mar 2007
    Beans
    89
    Distro
    Ubuntu

    ffmpeg BD mkv to pal-dvd jumpy

    I am trying to use the following ffmpeg command to convert MKV ripped BD content to DVD (pal). I am streaming from a d-link DNS-320 via twonky to a sony kdl-32w5500.

    The sony DLNA can only play MPG files. I have successfully done all our DVD discs and would like to get BD content on there in DVD quality (I know, what's the point in decreasing the quality - but whats the point in shipping BD films with DVD versions as well?). I cant keep them as mpg BD quality as our network can't handle the data (wireless, TV one side, NAS on the other side of the room, wife, wires etc)

    Original MKV: title00.mkv 299.7 MB
    Output MPG: 98.4 MB

    ffmpeg -i title00.mkv -target pal-dvd title00.mpg

    It appears to do everything correct apart from jumpy video, about every second.

    I tried other variations but non success, the output file is just as large as the original

    ffmpeg -i title00.mkv -vcodec mpeg2video -sameq -acodec copy -ab 448k -f vob -copyts -y title01.mpg

    ffmpeg -i title00.mkv -vcodec mpeg2video -sameq -acodec ac3 -ac 6 -ab 448k -f vob -copyts -y title02.mpg

    I also tried this on windows7 and got the same result, jumpy video, so its not the famous VLC media player/ffmpeg performance bug. The 1080p MKV file plays super fine in VLC.

  2. #2
    Join Date
    Sep 2006
    Beans
    3,702

    Re: ffmpeg BD mkv to pal-dvd jumpy

    Quote Originally Posted by essexboyracer View Post
    I cant keep them as mpg BD quality as our network can't handle the data (wireless, TV one side, NAS on the other side of the room, wife, wires etc)
    What is your wireless network speed? What version of Ubuntu are you using?

    Quote Originally Posted by essexboyracer View Post
    Code:
    ffmpeg -i title00.mkv -target pal-dvd title00.mpg
    Can you show the complete console output? I'm guessing ffmpeg is dropping frames to compensate for PAL but I am not sure.

    Quote Originally Posted by essexboyracer View Post
    It appears to do everything correct apart from jumpy video, about every second.
    Is it jumpy on only the device, or on your computer player too?

    Quote Originally Posted by essexboyracer View Post
    Code:
    ffmpeg -i title00.mkv -vcodec mpeg2video -sameq -acodec copy -ab 448k -f vob -copyts -y title01.mpg
    -sameq should not be used here: sameq does not mean "same quality". Also it has been removed upstream.

  3. #3
    Join Date
    Mar 2007
    Beans
    89
    Distro
    Ubuntu

    ffmpeg output - ctrl-c'd for brevity

    Code:
    oliver@oliver-G71V:~$ ffmpeg -i /media/dlink/Videos/test_t00.mkv -target pal-dvd /home/oliver/Videos/test/title00.mpg
    ffmpeg version 0.7.6-4:0.7.6-0ubuntu0.11.10.1, Copyright (c) 2000-2011 the Libav developers
      built on Jun 12 2012 16:28:10 with gcc 4.6.1
      configuration: --extra-version='4:0.7.6-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
      WARNING: library configuration mismatch
      avutil      configuration: --extra-version='4:0.7.6ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
      avcodec     configuration: --extra-version='4:0.7.6ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
      avformat    configuration: --extra-version='4:0.7.6-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
      avdevice    configuration: --extra-version='4:0.7.6-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
      avfilter    configuration: --extra-version='4:0.7.6-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
      swscale     configuration: --extra-version='4:0.7.6-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
      postproc    configuration: --extra-version='4:0.7.6-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
      libavutil    51.  7. 0 / 51.  7. 0
      libavcodec   53.  6. 0 / 53.  6. 0
      libavformat  53.  3. 0 / 53.  3. 0
      libavdevice  53.  0. 0 / 53.  0. 0
      libavfilter   2.  4. 0 /  2.  4. 0
      libswscale    2.  0. 0 /  2.  0. 0
      libpostproc  52.  0. 0 / 52.  0. 0
    [matroska,webm @ 0x8a63a40] Estimating duration from bitrate, this may be inaccurate
    Input #0, matroska,webm, from '/media/dlink/Videos/test_t00.mkv':
      Metadata:
        title           : Test
      Duration: 02:22:54.89, start: 0.000000, bitrate: 1536 kb/s
        Chapter #0.0: start 0.000000, end 482.315156
        Metadata:
          title           : Chapter 00
        Chapter #0.1: start 482.315156, end 709.166778
        Metadata:
          title           : Chapter 01
        Chapter #0.2: start 709.166778, end 918.751156
        Metadata:
          title           : Chapter 02
        Chapter #0.3: start 918.751156, end 1233.482244
        Metadata:
          title           : Chapter 03
        Chapter #0.4: start 1233.482244, end 1384.257867
        Metadata:
          title           : Chapter 04
        Chapter #0.5: start 1384.257867, end 1779.444333
        Metadata:
          title           : Chapter 05
        Chapter #0.6: start 1779.444333, end 2243.991733
        Metadata:
          title           : Chapter 06
        Chapter #0.7: start 2243.991733, end 2567.982067
        Metadata:
          title           : Chapter 07
        Chapter #0.8: start 2567.982067, end 3022.269244
        Metadata:
          title           : Chapter 08
        Chapter #0.9: start 3022.269244, end 3664.661000
        Metadata:
          title           : Chapter 09
        Chapter #0.10: start 3664.661000, end 4445.107333
        Metadata:
          title           : Chapter 10
        Chapter #0.11: start 4445.107333, end 5281.234289
        Metadata:
          title           : Chapter 11
        Chapter #0.12: start 5281.234289, end 5900.561333
        Metadata:
          title           : Chapter 12
        Chapter #0.13: start 5900.561333, end 6340.167156
        Metadata:
          title           : Chapter 13
        Chapter #0.14: start 6340.167156, end 6675.085067
        Metadata:
          title           : Chapter 14
        Chapter #0.15: start 6675.085067, end 7067.769022
        Metadata:
          title           : Chapter 15
        Chapter #0.16: start 7067.769022, end 7478.679533
        Metadata:
          title           : Chapter 16
        Chapter #0.17: start 7478.679533, end 7779.396622
        Metadata:
          title           : Chapter 17
        Chapter #0.18: start 7779.396622, end 7990.691022
        Metadata:
          title           : Chapter 18
        Chapter #0.19: start 7990.691022, end 8574.899000
        Metadata:
          title           : Chapter 19
        Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
        Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)
        Metadata:
          title           : 3/2+1
    Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
    File '/home/oliver/Videos/test/title00.mpg' already exists. Overwrite ? [y/N] y
    [buffer @ 0x8ae2980] w:1920 h:1080 pixfmt:yuv420p
    [scale @ 0x8c259e0] w:1920 h:1080 fmt:yuv420p -> w:720 h:576 fmt:yuv420p flags:0x4
    Output #0, dvd, to '/home/oliver/Videos/test/title00.mpg':
      Metadata:
        title           : Test
        encoder         : Lavf53.3.0
        Chapter #0.0: start 0.000000, end 482.315156
        Metadata:
          title           : Chapter 00
        Chapter #0.1: start 482.315156, end 709.166778
        Metadata:
          title           : Chapter 01
        Chapter #0.2: start 709.166778, end 918.751156
        Metadata:
          title           : Chapter 02
        Chapter #0.3: start 918.751156, end 1233.482244
        Metadata:
          title           : Chapter 03
        Chapter #0.4: start 1233.482244, end 1384.257867
        Metadata:
          title           : Chapter 04
        Chapter #0.5: start 1384.257867, end 1779.444333
        Metadata:
          title           : Chapter 05
        Chapter #0.6: start 1779.444333, end 2243.991733
        Metadata:
          title           : Chapter 06
        Chapter #0.7: start 2243.991733, end 2567.982067
        Metadata:
          title           : Chapter 07
        Chapter #0.8: start 2567.982067, end 3022.269244
        Metadata:
          title           : Chapter 08
        Chapter #0.9: start 3022.269244, end 3664.661000
        Metadata:
          title           : Chapter 09
        Chapter #0.10: start 3664.661000, end 4445.107333
        Metadata:
          title           : Chapter 10
        Chapter #0.11: start 4445.107333, end 5281.234289
        Metadata:
          title           : Chapter 11
        Chapter #0.12: start 5281.234289, end 5900.561333
        Metadata:
          title           : Chapter 12
        Chapter #0.13: start 5900.561333, end 6340.167156
        Metadata:
          title           : Chapter 13
        Chapter #0.14: start 6340.167156, end 6675.085067
        Metadata:
          title           : Chapter 14
        Chapter #0.15: start 6675.085067, end 7067.769022
        Metadata:
          title           : Chapter 15
        Chapter #0.16: start 7067.769022, end 7478.679533
        Metadata:
          title           : Chapter 16
        Chapter #0.17: start 7478.679533, end 7779.396622
        Metadata:
          title           : Chapter 17
        Chapter #0.18: start 7779.396622, end 7990.691022
        Metadata:
          title           : Chapter 18
        Chapter #0.19: start 7990.691022, end 8574.899000
        Metadata:
          title           : Chapter 19
        Stream #0.0(eng): Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-31, 6000 kb/s, 90k tbn, 25 tbc
        Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, flt, 448 kb/s (default)
        Metadata:
          title           : 3/2+1
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Press ctrl-c to stop encoding
    Input stream #0.1 frame changed from rate:48000 fmt:s16 ch:6 to rate:48000 fmt:flt ch:6
    frame=   50 fps= 50 q=2.0 size=     114kB time=1.96 bitrate= 476.5kbits/s dup=1 
    frame=   53 fps= 21 q=1.6 size=     136kB time=2.08 bitrate= 535.6kbits/s dup=1 
    frame=   64 fps= 21 q=2.0 size=     624kB time=2.52 bitrate=2028.5kbits/s dup=2 
    frame=   72 fps= 20 q=2.0 size=    1056kB time=2.84 bitrate=3046.0kbits/s dup=2 
    frame=   73 fps= 16 q=6.5 size=    1112kB time=2.88 bitrate=3163.0kbits/s dup=2 
    frame=   82 fps= 16 q=8.6 size=    1522kB time=3.24 bitrate=3848.2kbits/s dup=2 
    frame=   92 fps= 16 q=7.2 size=    1982kB time=3.64 bitrate=4460.6kbits/s dup=3 
    frame=   93 fps= 14 q=5.1 size=    2030kB time=3.68 bitrate=4519.0kbits/s dup=3 
    frame=  100 fps= 14 q=3.0 size=    2354kB time=3.96 bitrate=4869.7kbits/s dup=3 
    frame=  107 fps= 14 q=6.5 size=    2700kB time=4.24 bitrate=5216.6kbits/s dup=3 
    frame=  112 fps= 13 q=5.4 size=    2930kB time=4.44 bitrate=5406.0kbits/s dup=4 
    frame=  120 fps= 13 q=11.5 size=    3314kB time=4.76 bitrate=5703.4kbits/s dup=4
    frame=  127 fps= 13 q=5.5 size=    3632kB time=5.04 bitrate=5903.4kbits/s dup=4 
    frame=  129 fps= 12 q=8.3 size=    3732kB time=5.12 bitrate=5971.2kbits/s dup=4 
    frame=  138 fps= 12 q=3.8 size=    4134kB time=5.48 bitrate=6179.9kbits/s dup=5 
    frame=  145 fps= 12 q=4.0 size=    4472kB time=5.76 bitrate=6360.2kbits/s dup=5 
    frame=  145 fps= 11 q=4.0 size=    4472kB time=5.76 bitrate=6360.2kbits/s dup=5 
    frame=  152 fps= 11 q=7.0 size=    4812kB time=6.04 bitrate=6526.5kbits/s dup=5 
    frame=  160 fps= 11 q=7.2 size=    5152kB time=6.36 bitrate=6636.0kbits/s dup=6 
    frame=  160 fps= 11 q=7.2 size=    5152kB time=6.36 bitrate=6636.0kbits/s dup=6 
    frame=  168 fps= 11 q=3.6 size=    5502kB time=6.68 bitrate=6747.4kbits/s dup=
    frame=  174 fps= 11 q=2.7 Lsize=    5694kB time=6.91 bitrate=6748.4kbits/s dup=8 drop=0    
    video:5213kB audio:378kB global headers:0kB muxing overhead 1.847904%
    Received signal 2: terminating.
    Last edited by essexboyracer; October 17th, 2012 at 06:08 PM.

  4. #4
    Join Date
    Mar 2007
    Beans
    89
    Distro
    Ubuntu

    Re: ffmpeg BD mkv to pal-dvd jumpy

    using xubuntu 11.10 oneiric 3.0.0.26-generic

    the conversion is jumpy on the computer, so I think that rules out network connectivity (for the minute, perhaps a side issue later on).

    Yes, I read that sameq isn't literal, the command I found was a copy and paste job.
    Last edited by essexboyracer; October 15th, 2012 at 10:02 PM.

  5. #5
    Join Date
    Sep 2006
    Beans
    3,702

    Re: ffmpeg output - ctrl-c'd for brevity

    Quote Originally Posted by essexboyracer View Post
    Code:
    Input:
        Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
     Output:
        Stream #0.0(eng): Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-31, 6000 kb/s, 90k tbn, 25 tbc
    Try to put your console outputs into the [code][/code] tags since it will make it easier to read.

    The frame rate differs between input (23.98 NTSC Film) and output (25 PAL). FFmpeg will simply drop or duplicate frames, as in your case, if the input and output frame rates vary which probably doesn't always look good. Fortunately there is also the film- prefix which will provide the proper frame rate of 23.98, or more specifically 24000/1001.

    Try this:
    Code:
    ffmpeg -i /media/dlink/Videos/test_t00.mkv -target film-dvd /home/oliver/Videos/test/title00.mpg

  6. #6
    Join Date
    Mar 2007
    Beans
    89
    Distro
    Ubuntu

    Re: ffmpeg BD mkv to pal-dvd jumpy

    Wow, thank you. An initial test appeared to have solved the skipping. I never knew about the film-dvd preset, probably a case of RTFM on my behalf. Have cleaned up my post earlier with the code tags.

    Does film-dvd provide any better quality than pal-dvd?

  7. #7
    Join Date
    Sep 2006
    Beans
    3,702

    Re: ffmpeg BD mkv to pal-dvd jumpy

    Quote Originally Posted by essexboyracer View Post
    Wow, thank you. An initial test appeared to have solved the skipping. I never knew about the film-dvd preset, probably a case of RTFM on my behalf.
    Glad it worked out for you. The docs aren't always easy to follow.

    Quote Originally Posted by essexboyracer View Post
    Does film-dvd provide any better quality than pal-dvd?
    No. The only difference between film-dvd and pal-dvd is the frame rate and the "group of picture size" (-g option), but the quality should be the same. The trick is matching the proper frame rates for the input and output when using -target.

  8. #8
    Join Date
    Mar 2007
    Beans
    89
    Distro
    Ubuntu

    Re: ffmpeg BD mkv to pal-dvd jumpy

    The trick is matching the proper frame rates for the input and output when using -target
    That explains the jumpy video. thank you again for your help. marked as solved.

  9. #9
    Join Date
    Mar 2007
    Beans
    89
    Distro
    Ubuntu

    Re: ffmpeg BD mkv to pal-dvd jumpy

    Interestingly, the Sony TV DLNA cant seem to see the film-dvd encoded file. I am trying to re-encode it using the film-dvd file to pal-dvd. This TV is so picky about its files...

  10. #10
    Join Date
    Mar 2007
    Beans
    89
    Distro
    Ubuntu

    Re: ffmpeg BD mkv to pal-dvd jumpy

    SO the conversion from film-dvd to pal-dvd didnt work, were back to skippy jumpy video, but the TV can now pick up on the pal-dvd file and play it, where as it couldn't see the film-dvd file.

    I can see the film-dvd file from twonkies browser interface and obviously play it via the laptop on VLC.

    Any other ideas? Like you say it does appear to be connected with framerates, but I can't understand how a DVD converts fine?

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •