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
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Aug 2011
    Location
    South Carolina
    Search PM
    Ok, I am experimenting a little. I created a m3u8 file along with a few .ts files from an RTMP stream (OBS).

    How can I use ffmpeg to create an MP4 out of them?

    Thanks,

    Ray
    Quote Quote  
  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    ffmpeg selects the decoder on its own, so any supported input file is basically the same. You would only specify the output parameters.
    use defaults
    ffmpeg -i input.m3u8 output.mp4
    or specify much
    ffmpeg -i input.m3u8 -c:v libx264 -preset medium -crf 18 -vf format=yuv420p -c:a aac -b:a 160k -movflags +faststart output.mp4
    or copy streams as-is
    ffmpeg -i input.m3u8 -c copy output.mp4

    if it breaks, then try in two steps, via MKV:
    ffmpeg -i input.m3u8 -c copy output.mkv
    ffmpeg -i input.mkv -c copy output.mp4
    Last edited by Case; 16th May 2019 at 13:31.
    Quote Quote  
  3. Member
    Join Date
    Aug 2011
    Location
    South Carolina
    Search PM
    Thank you for the reply. Working great!

    Ray
    Quote Quote  
  4. Member
    Join Date
    Aug 2011
    Location
    South Carolina
    Search PM
    One other question. When I create a video using my samsung S8 and the ManyCam app, when I turn the phone side ways, the video on screen follows, but the subsequent mp4 does not? So basically portrait works in the mp4 but landscape does not?

    Ray
    Quote Quote  
  5. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    ffmpeg -i intermediate.mp4 -vf "transpose=dir=clock" -c:a copy output2.mp4

    where
    "transpose=dir=cclock_flip" = 90°CounterCLockwise and Vertical Flip (default)
    "transpose=dir=clock" = 90°Clockwise
    "transpose=dir=cclock" = 90°CounterClockwise
    "transpose=dir=clock_flip" = 90°Clockwise and Vertical Flip
    "transpose=dir=clock,transpose=dir=clock" = 180°

    In automated situations, it is possible to make exceptions for either landscape or portrait. transpose=dir=clock:passthrough=portrait
    Quote Quote  
  6. Member
    Join Date
    Aug 2013
    Location
    Arizona
    Search Comp PM
    Originally Posted by Case View Post
    ffmpeg -i intermediate.mp4 -vf "transpose=dir=clock" -c:a copy output2.mp4

    where
    "transpose=dir=cclock_flip" = 90°CounterCLockwise and Vertical Flip (default)
    "transpose=dir=clock" = 90°Clockwise
    "transpose=dir=cclock" = 90°CounterClockwise
    "transpose=dir=clock_flip" = 90°Clockwise and Vertical Flip
    "transpose=dir=clock,transpose=dir=clock" = 180°

    In automated situations, it is possible to make exceptions for either landscape or portrait. transpose=dir=clockassthrough=portrait
    So does this compensate for portrait and landscape in the same video? So if part of the video is portrait but then it flips to landscape and you have have to tilt your head to watch it, does it turn it?
    Quote Quote  
  7. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by rayjVideo View Post
    So does this compensate for portrait and landscape in the same video? So if part of the video is portrait but then it flips to landscape and you have have to tilt your head to watch it, does it turn it?
    No. The whole clip is treated the same as the first frame.
    Quote Quote  



Similar Threads