Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Minimum duration in chunk size while converting to hls format using ffmpeg

    17 mai 2018, par Abhishek

    I am using ffmpeg to convert mp4 to .ts format. In the meta file generated I can see chunk size are random which is acceptable to me, but i need to specify minimum duration of chunk size. Like 15sec or 30sec. Currently I am using following command to convert the videos.

    ffmpeg -i ad1.mp4 -strict -2 -profile:v baseline -level 3.0 -start_number 0 -hls_list_size 0 -hls_segment_filename 'sample-%06d.ts' -f hls sample.m3u8

    Pastebin link for sample m3u8 file

  • Android Trim mp4 file(remote,smb)

    17 mai 2018, par Djangorussia

    Task: trim mp4-video(remote) from n sec to m sec. For access use samba

    1) I try to find library using ffmpeg. Example. But this library doesn't support smb protocol.

    2)I try to use mp4parser. But I can't combine jcifs + mp4parser

    3)I tried to write the library myself. It's poor trick. Not like.

    How best to solve this problem. Need help(advice)

  • A/V out of sync when using ffmpeg from mpeg-ts to dash

    17 mai 2018, par user3540646

    I'm using ffmpeg in order to convert MPEG-TS stream to MPEG-DASH. The mpeg-ts is h264 and aac_latm. Therefore I don't need to reencode the video. The command I use:

    ffmpeg -i http://10.0.0.211:55555/Ch%2011%20Kan -strict -2 -c:v copy -window_size 10 -extra_window_size 10 -use_template 1 -use_timeline 1 -f dash kan.mpd
    

    I'm copying the video codec by using -c:v copy and the audio codec is default to aac.

    That way I get DASH stream BUT the audio/video is out of sync!

    How can I fix it?

    Notes:

    1. If I reencode both audio and video like:

      ffmpeg -i http://10.0.0.211:55555/Ch%2011%20Kan -strict -2 -window_size 10 -extra_window_size 10 -use_template 1 -use_timeline 1 -f dash kan.mpd

    Then the audio/video is synced perfectly. But I do not want to reencode the video for nothing as I mentioned the video is already h264. (directly impact to performance)

    1. If I convert the MPEG-TS stream to mp4 file like:

      ffmpeg -i http://10.0.0.211:55555/Ch%2011%20Kan -strict -2 -c:v copy kan.mp4

    Then the audio/video is synced perfectly.

  • Fastest seek speed and decoding with ffmpeg and x265 ProRes

    17 mai 2018, par Christopher Jarvis

    I'm trying to optimize seek speed with x265. No matter what encoding settings I try, ProRes still seeks more quickly/gracefully. This makes sense since it was built for editing, but I'm sure there's got to be something I'm missing to better improve x265.

    So far, -tune fastdecode, keyint=1, maxrate and -b (to remove B Frame calculations) yield the best results, but they're still unsatisfactory. I've been pouring over the docs but there's so much jargon I just don't understand. Perhaps another codec like VP9 / WebM would be better for this purpose?

    From what I can tell, there's no bottleneck with CPU, read speed or RAM... or GPU for that matter. Monitoring these processes show minimal drain. Is there just an amount of decoding in a highly compressed format like x265 that can't be circumvented?

    Thank you in advance for your help.

  • Merging 2 Mp4 videos Using FFMPEG [writing minds]

    17 mai 2018, par g7pro

    I'm trying to concatenate multiple videos[Different Source] on Android. I have already used ffmpeg for other needs,Its working fine.But here when am trying to merge videos[diff codecs in audio and video and resolution] it merges and give an output but The video output we get is corrupted after 5-10 seconds and cannot be played further.works fine if all videos are from same source. i can provide the videos i have used .

    This is the code i have used

    ffmpeg -i video1.avi -i video2.mp4 -i video3.webm -filter complex “[0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] concat=n=3:v=1:a=1 [v] [a]” -map “[v]” -map “[a]” output_video.mp4
    

    also i tried using

    -f concat -i " + path + "list.txt -c copy " + path + mergedVideoName + ".mp4
    

    All the videos used here are run under these command for making video resolution audio sample rate and video codecs same

    ffmpeg -i 2_NVW3BCYHFNZC4K09.mp4   -vf scale=1280:720,setsar=16:9  -ar 44100 test4.mp4 -hide_banner
    

    Gradle dependency used:

    compile 'com.writingminds:FFmpegAndroid:0.3.2'
    

    THIS CODE WORKS FINE WITH ANY VIDEOS IN SYSTEM[PC] AND NOT IN ANDROID DEVICE

    Thanks in advance