Skip to content

Error: file name too long #55

Open

Description

@ominfowave

Describe the bug
I am adding audio tracks in a MP4 video, but getting following error from ffmpeg, it seems like output file name length is more then expected length, but how long is too long? Is there ay specific character length specified for the output file name?

Error:
/storage/emulated/0/Android/data/com.myapp/files/MyApp/Guru_shishya_Relationship__For_full_video_click_on_the_YouTube_link___sadhgurudevdineshanand__swamydineshanand__kundalinijagran__sadhnatmakasafalta__sadhakkipariksha____sadhu__sadhguru__sadhana__spiritualjourney__spiritualawakening__spiritua__090223095355.mkv: File name too long

To Reproduce

  1. Just set the output file name same as above, and run any simple ffmpeg command.

Expected behavior
mkv output file

Smartphone (please complete the following information):

  • Device: Redmi note 9 pro
  • OS: Android 12

Additional context
Version used: 'com.github.SimformSolutionsPvtLtd:SSffmpegVideoOperation:1.0.8'

Activity

  1. ominfowave commented on Oct 4, 2023

    @ominfowave
    Author

    Anyone?

  2. Rajan-p-simform commented on Jun 30, 2025

    @Rajan-p-simform

    Thank you for reporting this issue.

    The error message File name too long typically comes from the underlying file system limitations on Android devices rather than FFmpeg itself. Different file systems have different limits on the maximum length of file names and full paths.

    Common limits to consider:

    Maximum filename length (just the name, excluding path): Usually 255 characters for most file systems like ext4 (used on Android).
    Maximum full path length (including directories and filename): Often limited to 4096 characters on Linux-based systems, but Android implementations or storage mounts may impose stricter limits.

    In your case, the filename
    Guru_shishya_Relationship__For_full_video_click_on_the_YouTube_link___sadhgurudevdineshanand__swamydineshanand__kundalinijagran__sadhnatmakasafalta__sadhakkipariksha____sadhu__sadhguru__sadhana__spiritualjourney__spiritualawakening__spiritua__090223095355.mkv
    reaches above the maximum allowed filename length.

    If you remove as few as 4 characters from the filename, the command will work without errors.

    Recommendations:

    Try shortening the filename significantly, ideally keeping it well below 255 characters.
    Avoid using very long descriptive names or excessive underscores.

    Summary:

    There is no explicit FFmpeg limit on output filename length, but Android’s file system enforces limits. To fix the error, shorten the output filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions