VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. Can anyone do me a batch script that will take a folder of mkv files, demux them, then mux the h.264 and audio stream into an mp4 file with the same title?
    Quote Quote  
  2. Is there only 1 video track and 1 audio track?

    It's probably easier with ffmpeg

    Code:
    for %%a in ("*.mkv") do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.mp4
    pause
    Quote Quote  
  3. Yeah only one of each. I'll give that a go
    Quote Quote  
  4. Tried that, I get this


    C:\Users\Michael\Downloads\ffmpeg-git-01fcbdf-win32-static\ffmpeg-git-01fcbdf-win32-stat
    ic\bin>for %%a in ("C:\Users\Michael\Desktop\Season 2\*.mkv") do ffmpeg -i %%a -vcodec c
    opy -acodec copy %%~na.mp4
    %%a was unexpected at this time.

    C:\Users\Michael\Downloads\ffmpeg-git-01fcbdf-win32-static\ffmpeg-git-01fcbdf-win32-stat
    ic\bin>pause

    Quote Quote  
  5. sorry - misunderstanding
    Last edited by videobruger; 6th Feb 2012 at 12:41. Reason: misunderstanding
    Quote Quote  
  6. Thanks but now it doesn't like the spaces in the path. I have it in " " though
    Quote Quote  
  7. It's a dos batch file - i.e. open notepad .txt file in same directory as video files, along with a copy of ffmpeg.exe , copy & paste code, rename .txt extension to .bat, double click the .bat to re-wrap

    If you have spaces in filenames, put "" around it


    for %%a in ("*.mkv") do ffmpeg -i "%%a" -vcodec copy -acodec copy "%%~na.mp4"
    pause
    Quote Quote  
  8. Works like a charm, much better than the way I was doing it.

    Is there a different method to doing it with avi's (to mp4's), I tried but by changing the mkv to avi and when I tried to add to zune (to sync with my phone) I get 'media type not valid'. Not sure if that's because it's not packaged correctly though
    Quote Quote  
  9. Is there a different method to doing it with avi's (to mp4's), I tried but by changing the mkv to avi and when I tried to add to zune (to sync with my phone) I get 'media type not valid'. Not sure if that's because it's not packaged correctly though
    Same thing, just change "mkv" to "avi"

    Code:
    for %%a in ("*.avi") do ffmpeg -i "%%a" -vcodec copy -acodec copy "%%~na.mp4"
    pause
    The only things that you might need to change , are when there are multiple streams (e.g. 2 audio ), or if the stream number is different (e.g. video is track 1 instead of track 0) . Then you can use -map command
    Quote Quote  
  10. Hmmm not sure why it doesn't like these mp4's then :/
    Quote Quote  
  11. the mkv to mp4's play on the zune? but the avi to mp4 doesn't ?


    what kind of compression ? what specs ? use mediainfo view=>text , then copy & paste the report back here

    some types of encoding settings (either audio or video) make the video unplayable on devices. The only way is to re-encode those; you cannot just copy the video or audio stream
    Quote Quote  
  12. Is this a standard thing to see during avi to mp4?
    Image Attached Thumbnails Click image for larger version

Name:	avitomp4.png
Views:	529
Size:	71.3 KB
ID:	10804  

    Quote Quote  
  13. Just saw your reply, here you go

    ===================== General =====================
    Complete name : C:\Users\Michael\Desktop\sd\Hustle Season 2 Episode 5 - Old Acquiantance.avi
    Format : AVI
    Format info : Audio Video Interleave
    File size : 440 MB
    Duration (ms) : 59mn 42s
    Total bitrate : 1 031 Kbps
    Comment : Joined with EO VideoNew value: %d... /

    ===================== Video =====================
    Id : 0
    Format : MPEG-4 Visual
    Format settings - BVOP : Yes
    Format settings - QPel : No
    Format settings - GMC : No warppoints
    Format settings - Matrix : Default (H.263)
    Muxing mode : Packed bitstream
    Codec Id : DX50
    Codec : DivX 5
    Duration (ms) : 59mn 42s
    Bitrate : 889 Kbps
    Width : 720 pixels
    Height : 400 pixels
    Aspect ratio : 16:9
    Framerate : 25.000 fps
    Colorimetry : YUV
    Colos space : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.123
    Stream size : 380 MB (86%)
    Title : Video
    Encoded library : DivX 5.2.0 (DrDivX 105) (UTC 2004-07-17)

    ===================== Audio =====================
    Id : 1
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Format settings mode : Joint stereo
    Format settings mode extens : MS Stereo
    Codec Id : 55
    Codec : MP3
    Duration (ms) : 59mn 42s
    Bitrate mode : Variable
    Bitrate : 128 Kbps
    Channel(s) : 2 channels
    Sampling rate : 44.1 KHz
    Stream size : 55.3 MB (13%)
    Alignement : Aligned on interleaves
    Interleave duration : 26 ms (0.65 video frame)
    Interleave preload : 117 ms
    Title : Audio
    Encoded library : LAME3.92
    I was hoping I wouldn't have to reencode, but I might just need to give these ones a miss
    Quote Quote  
  14. Does the re-wrapped video play on a PC media player ?

    Try ffmbc instead, and modify the batch script

    You can find binaries here
    http://www.mediafire.com/?8xynxe10rxb88
    Quote Quote  
  15. Yeah it plays fine. I'll try that cheers
    Quote Quote  
  16. Nope. Not working either.

    This zune software is awwwwwful.
    Last edited by mkr10001; 6th Feb 2012 at 14:31.
    Quote Quote  
  17. What about mp4box - mymp4box, yamb ? Do they play when remuxed with those

    If not, it's probably an issue with zune then ? with xvid/divx
    Quote Quote  
  18. Yeah tried mymp4box. Didn't work with that. I think it must just be the codec.

    ah well, thanks for your help. I can use that batch file for all my mkv's
    Quote Quote  
  19. Hi again,


    Would it be possible for someone to edit that batch file to check for one of a list of audio codecs then if it matches, convert to mp3 or aac but keep the video stream the same?

    Thanks
    Quote Quote  



Similar Threads

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