VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Hi all,

    I know this is probably a simple question, and one that's been asked a million times... but I cannot figure it out and have spent many hours with a trial and error approach and I cannot get it to work!

    I have a folder full of HEVC .mp4 video files each with a single audio streams each and upto 2 subtitles streams. My issue is they are tagged as HEV1 and I need them to be HVC1 to enable them to play nicely with quicktime. I can convert single files with the following (though do not think both subtitle streams work)

    ffmpeg -i X.mp4 -c:v copy -tag:v hvc1 -c:a copy -c copy C:\converted\X.mp4.

    What I want is for ffmpeg to simply remux all the mp4 files in the directory, keeping the subtitles and audio and tagging it with HVC1.

    Is that doable? Any advice will be gratefully received
    Quote Quote  
  2. try ..

    Code:
    for %%a in ("*.mp4") do ffmpeg -i %%a -tag:v hvc1 -c:v copy  -c:a copy -c:s copy "%%~na.hvc1.mp4"
    
    pause
    責任者-MDX
    Quote Quote  
  3. Also add -map 0 to map all tracks so that a 2nd subtitle track would not get lost (by default ffmpeg only maps 1 video, 1 audio and 1 subtitle).

    https://trac.ffmpeg.org/wiki/Map
    Quote Quote  
  4. Thanks for the help... though I have an issue still. I'm guessing its because the filenames have spaces? Though they are in " " so not sure what the problem is. I have hundreds I need to convert so i don't want to rename them all if I can help it!

    Appreciate all the advice

    Image
    [Attachment 52748 - Click to enlarge]
    Quote Quote  
  5. Your source filename isn't in quotes.
    Quote Quote  
  6. I copied the following (as per sekininsha's message) into a batch file and ran it in the same directory as the files...

    for %%a in ("*.mp4") do ffmpeg -i %%a -tag:v hvc1 -c:v copy -c:a copy -c copy -map 0 "%%~na.hvc1.mp4"

    pause


    Is there something I'm missing here?

    Image
    [Attachment 52749 - Click to enlarge]
    Quote Quote  
  7. You source path/name has spaces in it so it needs to be in quotes. -i "%%a"
    Quote Quote  
  8. Originally Posted by jagabo View Post
    You source path/name has spaces in it so it needs to be in quotes. -i "%%a"
    Thank you!!
    Quote Quote  



Similar Threads

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