VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Page 3 of 7
FirstFirst 1 2 3 4 5 ... LastLast
Results 61 to 90 of 181
Thread
  1. I am trying to use qaac for audio conversion and using ffmpeg to mux it back,

    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -vf "scale=1280:trunc(ow/a/2)*2:flags=lanczos" -c:v libx264 -profile:v high -preset slow -tune film -crf 20 -an "C:\newconverts\%%~na.m4v"
    
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -f wav -acodec pcm_f32le - | qaac --cvbr 256 --ignorelength --rate 48000 --native-resampler=bats,127 --threading -o "C:\newconverts\%%~na.m4a"
    
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.m4v" -i "%%~na.m4a" -c:v copy -c:a copy "C:\newconverts\%%~na.mp4"
    pause
    
    DEL "C:\newconverts\*.m4v"
    DEL "C:\newconverts\*.m4a"
    But I get an error with the piping line.

    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -f wav -acodec pcm_f32le - | qaac --cvbr 256 --ignorelength --rate 48000 --native-resampler=bats,127 --threading -o "C:\newconverts\%%~na.m4a"
    I have attached the screenshot.

    Click image for larger version

Name:	clips.jpg
Views:	1114
Size:	97.0 KB
ID:	33668
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Have you tried it without the batch? Same error?

    But I have never tried ffmpeg with piping....so I have no idea....You could also try ask in https://ffmpeg.zeranoe.com/forum/index.php
    Quote Quote  
  3. Originally Posted by Baldrick View Post
    Have you tried it without the batch? Same error?

    But I have never tried ffmpeg with piping....so I have no idea....You could also try ask in https://ffmpeg.zeranoe.com/forum/index.php
    Tried the second piece of code, for audio alone. It still shows the same error. Thanks
    Quote Quote  
  4. Originally Posted by diimaan View Post
    Originally Posted by Baldrick View Post
    Have you tried it without the batch? Same error?

    But I have never tried ffmpeg with piping....so I have no idea....You could also try ask in https://ffmpeg.zeranoe.com/forum/index.php
    Tried the second piece of code, for audio alone. It still shows the same error. Thanks
    What about this
    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -acodec pcm_s32le -f wav - | qaac --threading --cvbr 256 --ignorelength --rate 48000 --native-resampler=bats,127 - -o "C:\newconverts\%%~na.m4a"
    Quote Quote  
  5. Originally Posted by anana View Post
    What about this
    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -acodec pcm_s32le -f wav - | qaac --threading --cvbr 256 --ignorelength --rate 48000 --native-resampler=bats,127 - -o "C:\newconverts\%%~na.m4a"
    You are awesome...
    It works as a single code, checking now with a batch!
    Quote Quote  
  6. Originally Posted by diimaan View Post
    You are awesome...
    It works as a single code, checking now with a batch!
    Good luck
    Quote Quote  
  7. Now I am getting an error "Invalid argument" for m4v while muxing

    Code:
    ffmpeg -i "*.m4v" -i "*.m4a" -c:v copy -c:a copy "C:\newconverts\%%~na.mp4"
    Quote Quote  
  8. Originally Posted by diimaan View Post
    Now I am getting an error "Invalid argument" for m4v while muxing

    Code:
    ffmpeg -i "*.m4v" -i "*.m4a" -c:v copy -c:a copy "C:\newconverts\%%~na.mp4"
    ffmpeg cannot use wild cards like "*"

    Before in the batch it was Windows dos that used the wildcard "*"

    You need to format it in the same manner with a FOR statement such as the previous batch. Usually you would use a named TEMP file in a TEMP directory for the intermediate files, then DEL the temp files in the batch command
    Quote Quote  
  9. ffmpeg cannot use wild cards like "*"

    Before in the batch it was Windows dos that used the wildcard "*"

    You need to format it in the same manner with a FOR statement such as the previous batch. Usually you would use a named TEMP file in a TEMP directory for the intermediate files, then DEL the temp files in the batch command
    This is my complete code

    Code:
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.m4v" -i "%%~na.m4a" -c:v copy -c:a copy "C:\newconverts\%%~na.mp4"
    pause
    Quote Quote  
  10. Originally Posted by diimaan View Post
    This is my complete code

    Code:
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.m4v" -i "%%~na.m4a" -c:v copy -c:a copy "C:\newconverts\%%~na.mp4"
    pause
    Code:
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.m4v" -i "%%~na.m4a" -vcodec copy -acodec copy -map 0:0 -map 1:0 "C:\newconverts\%%~na.mp4"
    pause
    Quote Quote  
  11. Originally Posted by anana View Post
    Code:
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.m4v" -i "%%~na.m4a" -vcodec copy -acodec copy -map 0:0 -map 1:0 "C:\newconverts\%%~na.mp4"
    pause
    Code:
    .m4v: No such file or directory
    Quote Quote  
  12. I even tried with MP4Box as a muxer in the batch! It also throws the error with video input. I tried changing the m4v to mp4 and mkv!
    Still no dice...
    Quote Quote  
  13. Originally Posted by diimaan View Post
    I am trying to use qaac for audio conversion and using ffmpeg to mux it back,

    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -vf "scale=1280:trunc(ow/a/2)*2:flags=lanczos" -c:v libx264 -profile:v high -preset slow -tune film -crf 20 -an "C:\newconverts\%%~na.m4v"
    
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -f wav -acodec pcm_f32le - | qaac --cvbr 256 --ignorelength --rate 48000 --native-resampler=bats,127 --threading -o "C:\newconverts\%%~na.m4a"
    
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.m4v" -i "%%~na.m4a" -c:v copy -c:a copy "C:\newconverts\%%~na.mp4"
    pause
    
    DEL "C:\newconverts\*.m4v"
    DEL "C:\newconverts\*.m4a"
    Maybe, you should use mine
    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -vf "scale=1280:trunc(ow/a/2)*2:flags=lanczos" -c:v libx264 -profile:v high -preset slow -tune film -crf 20 -an "C:\newconverts\%%~na.264"
    
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -acodec pcm_s32le -f wav - | qaac --threading --cvbr 256 --ignorelength --rate 48000 --native-resampler=bats,127 --adts - -o "C:\newconverts\%%~na.aac"
    
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.264" -i "%%~na.aac" -absf aac_adtstoasc -vcodec copy -acodec copy -map 0:0 -map 1:0 "C:\newconverts\%%~na.mp4"
    pause
    
    DEL "C:\newconverts\*.264"
    DEL "C:\newconverts\*.aac"
    Quote Quote  
  14. Originally Posted by anana View Post

    Maybe, you should use mine
    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -vf "scale=1280:trunc(ow/a/2)*2:flags=lanczos" -c:v libx264 -profile:v high -preset slow -tune film -crf 20 -an "C:\newconverts\%%~na.264"
    
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -acodec pcm_s32le -f wav - | qaac --threading --cvbr 256 --ignorelength --rate 48000 --native-resampler=bats,127 --adts - -o "C:\newconverts\%%~na.aac"
    
    for %%a in ("C:\newconverts\*.*") do ffmpeg -i "%%~na.264" -i "%%~na.aac" -absf aac_adtstoasc -vcodec copy -acodec copy -map 0:0 -map 1:0 "C:\newconverts\%%~na.mp4"
    pause
    
    DEL "C:\newconverts\*.264"
    DEL "C:\newconverts\*.aac"
    Now it shows
    Code:
    .264: No such file or directory
    Quote Quote  
  15. A general question to @Baldrick! Is it possible to do a two pass encode with ffmpeg batch?
    Quote Quote  
  16. Originally Posted by Baldrick View Post
    ConverterCrazy: And did you get any working method? Any script you can share?
    @Baldrick

    My apologies, can't say how embarrassed I am for having not replied to your very old reply.

    And, I am sorry.

    I used this command in a batch file for bulk conversion:

    for %%F in (*.MP4) do "C:\7z\ffmpeg-20130813-git-bbbd959-win32-static\bin\ffmpeg.exe" -i "%%F" -vcodec copy -acodec copy "%%~dF%%~pF%%~nF.mkv"
    pause



    while substituting (*.mp4) with (*.avi) and (*.flv) in each successive line of the batch file.

    The pause command helped me to know that "all went fine".

    Thanks.
    Quote Quote  
  17. Well, I did not get the qaac and muxing thingy work. But I came at a workaround.

    I have downloaded ffmpeg from http://oss.netfarm.it/mplayer-win32.php and downloaded the libfdk_aac.dll which was linked there. (Both 64 bit versions)

    Now I am able to get a good quality aac file with ffmpeg and do not have to worry about the pipiing et al...
    (P.S. If anyone able to get them working please share though )

    My batch for running crf and 2-pass encodes goes here... I have added a small piece of code in resizing, which I came across in www. It will resize only if the files are having width lesser than "1280".

    crf
    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -vf "scale=min(1280\,iw):trunc(ow/a/2)*2:flags=spline" -c:v libx264 -profile:v high444 -preset slow -tune film -crf 20 -ac 2 -ar 48000 -c:a libfdk_aac -vbr 5 -afterburner 1 "C:\newconverts\%%~na.mp4"
    
    pause
    2-pass
    Code:
    for %%a in ("C:\converts\*.*") do ffmpeg -y -i "%%a" -vf "scale=min(1280\,iw):trunc(ow/a/2)*2:flags=spline" -b:v 3000k -pass 1 -c:v libx264 -profile:v high444 -preset slow -tune film -ac 2 -ar 48000 -c:a libfdk_aac -b:a 224k -afterburner 1 -f mp4 NUL
    
    for %%a in ("C:\converts\*.*") do ffmpeg -i "%%a" -vf "scale=min(1280\,iw):trunc(ow/a/2)*2:flags=spline" -b:v 3000k -pass 2 -c:v libx264 -profile:v high444 -preset slow -tune film -ac 2 -ar 48000 -c:a libfdk_aac -b:a 224k -afterburner 1 "C:\newconverts\%%~na.mp4"
    
    pause
    
    DEL "*.temp"
    DEL "*.mbtree"
    DEL "*.log"
    Thanks everyone for trying to help me with my broken knowledge of encoding... Especially @anana for being so patient with me
    Quote Quote  
  18. Originally Posted by Baldrick View Post
    With ffmpeg can you convert and multiplex almost every video file. And as it's a command line converter can you batch convert all your files at once with a basic windows/dos script. Like convert all your video files to mp4 with custom ffmpeg commands. Convert all video files audio to wav.


    Tools:
    ffmpeg



    Guide:
    Download ffmpeg from http://ffmpeg.zeranoe.com/builds/ and choose latest 32bit Static version.



    Extract the ffmpeg.exe from the 7z file with 7zip and put it in same folder as your video files.
    Create a folder named newfiles in your video folder.
    Image
    [Attachment 18041 - Click to enlarge]




    Start notepad and type the following to convert all your video files to mp4 with h264 video and aac audio. See more examples at the bottom of this guide.
    Code:
    for %%a in ("*.*") do ffmpeg -i "%%a" -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k "newfiles\%%~na.mp4"
    pause
    Now save it, File->Save as, change to All files under Save as type and save it as batch.bat.
    Image
    [Attachment 18071 - Click to enlarge]




    Just double click on the batch.bat to start converting. You will see any errors in the command line box.
    Image
    [Attachment 18040 - Click to enlarge]




    When it's done just press enter in the command line window.
    Image
    [Attachment 18070 - Click to enlarge]




    Done!



    Batch ffmpeg examples:

    Convert all *.avi files to mp4 with h264 and aac audio
    Code:
    for %%a in ("*.avi") do ffmpeg -i "%%a" -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k "newfiles\%%~na.mp4"
    pause

    Convert *.mkv files to mp4 and just copy the video and audio streams
    Code:
    for %%a in ("*.mkv") do ffmpeg -i "%%a" -vcodec copy -acodec copy "newfiles\%%~na.mp4"
    pause

    Convert *.* files to wav audio
    Code:
    for %%a in ("*.*") do ffmpeg -i "%%a" "newfiles\%%~na.wav"
    pause

    Multiplex *.avi and *.wav files with same name to avi
    Code:
    for %%a in ("*.avi") do ffmpeg -i "%%~na.wav" -i "%%~na.avi" -acodec copy -vcodec copy "newfiles\%%~na.avi"
    pause


    Other tips:
    Put ffmpeg.exe in for example C:\ffmpeg and make the newfiles folder under C:\newfiles and you never have to move around the ffmpeg.exe and make new newfiles folder all the time. You just make the batch.bat file in the video folder.
    Your batch.bat script should look this then:
    Code:
    for %%a in ("*.*") do "C:\ffmpeg\ffmpeg" -i "%%a" -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k "C:\newfiles\%%~na.mp4"
    pause


    More ffmpeg examples:

    http://ffmpeg.org/trac/ffmpeg/wiki
    http://cfc.kizzx2.com/index.php/muxing-audio-and-video-with-ffmpeg/



    ffmpeg commands explained:

    http://ffmpeg.org/ffmpeg.html
    Anyone know how to strip or remove the chapters on the new create files. Like the MKV i have contain chapters, i don't want those on the new created mp4.

    Thank you a thousand times for the batch codes
    Last edited by RealPetChicken; 22nd Sep 2015 at 18:30.
    Quote Quote  
  19. I have a m4v with multiple audio tracks and multiple subtitle tracks. The following only copies the default audio and no subtitles. How do I change it to add more?

    Code:
    for %%a in ("*.14v") do ffmpeg -i "%%a" -vcodec copy -acodec copy "newfiles\%%~na.mkv"
    Quote Quote  
  20. After some digging around I changed it to

    Code:
    ffmpeg -i "file.m4v" -map 0 -c copy file1.mkv
    which returns an error "Could not write header for output file #0 (incorrect codec parameters ?): Error number -40 occurred
    Conversion failed!"
    Quote Quote  
  21. Member
    Join Date
    May 2015
    Location
    Dublin, Ireland
    Search PM
    Mkv doesn't support data tracks. Add -dn to disable them.

    Can you post the full uncut console output just to be sure? Ffmpeg is usually more specific than "error 40"

    P.s your map 0 solution generally works as long as the chosen container supports all the streams you're adding.
    Quote Quote  
  22. Code:
    ffmpeg -i "1.m4v" -map 0 -c copy -dn "output\1.mkv"
    ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
      built on May 22 2014 19:56:44 with gcc 4.8.2 (GCC)
      configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
      libavutil      52. 66.100 / 52. 66.100
      libavcodec     55. 52.102 / 55. 52.102
      libavformat    55. 33.100 / 55. 33.100
      libavdevice    55. 10.100 / 55. 10.100
      libavfilter     4.  2.100 /  4.  2.100
      libswscale      2.  5.102 /  2.  5.102
      libswresample   0. 18.100 /  0. 18.100
      libpostproc    52.  3.100 / 52.  3.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0068e900] stream 0, timescale not set
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0068e900] Stream #4: not enough frames to estimate rate; consider increasing probesize
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.m4v':
      Metadata:
        major_brand     : M4V
        minor_version   : 0
        compatible_brands: M4V M4A mp42isom
        hd_video        : 1
        media_type      : 10
      Duration: 00:55:01.59, start: 0.000000, bitrate: 11337 kb/s
        Chapter #0.0: start 0.000000, end 6.006000
        Metadata:
          title           : 1
        Chapter #0.1: start 6.006000, end 306.555000
        Metadata:
          title           : 2
        Chapter #0.2: start 306.555000, end 748.245000
        Metadata:
          title           : 3
        Chapter #0.3: start 748.245000, end 1131.547000
        Metadata:
          title           : 4
        Chapter #0.4: start 1131.547000, end 1605.854000
        Metadata:
          title           : 5
        Chapter #0.5: start 1605.854000, end 2124.371000
        Metadata:
          title           : 6
        Chapter #0.6: start 2124.371000, end 2598.304000
        Metadata:
          title           : 7
        Chapter #0.7: start 2598.304000, end 3191.730000
        Metadata:
          title           : 8
        Chapter #0.8: start 3191.730000, end 3271.268000
        Metadata:
          title           : 9
        Chapter #0.9: start 3271.268000, end 3271.476000
        Metadata:
          title           : 10
        Stream #0:0(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s (default)
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 3994 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 180k tbc (default)
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:2(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:3(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 163 kb/s
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:4: Video: mjpeg, yuvj444p(pc), 2400x2400 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
        Stream #0:5(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
        Metadata:
          creation_time   : 2015-04-27 09:42:16
        Stream #0:6(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
        Metadata:
          creation_time   : 2015-04-27 13:15:11
        Stream #0:7(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 163 kb/s
        Metadata:
          creation_time   : 2015-04-27 13:15:54
        Stream #0:8(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:26:53
        Stream #0:9(rus): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:27:38
        Stream #0:10(ukr): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:28:28
        Stream #0:11(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:31:39
        Stream #0:12(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:42:02
        Stream #0:13(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:42:40
        Stream #0:14(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:43:21
        Stream #0:15(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:16(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:17(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:18(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:19(ukr): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:20(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:21(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s (default)
        Metadata:
          creation_time   : 2015-05-02 15:56:55
        Stream #0:22(eng): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 16:01:22
        Stream #0:23(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 16:03:11
        Stream #0:24(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 16:03:38
        Stream #0:25(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 17:40:17
        Stream #0:26(eng): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 17:40:17
        Stream #0:27(eng): Subtitle: mov_text (text / 0x74786574)
        Metadata:
          creation_time   : 2015-05-02 17:40:17
        Stream #0:28(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj420p(pc), 640x360 [SAR 1:1 DAR 16:9], 0 kb/s, 0k fps, 23.98 tbr, 1k tbn, 1k tbc
        Metadata:
          creation_time   : 2015-05-02 17:40:25
    [matroska @ 01fcb6a0] Subtitle codec 94213 is not supported.
    Output #0, matroska, to 'output\1.mkv':
      Metadata:
        major_brand     : M4V
        minor_version   : 0
        compatible_brands: M4V M4A mp42isom
        media_type      : 10
        hd_video        : 1
        encoder         : Lavf55.33.100
        Chapter #0.0: start 0.000000, end 6.006000
        Metadata:
          title           : 1
        Chapter #0.1: start 6.006000, end 306.555000
        Metadata:
          title           : 2
        Chapter #0.2: start 306.555000, end 748.245000
        Metadata:
          title           : 3
        Chapter #0.3: start 748.245000, end 1131.547000
        Metadata:
          title           : 4
        Chapter #0.4: start 1131.547000, end 1605.854000
        Metadata:
          title           : 5
        Chapter #0.5: start 1605.854000, end 2124.371000
        Metadata:
          title           : 6
        Chapter #0.6: start 2124.371000, end 2598.304000
        Metadata:
          title           : 7
        Chapter #0.7: start 2598.304000, end 3191.730000
        Metadata:
          title           : 8
        Chapter #0.8: start 3191.730000, end 3271.268000
        Metadata:
          title           : 9
        Chapter #0.9: start 3271.268000, end 3271.476000
        Metadata:
          title           : 10
        Stream #0:0(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s (default)
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:1(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 3994 kb/s, 23.98 fps, 1k tbn, 90k tbc (default)
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:2(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:3(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 163 kb/s
        Metadata:
          creation_time   : 2015-04-27 09:38:46
        Stream #0:4: Video: mjpeg (MJPG / 0x47504A4D), yuvj444p, 2400x2400 [SAR 1:1 DAR 1:1], q=2-31, 1k tbn, 90k tbc
        Stream #0:5(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s
        Metadata:
          creation_time   : 2015-04-27 09:42:16
        Stream #0:6(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s
        Metadata:
          creation_time   : 2015-04-27 13:15:11
        Stream #0:7(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 163 kb/s
        Metadata:
          creation_time   : 2015-04-27 13:15:54
        Stream #0:8(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:26:53
        Stream #0:9(rus): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:27:38
        Stream #0:10(ukr): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:28:28
        Stream #0:11(eng): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, 164 kb/s
        Metadata:
          creation_time   : 2015-05-02 11:31:39
        Stream #0:12(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:42:02
        Stream #0:13(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:42:40
        Stream #0:14(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:43:21
        Stream #0:15(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:16(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:17(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:18(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:19(ukr): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:20(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), 640 kb/s
        Metadata:
          creation_time   : 2015-05-02 15:45:25
        Stream #0:21(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s (default)
        Metadata:
          creation_time   : 2015-05-02 15:56:55
        Stream #0:22(eng): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 16:01:22
        Stream #0:23(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 16:03:11
        Stream #0:24(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 16:03:38
        Stream #0:25(rus): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 17:40:17
        Stream #0:26(eng): Subtitle: mov_text (tx3g / 0x67337874), 1280x108, 0 kb/s
        Metadata:
          creation_time   : 2015-05-02 17:40:17
        Stream #0:27(eng): Subtitle: mov_text (text / 0x74786574)
        Metadata:
          creation_time   : 2015-05-02 17:40:17
        Stream #0:28(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 0 kb/s, 0k fps, 90k tbn, 1k tbc
        Metadata:
          creation_time   : 2015-05-02 17:40:25
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (copy)
      Stream #0:2 -> #0:2 (copy)
      Stream #0:3 -> #0:3 (copy)
      Stream #0:4 -> #0:4 (copy)
      Stream #0:5 -> #0:5 (copy)
      Stream #0:6 -> #0:6 (copy)
      Stream #0:7 -> #0:7 (copy)
      Stream #0:8 -> #0:8 (copy)
      Stream #0:9 -> #0:9 (copy)
      Stream #0:10 -> #0:10 (copy)
      Stream #0:11 -> #0:11 (copy)
      Stream #0:12 -> #0:12 (copy)
      Stream #0:13 -> #0:13 (copy)
      Stream #0:14 -> #0:14 (copy)
      Stream #0:15 -> #0:15 (copy)
      Stream #0:16 -> #0:16 (copy)
      Stream #0:17 -> #0:17 (copy)
      Stream #0:18 -> #0:18 (copy)
      Stream #0:19 -> #0:19 (copy)
      Stream #0:20 -> #0:20 (copy)
      Stream #0:21 -> #0:21 (copy)
      Stream #0:22 -> #0:22 (copy)
      Stream #0:23 -> #0:23 (copy)
      Stream #0:24 -> #0:24 (copy)
      Stream #0:25 -> #0:25 (copy)
      Stream #0:26 -> #0:26 (copy)
      Stream #0:27 -> #0:27 (copy)
      Stream #0:28 -> #0:28 (copy)
    Could not write header for output file #0 (incorrect codec parameters ?): Error number -40 occurred
    Conversion failed!
    I guess the problem is with the subtitles since -sn seems to work but without copying the subtitles. How can I get around that.
    Quote Quote  
  23. Member
    Join Date
    May 2015
    Location
    Dublin, Ireland
    Search PM
    It throws up this error [matroska @ 01fcb6a0] Subtitle codec 94213 is not supported.

    It looks like your last subtitle stream is a different format to the others?
    On a side note, did you intend to have three video streams with different codecs and pixel formats?
    Quote Quote  
  24. Not really. I want to make them mkvs first so that I can use mkvmerge to choose the correct audio, video and subtitle streams.
    Quote Quote  
  25. Member
    Join Date
    May 2015
    Location
    Dublin, Ireland
    Search PM
    Quote Quote  
  26. Ok so I will use -sn to copy the files using mapping without subtitles, then extract the subtitles to srt and finally mux together again. Thanks.
    Quote Quote  
  27. Hello,

    I have used helpful suggestions from this thread. But, I am facing a new problem.

    I have a collection of VCDs -- 47 in all -- which have been played again and again over a period of past 4 years. Now all VCDs have scratches and five of them play with some 'kitchir-kitchir' audio when video shows distortion (blocks) scattered over the entire display.

    I don't mind any of it as the rest of content is played without any error.
    But, I certainly don't want to sacrifice my collection.

    Thanks to @baldrick, I used his suggested tool VCDgear and recorded/ripped VCDs in 47 subfolders. Everything went fine except some error correction in 5 disks.

    My knowledge of FFMpeg:
    In the past, I used this command in a batch file to convert multiple MP4 files to MKV in the folder:

    for %%F in (*.MP4) do "C:\7z\ffmpeg-20130813-git-bbbd959-win32-static\bin\ffmpeg.exe" -i "%%F" -vcodec copy -acodec copy "%%~dF%%~pF%%~nF.mkv"
    pause

    As I understand it, the above command simply changes the container and does not recode.
    This is the end of my knowledge of ffmpeg.

    Here is what I want to do - without much loss to audio/video quality (I know recoding means some loss):

    1. Convert MPG to some format which can be played on any CD/VCD player (failing which on any computer at least).
    2. Convert MP2 Stereo audio to MP3 at 192KB and lower volume by -9dB -- with slight bass-cut, if possible.

    This is what I have:

    1. Latest FFMpeg in C:\ffmpeg-20151108-git-a5202bc-win32-static folder
    2. MPG files = 94 -- 2 in each of the 47 subfolders.
    [ Main folder is D:\MB and subfolders are D:\MB\Disk01 (01) D:\MB\Disk01 (47) ]

    I can do all that to a few files from what I have learned in this Forum; but, doing that to so many files will wear me down and will take me one year or so.

    Hope I get some suggestion as has been the case in the past.

    Please suggest anything about conversion too if what I want is not the right approach.

    Thanks.
    Quote Quote  
  28. Try adding /r after "for" and placing the bat file in the root folder (D:\MB)
    Quote Quote  
  29. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Originally Posted by ConverterCrazy View Post
    1. Convert MPG to some format which can be played on any CD/VCD player (failing which on any computer at least).
    Have you tried just burn some mpg files on a CD and see if any vcd player supports them? And those mpgs should work on all computers/software video players.
    Quote Quote  
  30. Originally Posted by Baldrick View Post
    Originally Posted by ConverterCrazy View Post
    1. Convert MPG to some format which can be played on any CD/VCD player (failing which on any computer at least).
    Have you tried just burn some mpg files on a CD and see if any vcd player supports them? And those mpgs should work on all computers/software video players.
    Thanks @baldrick

    Yes, they work -- tried it with one file. Each MPG file is nearly 500MB. I'd prefer back up on HDD. Burning 94 CDs is unthinkable.
    Quote Quote  



Similar Threads